-
-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weird errors related to connecting to the Supabase instance in Flutter #147
Comments
Hi @deliqs, Sorry to hear that you are having troubles with Supabase and Flutter. Thank you for listing the errors you see in the logs. This is very helpful. I wonder if the problem is on the client side of things or Supabase side of things. Have you tried to create another Supabase project and connected to that one? If not, it might be worth trying. If that also fails, could you try using a Supabase instance that I have? You can initialize Supabase with the following credentials to connect to one of the Supabase project that I have. Once you connect to it, please try to query something from the database and see if you get the same errors. url: 'https://nlbsnpoablmsxwkdbmer.supabase.co',
anonKey: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlhdCI6MTYyOTE5ODEwMiwiZXhwIjoxOTQ0Nzc0MTAyfQ.XZWLzz95pyU9msumQNsZKNBXfyss-g214iTVAwyQLPA', |
In what platform are you in? If android, some permissions might be missing (such as internet and read/write permissions). iOS may request permissions as well These errors are attached to HTTP issues, so the issue might be on your internet connection. Can you try to use another network or a VPN? By reading documentation about those errors, it looks like there's an issue with your DNS I'm sure this is not an issue with the dart client.
Please ensure the supabase url is correct! See also:
|
Hey there! I realized I wasn't clear in my first post. The problems do occur sporadically for all users on my production instance. I have never experienced the mentioned problems on my dev instance and the problems also do not occur constantly for the same users. It seems to happen just sporadically for the users, but taken together it happens quite frequently. The weird thing about it all is the errors are logged in the Supabase instance, so there seems to be a connection. Maybe it only fails sometimes on the first try. |
The related issues are likely to be flutter issues instead of supabase's. @dshukertjr iirc, we retry when an operation fails, right? |
@bdlukaa Yeah, we do have a mechanism that will retry refreshing auth token upon failure. @deliqs Thanks for the additional details. You mentioned that you were able to view the error logs on Supabase, right?
These are client side errors, correct? Will you be able to share some of the server side error logs as well? or are these the logs from Supabase dashboard? |
@dshukertjr Yes, these are client side errors that arise in my Flutter app. I catch all errors that happen in the app and log those to a custom made table in my Supabase database. I have taken a look into the API and Postgres logs that the Supabase dashboard provides but haven't found much worthwhile.
|
@deliqs can you log the stacktrace? it'll help us know from where, exactly, the error comes from! Right now, these errors are useless since it can have happened anywhere within the library |
@bdlukaa Thanks for your patience. I'm currently logging the stacktrace as far as I can see, but somehow that ends up as null in the logs. I'll dive into that after this weekend to see if I can improve the error message and come back to you. |
I have not yet made the necessary changes, but I did receive a same kind of error that is not related to Supabase.
This makes me question if the mentioned problems are actually related to Supabase? Logged stack trace: |
It's rather related to your user's Internet connection, not supabase |
@deliqs As bdlukaa has mentioned, it seems like it might not be related to Supabase. Are you getting a lot of complaints from your users about these issues? or are you more just worried because you see these error logs on your custom error logging table? |
@dshukertjr for instance, we could also retry on connectivity change. https://pub.dev/packages/connectivity_plus |
@bdlukaa Possibly. Were you thinking to intercept every http request while offline in that case? |
Luckily, I have built the app to be offline first. Synchronization with Supabase happens mostly on the background. So I have not got any complaints/bug reports from my users. It's indeed that I'm worried because of the errors that come in (the network problems cause errors in the synchronization). |
@deliqs Nice. Yeah, it seems like this is an issue on Flutter side of things unfortunately. Hopefully you can implement retry logic to sync those updates to Supabase! I would like to close this issue, but if anything comes up in the future, please do not hesitate to open another issue! |
@dshukertjr @bdlukaa Just for future references. I found my issue. I somehow missed the await before the Supabase.initialize(). I've added it and didn't see any of the mentioned issues again. |
@deliqs Nice! So glad to hear that you were able to fix your issue 🎉 |
I've been experiencing this issue for a while now but never had time to get around to it. I'm awaiting initialization and the issue isn't solved. I was reading into it and it seems like the cupertino_http client is better at handling http requests on iOS due to OS handling the closing and reopening the connection when the app is suspended. Might be worth using that when the client is iOS? Update: I spoke too quickly. Gonna try setting the retryStorage parameter and see what happens |
I have the same issue as well, even though I call .init(). UPD
|
Is there any chance this error is investigated? |
Looking at the thread from earlier, dart-lang/http#197, we should use cupertino_http on iOS. |
Hi,
I've been sent here by Div of the support team.
I'm experiencing frequent and weird errors related to connecitng to my Supabase instance from my Flutter app.
Some examples:
I'm completely in the dark about what, and have the feeling that it is not my code which, causes this. Anyone with some insights into this or that can help me?
The text was updated successfully, but these errors were encountered: