Back

I cant receive realtime

  • 0
  • Realtime
  • Cloud
Mosh Ontong
4 Dec, 2023, 17:58

I already received a realtime connection in my appwrite console:

TypeScript
void subscribe() {
    final subscription2 = AppwriteClient.instance.realtime.subscribe(
      [
        // ignore: lines_longer_than_80_chars
        'databases.${AppwriteClient.instance.taramedDatabaseId}.collections.${AppwriteClient.instance.consultationLogCollectionId}.documents',
      ],
    );

    subscription2.stream.listen((event) {
      print('event $event');
    });
    // _subscription = ref
    //     .read(consultationRepoProvider)
    //     .getConsultationLogStream()
    //     .listen((consultationLog) => _consultationLogListener(consultationLog),
    //         onError: _consultationErrorListener, cancelOnError: true);
  }

But still I cant receive any data

TL;DR
Issue: The user is unable to receive realtime data in their app after the screen has been idle for a few minutes. They have already tried refreshing the screen to reconnect to realtime. Solution: It seems that the user has already established a realtime connection successfully using the provided code. However, they are not receiving any data. Further troubleshooting or assistance from the support team may be required to resolve this issue.
D5
4 Dec, 2023, 18:20

First time you establish the connection you don't get any data

D5
4 Dec, 2023, 18:22

Once you have an active realtime connection, then you start receiving changes

D5
4 Dec, 2023, 22:47

@Mosh Ontong Was that your issue or you still don't receive anything after the connection is stabilised and a change is performed meanwhile the connection is alive?

Mosh Ontong
5 Dec, 2023, 00:17

I received already but sometimes qhen the app screen stayed atleast 3 to 5 monites the realtime connection is not working again I need to refresh my screen so that it will reconnect to realtime

Mosh Ontong
5 Dec, 2023, 00:25
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more