-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
Stream errors after system sleep (Desktop) #579
Comments
I ended up implementing a workaround using the package I'm not quite sure if this covers all cases where this issue occurs and it's kind off a bad user experience. |
I tried to reproduce the issues by creating a minimal flutter desktop project. You can find it in my repo: https://github.com/maxfornacon/supabase_test To reproduce I ran it on MacOS and closed my MacBook (MacOS sleep). After waiting for >30min (often a couple of hours) the following errors occurred: There is always this unhandled Exception:
This exception appears relatively quickly, but doesn't seem to break the streams on its own. But it might be helpful to qive a more detailed description what the exception means and why it occurs. Some other exceptions that can occur:
SocketException
heartbeat timeout
Some of them are quite often in the logs and the stream doesn't receive any new events. |
I have a slightly different exception when opening a stream. Stream seems to work fine though, just this message
|
@maxfornacon Thanks for providing step by step of how to reproduce the issue. I was able to reproduce it, and the above PR should fix it! @jstdk Your issue should be fixed with the PR as well. |
@dshukertjr Does this mean the streams will reconnect automatically or do I need to handle it myself somehow? |
@maxfornacon It should reconnect automatically. I think it does reconnect automatically too, but it does throw an error before it reconnects. With the update though, no errors are thrown, and it will reconnect automatically. |
@dshukertjr, I updated Supabase but still see this in the log |
@jstdk The PR is not yet merged. |
@maxfornacon, Thanks, I am so sorry. I saw RealTime updates in the Supabase latest version yesterday so I thought it was related. |
@maxfornacon @jstdk |
@dshukertjr I updated the package, relaunched the project and left the application running on my MacBook (closed) over night. Apparently I'm still getting the error I updated my test repo. |
@maxfornacon Okay, you reported three different errors, and it seems like the first one is at least not happening anymore. Not sure if the update mitigated the second error, but will look into the third error again. |
@dshukertjr In my first test, only the So it seems the PR unfortunatley didn't fix it yet, but I appreciate your effort and work so far. :) |
Okay, there is most definitely an issue with internet connectivity. I manually turned off wifi and after a couple of minutes I get the empty Interestingly the stream is still working after this as far as I can say for now. |
@maxfornacon , same error returned for me |
Feel that it is getting worse. I now gget page after page of these errors, even on pages where there is no stream active at all . It is now at a point where I can't read my own app log anymore, its only stream errors.
|
I noticed that in the release @dshukertjr mentioned here (1.10.16) there wasn't a realtime_client update (it was still 1.2.1 which was released almost a month ago) So I made another test with my test project and didn't receive errors except for the WebSocketExceptions. But that's probably due to loss of internet connection (and therefore to be expected I guess) But still the streams were not reconnecting and that's what I care most about. |
@maxfornacon. Think you are right, I just updated to 1.10.18 and the errors are gone. Thanks |
@dshukertjr I found steps to reliably reproduce the disconnected streams.
After that the stream should not refresh when data in database changes. |
I was receiving a lot of Thanks for the steps to reproduce the stream not reconnecting issue. I was able to reproduce it on my end. Let me see what I can do. |
Hi @dshukertjr, do you know when the update will be available? :) I also receive a lot of |
@ymerdrengene We publish weekly updates on every Monday usually! |
@dshukertjr I can confirm that I'm not receiving above mentioned exceptions anymore in 1.10.19. But after simulating a disconnected wifi and turning it on again. I get the following.
and this one multiple times:
|
Yup, the invalid token issue does happen when the token expires between the time of going into offline and coming back. We are in the process of fixing this one as well. |
@dshukertjr Can you provide us with an update regarding the reconnecting issue? |
Hello Guys, I'm facing related issues here. Sometimes my chat just stop to work with the following errors:
Do we have any update for this? |
Thanks for following up with this one, and sorry that it's taking so long for this to be resolved. We are investigating this issue, but not going to lie it has been tough trying to pin point the root cause. We do understand that this is a critical issue for Supabase users, and will keep digging into the cause of it. |
If there is any information regarding the error that you can share with us, I would be very grateful. Perhaps the community can also contribute to finding a solution or has an idea that leads to a solution. This error is very relevant for our business, as we rely on a reliable real-time connection. |
Describe the bug
I'm experiencing an issue on Flutter desktop especially on MacOS (other platforms not properly tested yet). When the OS goes into sleep mode and awakens after a longer period of time streams seem to not be reconnecting properly.
I'm getting a couple of error messages:
First a couple of these:
Then there is this one:
When I trigger a request to Supabase the token gets refreshed, which is good. All requests to Supabase seem to work fine, but streams don't.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect the streams to reconnect and load all data that's changed while the system was suspended.
Version (please complete the following information):
On macOS
I experienced an issue with all requests failing after system sleep due to invalid JWT, but this seems to be solved with the newest package version. Therefore my remaining problem could be related.
The text was updated successfully, but these errors were encountered: