Closed
Description
Describe the bug
This is the same bug as described in #147 only in I am on server and using Supabase Dart (not Flutter)
I am sometimes logging dozens of warnings per second originating in package:gotrue/src/fetch.dart. These include:
- ClientException: Connection closed before full header was received, uri=https://xyz.supabase.co/auth/v1/token?grant_type=refresh_token
- ClientException: Broken pipe, uri=https://xyz.supabase.co/auth/v1/token?grant_type=refresh_token
- ClientException: Connection reset by peer, uri=https://xyz.supabase.co/auth/v1/token?grant_type=refresh_token
- ClientException: Write failed, uri=https://xyz.supabase.co/auth/v1/token?grant_type=refresh_token
with Stack trace:
"stackTrace": [
"#0 GotrueFetch._handleRequest (package:gotrue/src/fetch.dart:179)",
"<asynchronous suspension>",
"#1 GotrueFetch.request (package:gotrue/src/fetch.dart:130)",
"<asynchronous suspension>",
"#2 GoTrueClient._refreshAccessToken.<anonymous closure> (package:gotrue/src/gotrue_client.dart:1079)",
"<asynchronous suspension>",
"#3 RetryOptions.retry (package:retry/retry.dart:131)",
"<asynchronous suspension>"
]
The retry eventually succeeds it seems, as I don't see any related client errors logged.
To Reproduce
Happens sporadically, does not seem to be related to any client request
Version (please complete the following information):
dart pub deps | grep -E "supabase|gotrue|postgrest|storage_client|realtime_client|functions_client"
├── supabase 2.3.0
│ ├── functions_client 2.3.2
│ ├── gotrue 2.8.4
│ ├── postgrest 2.1.4
│ ├── realtime_client 2.2.1
│ ├── storage_client 2.0.3
Additional context
Server app is built with Dart Frog and hosted on GCP.