SupabaseS
Supabase4mo ago
kopyl

Supabase database returned no results.

I recently implemented "Sign in with Apple" in my Swift iOS app.
A few days ago I started implemented storing and retrieving some data in Supabase database.

Back then I was able to successfully retrieve rows.
Today everything changed:

The same code which used to retrieve proper rows for a user, started retrieving NO rows at all.
On supabase.com/dashboard/project/XXX/logs/auth-logs i found this:

"Invalid Refresh Token: Refresh Token Not Found"

What the hell? How is it not found? I did not in any way remove it manually myself!

Then i signed out and signed it (which caused try await supabaseClient.auth.session to be called) and only after I did it, I started getting rows as I used to before.

I was thinking that it could be due to session token expiration, but this didn't happen to be the case.

I found this post on Reddit: https://www.reddit.com/r/Supabase/comments/1jr5jof/400_invalid_refresh_token_refresh_token_not_found/.
But not 100% sure how to handle it in my app if there is even no error thrown locally when a refresh token isn't found for whatever reason. So sending 2 requests each is not an option for me (1: try await supabaseClient.auth.session to do whatever it does under the hood; 2: Fetch some rows i need with a SELECT requests). And I can't even be sure that try await supabaseClient.auth.session is a fix until i know how to reproduce this bug)

So I'd like to know:
  1. Why the hell did this happen
  2. (Most importantly) how to reproduce it
  3. Ideally a clear statement from anyone from Supabase company that "Supabase Auth is not reliable".
I'm so frustrated. Primarily because I don't know how to reproduce this crap :(

I'm considering moving off Supabase in favor of my own backend in Python for one simple reason: if something does not work, I can know the EXACT reason why, hence I can reproduce it and fix it.
Reddit
Explore this post and more from the Supabase community
Was this page helpful?