saleor-dashboard
saleor-dashboard copied to clipboard
Saleor logs me out on save - (403) ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN
What I'm trying to achieve
Stay logged in and save data
Steps to reproduce the problem
- Login to Saleor Dashboard
- Click Catalog -> Products -> any product name
- Edit a product, e.g. change price
- Click Save
- Get an error and am logged out
Error is: (0, 0): (403) ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile.
What I expected to happen
Product saves and I stay logged in
Http request and response from inspector
{"errors": [{"message": "(0, 0): (403) ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile.", "locations": [{"line": 2, "column": 3}], "path": ["productVariantCreate"], "extensions": {"exception": {"code": "AccessRefused", "stacktrace": ["Traceback (most recent call last):", " File \"/app/.heroku/python/lib/python3.9/site-packages/kombu/utils/functional.py\", line 30, in __call__", " return self.__value__", "AttributeError: 'ChannelPromise' object has no attribute '__value__'", "", "During handling of the above exception, another exception occurred:", "Traceback (most recent call last):", " File \"/app/.heroku/python/lib/python3.9/site-packages/graphql/execution/executor.py\", line 452, in resolve_or_error", " return executor.execute(resolve_fn, source, info, **args)", " File \"/app/.heroku/python/lib/python3.9/site-packages/graphql/execution/executors/sync.py\", line 16, in execute", " return fn(*args, **kwargs)", " File \"/app/saleor/graphql/core/mutations.py\", line 412, in mutate", " response = cls.perform_mutation(root, info, **data)", " File \"/app/saleor/graphql/core/mutations.py\", line 610, in perform_mutation", " cls.save(info, instance, cleaned_input)", " File \"/app/.heroku/python/lib/python3.9/contextlib.py\", line 79, in inner", " return func(*args, **kwds)", " File \"/app/saleor/graphql/product/mutations/products.py\", line 1050, in save", " update_product_discounted_price_task.delay(instance.product_id)", " File \"/app/.heroku/python/lib/python3.9/site-packages/celery/app/task.py\", line 425, in delay", " return self.apply_async(args, kwargs)", " File \"/app/.heroku/python/lib/python3.9/site-packages/celery/app/task.py\", line 575, in apply_async", " return app.send_task(", " File \"/app/.heroku/python/lib/python3.9/site-packages/celery/app/base.py\", line 788, in send_task", " amqp.send_task_message(P, name, message, **options)", " File \"/app/.heroku/python/lib/python3.9/site-packages/celery/app/amqp.py\", line 510, in send_task_message", " ret = producer.publish(", " File \"/app/.heroku/python/lib/python3.9/site-packages/kombu/messaging.py\", line 177, in publish", " return _publish(", " File \"/app/.heroku/python/lib/python3.9/site-packages/kombu/connection.py\", line 523, in _ensured", " return fun(*args, **kwargs)", " File \"/app/.heroku/python/lib/python3.9/site-packages/kombu/messaging.py\", line 186, in _publish", " channel = self.channel", " File \"/app/.heroku/python/lib/python3.9/site-packages/kombu/messaging.py\", line 209, in _get_channel", " channel = self._channel = channel()", " File \"/app/.heroku/python/lib/python3.9/site-packages/kombu/utils/functional.py\", line 32, in __call__", " value = self.__value__ = self.__contract__()", " File \"/app/.heroku/python/lib/python3.9/site-packages/kombu/messaging.py\", line 225, in <lambda>", " channel = ChannelPromise(lambda: connection.default_channel)", " File \"/app/.heroku/python/lib/python3.9/site-packages/kombu/connection.py\", line 895, in default_channel", " self._ensure_connection(**conn_opts)", " File \"/app/.heroku/python/lib/python3.9/site-packages/kombu/connection.py\", line 433, in _ensure_connection", " return retry_over_time(", " File \"/app/.heroku/python/lib/python3.9/site-packages/kombu/utils/functional.py\", line 312, in retry_over_time", " return fun(*args, **kwargs)", " File \"/app/.heroku/python/lib/python3.9/site-packages/kombu/connection.py\", line 877, in _connection_factory", " self._connection = self._establish_connection()", " File \"/app/.heroku/python/lib/python3.9/site-packages/kombu/connection.py\", line 812, in _establish_connection", " conn = self.transport.establish_connection()", " File \"/app/.heroku/python/lib/python3.9/site-packages/kombu/transport/pyamqp.py\", line 201, in establish_connection", " conn.connect()", " File \"/app/.heroku/python/lib/python3.9/site-packages/amqp/connection.py\", line 329, in connect", " self.drain_events(timeout=self.connect_timeout)", " File \"/app/.heroku/python/lib/python3.9/site-packages/amqp/connection.py\", line 525, in drain_events", " while not self.blocking_read(timeout):", " File \"/app/.heroku/python/lib/python3.9/site-packages/amqp/connection.py\", line 531, in blocking_read", " return self.on_inbound_frame(frame)", " File \"/app/.heroku/python/lib/python3.9/site-packages/amqp/method_framing.py\", line 53, in on_frame", " callback(channel, method_sig, buf, None)", " File \"/app/.heroku/python/lib/python3.9/site-packages/amqp/connection.py\", line 537, in on_inbound_method", " return self.channels[channel_id].dispatch_method(", " File \"/app/.heroku/python/lib/python3.9/site-packages/amqp/abstract_channel.py\", line 156, in dispatch_method", " listener(*args)", " File \"/app/.heroku/python/lib/python3.9/site-packages/amqp/connection.py\", line 667, in _on_close", " raise error_for_code(reply_code, reply_text,", "amqp.exceptions.AccessRefused: (0, 0): (403) ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile."]}}}], "data": {"productVariantCreate": null}, "extensions": {"cost": {"requestedQueryCost": 16, "maximumAvailable": 50000}}}
Console output
DevTools failed to load source map: Could not parse content for https://saleor-dashboard-chi.vercel.app/sw.js.map: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
DevTools failed to load source map: Could not parse content for https://saleor-dashboard-chi.vercel.app/dashboard.64b732f89f4bac6154e5.js.map: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
DevTools failed to load source map: Could not parse content for https://saleor-dashboard-chi.vercel.app/sw.js.map: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
2DevTools failed to load source map: Could not parse content for https://saleor-dashboard-chi.vercel.app/dashboard.64b732f89f4bac6154e5.js.map: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
5[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>
saleor-dashboard-chi.vercel.app/:1 Form submission canceled because the form is not connected
[Violation] 'click' handler took 193ms
[Violation] 'click' handler took 177ms
dashboard.64b732f89f4bac6154e5.js?21d7ba3256ca70a942f4:526 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'productVariantCreate')
at dashboard.64b732f89f4bac6154e5.js?21d7ba3256ca70a942f4:526:2212754
at c (dashboard.64b732f89f4bac6154e5.js?21d7ba3256ca70a942f4:95:90640)
at Generator._invoke (dashboard.64b732f89f4bac6154e5.js?21d7ba3256ca70a942f4:95:90393)
at forEach.e.<computed> [as next] (dashboard.64b732f89f4bac6154e5.js?21d7ba3256ca70a942f4:95:90997)
at SOe (dashboard.64b732f89f4bac6154e5.js?21d7ba3256ca70a942f4:526:2211314)
at o (dashboard.64b732f89f4bac6154e5.js?21d7ba3256ca70a942f4:526:2213468)
System information
Saleor version: dashboard v3.3.1 core vdev
Operating system:
- [X ] MacOS
Browser:
- [X ] Chrome
Hello @amityweb 👋
I hope you are well. Thank you for submitting your issue 🙏.
We need some more information about your environment:
- Is that a self-hosted version of Saleor?
- If so, is the code modified in any way?
- Where is the API running?
Oh sorry I missed that...
Initially I think I deployed Saleor Core to Heroku via the deploy to heroku button on your github repo. I think I may have switched this to deploy from a GitHub fork I have of your repo. No modifications to code.
Saleor Dashboard is deployed to Vercel via a GitHub fork I have of your repo, no modifications to code.
I have ALLOWED_HOSTS in Heroku for Saleor Core settings to ['*'] but still get error
It may be a Saleor Core issue, I just ran python manage.py migrate and got this ACCESS_REFUSED error but preceded by what looks like other issues, as reported here: https://github.com/saleor/saleor/discussions/10683
I have started again, re-installed Saleor Core from the Heroku deply button on Github and its all working OK now. So something about the other installation causing issues.
Luckily its just a dev store at the moment and not a working one.
I am glad you managed to solve it @amityweb. Please let us know if you have any other issues. I will close this one for now.