supabase-flutter icon indicating copy to clipboard operation
supabase-flutter copied to clipboard

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

Open RCVZ opened this issue 1 year ago • 6 comments

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)

RCVZ avatar May 14 '24 11:05 RCVZ

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.

dshukertjr avatar May 14 '24 12:05 dshukertjr

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

RCVZ avatar Jun 10 '24 11:06 RCVZ

any solution for this ?

AshishAcharya083 avatar Jul 02 '24 15:07 AshishAcharya083

@dshukertjr When is this issue going to be fixed? 3 months have already passed!

RCVZ avatar Jul 25 '24 08:07 RCVZ

I'm getting the same error on Crashlytics. Any idea on how to catch this exceptions so that the application does not crash?

Fatal Exception: FlutterError
AuthException(message: AuthRetryableFetchError, statusCode: null)
          Fatal Exception: FlutterError
0  ???                            0x0 GotrueFetch._handleRequest + 137 (fetch.dart:137)
1  ???                            0x0 GotrueFetch.request + 88 (fetch.dart:88)
2  ???                            0x0 GoTrueClient._refreshAccessToken.<fn> + 1046 (gotrue_client.dart:1046)
3  ???                            0x0 RetryOptions.retry + 131 (retry.dart:131)
4  ???                            0x0 GoTrueClient._refreshAccessToken + 1038 (gotrue_client.dart:1038)
5  ???                            0x0 GoTrueClient._callRefreshToken + 1144 (gotrue_client.dart:1144)
6  ???                            0x0 GoTrueClient._autoRefreshTokenTick + 1026 (gotrue_client.dart:1026)

revtut avatar Jul 31 '24 19:07 revtut

@dshukertjr ???

RCVZ avatar Aug 13 '24 18:08 RCVZ