Verständnisfrage Access Key

Guten Morgen,
ich habe alles umgesetzt. Die Daten werden korrekt in der Datenbank gespeichert und anschließend werden die Mails versendet (mit Chronjob). Damit bin ich auch zufrieden.

Allerdings habe ich bemerkt, dass (obwohl ich im Admin-Bereich eingeloggt bin), diese Fehlermeldung in den AJAX-Requests ausgegeben wird:

"code": "9",
"status": "401",
"title": "The resource owner or authorization server denied the request.",
"detail": "Missing \"Authorization\" header",
No route found for "GET http://127.0.0.1:8001/Users/wangma/shopware/StockNotification/src/vendor/league/oauth2-server/src/AuthorizationValidators/BearerTokenValidator.php"

Das ist unabhängig von den Plugins, da die Meldung auch ohne installierte Plugins erscheint. Dadurch werden die Events nicht getriggert, wie ich der Fehlermeldung entnehmen kann. Ich denke, dass das bestimmt an einer falschen Konfiguration meinerseits liegt. Ich nutze Dockware/Dev auf einem M1 Mac.

Wieso wird im Backend ein Request an eine API geschickt? Das ist doch gar nicht mehr notwendig mit deiner neuen Architektur. Das hat nichts mit deine Systemumgebung zu tun, das ist „fehlerhaft“ programmiert.

Den Fehler habe ich aber auch, wenn ich einfach „schnell“

docker run --rm -p 80:80 dockware/dev:latest

ausführe ohne mein Zutun

Vielleicht irre ich mich auch, aber das kommt weder in GitHub noch in meinem Shopware-Ordner vor.

Da hast du natürlich recht. Aber ich bekomme diese Fehlermeldung z.B., wenn ich docker run --rm -p 80:80 dockware/dev:latest nutze

{
"errors": [
{
"code": "9",
"status": "401",
"title": "The resource owner or authorization server denied the request.",
"detail": "Missing \"Authorization\" header",
"meta": {
"trace": [
{
"file": "/var/www/html/vendor/league/oauth2-server/src/AuthorizationValidators/BearerTokenValidator.php",
"line": 93,
"function": "accessDenied",
"class": "League\\OAuth2\\Server\\Exception\\OAuthServerException",
"type": "::"
},
{
"file": "/var/www/html/vendor/shopware/core/Framework/Api/OAuth/BearerTokenValidator.php",
"line": 43,
"function": "validateAuthorization",
"class": "League\\OAuth2\\Server\\AuthorizationValidators\\BearerTokenValidator",
"type": "->"
},
{
"file": "/var/www/html/vendor/league/oauth2-server/src/ResourceServer.php",
"line": 84,
"function": "validateAuthorization",
"class": "Shopware\\Core\\Framework\\Api\\OAuth\\BearerTokenValidator",
"type": "->"
},
{
"file": "/var/www/html/vendor/shopware/core/Framework/Api/EventListener/Authentication/ApiAuthenticationListener.php",
"line": 105,
"function": "validateAuthenticatedRequest",
"class": "League\\OAuth2\\Server\\ResourceServer",
"type": "->"
},
{
"file": "/var/www/html/vendor/symfony/event-dispatcher/Debug/WrappedListener.php",
"line": 117,
"function": "validateRequest",
"class": "Shopware\\Core\\Framework\\Api\\EventListener\\Authentication\\ApiAuthenticationListener",
"type": "->"
},
{
"file": "/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php",
"line": 230,
"function": "__invoke",
"class": "Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener",
"type": "->"
},
{
"file": "/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php",
"line": 59,
"function": "callListeners",
"class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
"type": "->"
},
{
"file": "/var/www/html/vendor/shopware/core/Content/Flow/Dispatching/FlowDispatcher.php",
"line": 54,
"function": "dispatch",
"class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
"type": "->"
},
{
"file": "/var/www/html/vendor/shopware/core/Framework/Webhook/WebhookDispatcher.php",
"line": 99,
"function": "dispatch",
"class": "Shopware\\Core\\Content\\Flow\\Dispatching\\FlowDispatcher",
"type": "->"
},
{
"file": "/var/www/html/vendor/shopware/core/Framework/Event/BusinessEventDispatcher.php",
"line": 53,
"function": "dispatch",
"class": "Shopware\\Core\\Framework\\Webhook\\WebhookDispatcher",
"type": "->"
},
{
"file": "/var/www/html/vendor/shopware/core/Framework/Event/NestedEventDispatcher.php",
"line": 38,
"function": "dispatch",
"class": "Shopware\\Core\\Framework\\Event\\BusinessEventDispatcher",
"type": "->"
},
{
"file": "/var/www/html/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php",
"line": 154,
"function": "dispatch",
"class": "Shopware\\Core\\Framework\\Event\\NestedEventDispatcher",
"type": "->"
},
{
"file": "/var/www/html/vendor/symfony/http-kernel/HttpKernel.php",
"line": 151,
"function": "dispatch",
"class": "Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher",
"type": "->"
},
{
"file": "/var/www/html/vendor/symfony/http-kernel/HttpKernel.php",
"line": 75,
"function": "handleRaw",
"class": "Symfony\\Component\\HttpKernel\\HttpKernel",
"type": "->"
},
{
"file": "/var/www/html/vendor/symfony/http-kernel/Kernel.php",
"line": 202,
"function": "handle",
"class": "Symfony\\Component\\HttpKernel\\HttpKernel",
"type": "->"
},
{
"file": "/var/www/html/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php",
"line": 86,
"function": "handle",
"class": "Symfony\\Component\\HttpKernel\\Kernel",
"type": "->"
},
{
"file": "/var/www/html/vendor/symfony/http-kernel/HttpCache/HttpCache.php",
"line": 479,
"function": "handle",
"class": "Symfony\\Component\\HttpKernel\\HttpCache\\SubRequestHandler",
"type": "::"
},
{
"file": "/var/www/html/vendor/symfony/http-kernel/HttpCache/HttpCache.php",
"line": 452,
"function": "forward",
"class": "Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache",
"type": "->"
},
{
"file": "/var/www/html/vendor/symfony/http-kernel/HttpCache/HttpCache.php",
"line": 346,
"function": "fetch",
"class": "Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache",
"type": "->"
},
{
"file": "/var/www/html/vendor/symfony/http-kernel/HttpCache/HttpCache.php",
"line": 224,
"function": "lookup",
"class": "Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache",
"type": "->"
},
{
"file": "/var/www/html/vendor/shopware/core/HttpKernel.php",
"line": 154,
"function": "handle",
"class": "Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache",
"type": "->"
},
{
"file": "/var/www/html/vendor/shopware/core/HttpKernel.php",
"line": 79,
"function": "doHandle",
"class": "Shopware\\Core\\HttpKernel",
"type": "->"
},
{
"file": "/var/www/html/public/index.php",
"line": 85,
"function": "handle",
"class": "Shopware\\Core\\HttpKernel",
"type": "->"
}
],
"file": "/var/www/html/vendor/league/oauth2-server/src/Exception/OAuthServerException.php",
"line": 243
}
}
]
}

Da bin ich leider raus. Da musst du dich an jemanden wenden, der (täglich) Dockware nutzt.

Ich danke dir trotzdem für deine Hilfe bisher. :slight_smile: