Ein Einloggen im Admin-Bereich ist problemlos im Localhost möglich. Checke ich dann aber die AJAX-Request, sehe ich folgende Fehlermeldung:
{
"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
}
}
]
}
Das selbe passiert auch, wenn ich nicht meine eigene Config nutze, sondern zum Beispiel docker run --rm -p 80:80 dockware/dev:latest nutze.
Ich habe schon viel probiert, kann aber nicht wirklich sagen, woher der Fehler herkommt. Nutze ein M1 Macbook, wenn das hilft.