Hangs/Never Makes Request

In a project I am working on, I am having issues with supabase database requests. I would make a simple request using const { data, error } = await supabase.from('table'), and no web requests would be made, it would just stay hanging without making any requests. This issue seems somewhat inconsistent, but I made a pretty simple reproduction of the error in https://github.com/wjojarth23/supabase-issues. Essentially - when a user is detected to be logged in, it fetches their profile from a separate table. A console log is made before the fetch, but after the console log no web requests are ever made. As you can see, this is a sveltekit project. I am testing on Microsoft Edge/Windows 11, but I have observed this issue on other devices as well. I would really appreciate if someone could take a look at my supabase setup and tell me what I am doing wrong. I am totally at a loss as this seems to be a fairly simple setup.
6 Replies
garyaustin
garyaustin2mo ago
This is almost always the important note here: https://supabase.com/docs/reference/javascript/auth-onauthstatechange
JavaScript: Listen to auth events | Supabase Docs
Supabase API reference for JavaScript: Listen to auth events
Heroic Pigeon
Heroic PigeonOP2mo ago
Thanks so much. This instantly solved my problem! I much appreciate your fast help. I wish I had asked earlier this would have solved hours of pain!
garyaustin
garyaustin2mo ago
Feel free to post on the "wall" of pain... https://github.com/supabase/auth-js/issues/762
Heroic Pigeon
Heroic PigeonOP2mo ago
How can I mark solved
garyaustin
garyaustin2mo ago
Add solved tag to first post.

Did you find this page helpful?