-
-
Notifications
You must be signed in to change notification settings - Fork 200
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
Supabase Realtime stream cancel and initialize again #585
Comments
Error 1: We are also getting an empty error while listening to the streamin the following error-> there is no error
|
Error 2: we are getting this error after a long time of our app is open:
|
Your error 2 seems to be similar to the issue I descibed in #579. Could be related. |
How's the progress of this going? we need to be able to close and re-initialize streams because the internet may come and go. |
With #1019 being merged now, these issues should be solved now. You can try it by upgrading |
Describe the bug
We are using Supabase realtime for a chat app, and we are facing an unusual behavior with stream and channels 1) We have a global cubit that listens to room status name RoomStatusCubit
This RoomStatusCubit is initialized by listening to the room_status table:
The above cubit has worked well for a while but has an issue when
3) when an error happens
To solve our above issue we have decided to close current channel and reinitalize stream
The issue is when we call cancelChannel() and then initStream() the stream is not working anyway. currently, we need to restart our app to solve this issue and we need a better solution for restarting superbase realtime channel to work correctly so users do not close and open their app.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Allow us to cancel a realtime stream and init stream again without any error and stream shall work like restarting an app
Version (please complete the following information):
On Linux/macOS
Please run
dart pub deps | grep -E "supabase|gotrue|postgrest|storage_client|realtime_client|functions_client"
in your project directory and paste the output here.│ └── supabase 1.10.0
│ ├── functions_client 1.3.2
│ ├── gotrue 1.11.2
│ ├── postgrest 1.5.0
│ ├── realtime_client 1.1.3
│ ├── storage_client 1.5.1
├── supabase_flutter 1.10.12
│ ├── supabase...
Additional context
We sometime also see
heartbeat timeout
issue and not understand how this is relatedand sometime see
Bad state: Cannot add event after closing
error event or cubit is not closed and working correctlyThe text was updated successfully, but these errors were encountered: