supabase / supabase-flutter

Flutter integration for Supabase. This package makes it simple for developers to build secure and scalable products.
https://supabase.com/
MIT License
656 stars 154 forks source link

Sentry reports AuthException(message: AuthRetryableFetchError, statusCode: null) #928

Open RCVZ opened 1 month ago

RCVZ commented 1 month ago

Describe the bug Sentry reports multiple AuthRetryableFetchError's. Some logs show that the user was switching from foreground <-> background All of the reports are on iOS(But those are like 99% of my users)

To Reproduce I have not been able to reproduce this with one of my own devices.

Version: supabase_flutter 2.5.2 supabase 2.1.2 functions_client 2.1.0 gotrue 2.6.1 postgrest 2.1.1 realtime_client 2.0.4 storage_client 2.0.1

Stacktrace:

AuthException(message: AuthRetryableFetchError, statusCode: null)
  App                 0x10af72518  GotrueFetch._handleRequest (fetch.dart:137)
  File "<asynchronous suspension>"
  App                 0x10af722c8  GotrueFetch.request (fetch.dart:88)
  File "<asynchronous suspension>"
  App                 0x10af718c4  GoTrueClient._refreshAccessToken.<T> (gotrue_client.dart:1062)
  File "<asynchronous suspension>"
  App                 0x10af716e8  RetryOptions.retry (retry.dart:131)
  File "<asynchronous suspension>"
  App                 0x10af714a0  GoTrueClient._refreshAccessToken (gotrue_client.dart:1054)
  File "<asynchronous suspension>"
  App                 0x10af711e4  GoTrueClient._callRefreshToken (gotrue_client.dart:1160)
  File "<asynchronous suspension>"
  App                 0x10af71090  GoTrueClient._autoRefreshTokenTick (gotrue_client.dart:1042)
  File "<asynchronous suspension>"
  App                 0x10af70ee4  GoTrueClient.startAutoRefresh (gotrue_client.dart:1011)
dshukertjr commented 1 month ago

This likely means that the user opened the app when the device wasn't connected to the internet and the SDK failed to refresh the session. We could probably improve the error message or something to be more obvious.

RCVZ commented 1 week ago

I just had this error on login(signInWithIdToken) during local dev development. I'm on a stable wifi connection.