I get this error only sometimes and I have no way to catch this... When I create 3 Realtime instances and subscribtions (3 Diffrent Collections) I get this error only sometimes when one of these collection i loaded last (random load order) dunno whats wrong or going on but it would just be helpful to catch this error... else my app crashes... here is the code:
RealtimeSubscription subscribeToRealtimeUpdates(String collectionId) {
try {
print('started subscription to $collectionId');
var subscription = Realtime(_client).subscribe([
'databases.$kAppwriteDb.collections.$collectionId.documents',
]);
print('listen to stream');
subscription.stream.listen((event) {
if (kDebugMode) {
print('got event for appwrite: ${event.payload}');
}
add(
RealtimeSubEvent(
model: fromJsonT(event.payload),
),
);
}).onError((e) => _logger.severe('realtime error: $e')); // does also not help...
return subscription;
} catch (e, s) { // does nothing at all...
_logger.severe(
'realtime error DB: $kAppwriteDb; Collection $collectionId;',
e,
s,
);
rethrow;
}
}
Recommended threads
- context deadline exceeded
Hi, in one of my projects i continuously receive context deadline exceeded when trying to reach users API from my local machine: https://fra.cloud.appwrite.io/v...
- function subdomain ssl certs
The generated subdomain isn't getting a valid ssl cert, I was wondering if appwrite automatically generates one or uses a wildcard for *.functions.domain.com? ...
- π Realtime Flutter SDK Crash β Realtime...
**Summary** When using Appwrite Cloud with the Flutter SDK (latest appwrite release: 21.4.0), Realtime crashes with: ```Unhandled async error: type '_Map<String...