Rank 3: Container
Hi,
After upgrading Flutter Appwrite from version 8.2.0 to 9.0.1, I have faced these issues...
First Issue was, I was using single Realtime instance for creating all the subscriptions for multiple channels but on 9.0.1 when I tried to subscribe to multiple channels the subscription gets set to 'subscriptions:null' automatically when the second channel was added. Basically it was setting and cancelling the subscription when I added the second channel.
but, I found a solution for this issue and used different realtime instances for each channel/subscription and it worked. Seems like one realtime instance can handle only one channel in the 9.0.1 version, in 8.2.0 I could subscribe to multiple channel using one instance of Realtime.
So Basically, its working fine now but the new issue I am facing regarding this is that For example, I subscribe to a 'test' channel it works okay and I get updated but after some time maybe (4-5 minutes or more) the updates from realtime stops as if the connection is closed and when in that scenario i try to cancel or close the realtimesubscription it gives me the error
'Null check operator used on a null value'
From this part of the code:
'realtime_mixin.dart'
Line 141: "_channels[channel]!.remove(controller);"
I would like to know if there is any timeout limit for realtimesubscription that I am not aware of so I can change it.
My Appwrite backend is hosted on Apache Server.