Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receive "No SuperTokens core available to query" #237

Open
alexprice12 opened this issue Oct 3, 2022 · 7 comments
Open

Receive "No SuperTokens core available to query" #237

alexprice12 opened this issue Oct 3, 2022 · 7 comments
Assignees

Comments

@alexprice12
Copy link

message.txt

Stack trace attached in message.txt

This error happens infrequently but daily. It has happened as long as a ~5 seconds for multiple requests. I'd like the sdk to either retry or at least show a much better error.

@dev-ago
Copy link

dev-ago commented Oct 26, 2023

This error is caused by your SuperToken not being available to your Python application or your Python application not being able to connect.

A classic bug, which happened to me, is that I was trying to contact supertoken on localhost from my container, while supertoken was running in another container. Check the ConnectionURI variable in your configuration. I attach an example (from go, but it may give you the necessary hints).

Other possible errors to check:

  1. Firewall
  2. Ports where SuperToken runs
  3. DNS
  4. Connection problems

carbon

@andreipopovici
Copy link

I can consistently reproduce this on the very first request to FastAPI. All subsequent requests work. There must be an initialization issue somewhere.

I haven't tested in production, only locally (but pointing to the correct core container address, since all requests except the very first work).

@rishabhpoddar
Copy link
Contributor

That's interesting @andreipopovici . Do you have a demo app we could get access to, to try and see why this is happening?

@andreipopovici
Copy link

I do not, but I'll set one up shortly. I use FastAPI in a Docker container with uvicorn hot-reloading during dev, and after any change and subsequent server reload, the very first request that uses the ST SDK fails with this error.

@rishabhpoddar
Copy link
Contributor

Thanks. Would be very helpful to get a demo app here. Will wait for it

@andreipopovici
Copy link

@rishabhpoddar Here you go. Instructions are in the README: https://github.com/andreipopovici/st-python-reproduce

@rishabhpoddar
Copy link
Contributor

rishabhpoddar commented Mar 20, 2024

Thanks @andreipopovici. Will try it and get back to you. Please give us a few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants