Realtime Connection Error After Updating to Latest Server and Flutter SDK Version.
- 0
- Flutter
- Realtime
- Cloud
I get the following error message now when the realtime subscription picks up a new message. There's more to the error but it makes the discord message too long. It used to work before updating sdk and server versions. Thanks for your help!
[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: type '_Map<String, dynamic>' is not a subtype of type 'Iterable<dynamic>' #0 new RealtimeMessage.fromMap (package:appwrite/src/realtime_message.dart:57:47) realtime_message.dart:57 #1 RealtimeMixin._createSocket.<anonymous closure> (package:appwrite/src/realtime_mixin.dart:134:45) realtime_mixin.dart:134 #2 _RootZone.runUnaryGuarded (dart:async/zone.dart:1778:10) zone.dart:1778 #3 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:381:11) stream_impl.dart:381 #4 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:312:7) stream_impl.dart:312 #5 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:798:19) stream_controller.dart:798 #6 _StreamController._add (dart:async/stream_controller.dart:663:7) stream_controller.dart:663 #7 _StreamController.add (dart:async/stream_controller.dart:618:5) stream_controller.dart:618 #8 _RootZone.runUnaryGuarded (dart:async/zone.dart:1778:10) zone.dart:1778 #9 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:381:11) stream_impl.dart:381 #10 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:312:7) stream_impl.dart:312 #11 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:798:19) stream_controller.dart:798
Code Snippet final String databaseId = dotenv.get('APPWRITEDATABASEID'); final String messagesTableId = dotenv.get('APPWRITEMESSAGESCOLLECTION'); final channel = 'databases.$databaseId.tables.$messagesTableId.rows';
_collectionSubscription = _realtime.subscribe([channel]);
_collectionSubscription!.stream.listen((response) {
I am getting this message in my logs so it looks like it's setup correctly. flutter: Received heartbeat response from realtime server.
Recommended threads
- CORS Errors
from origin '<my url>' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Was working fine until tod...
- Whats best practise for Appwrite Cloud?
Appwrite Teams map very nicely to my needs, it is how i group users together. ... I use roles to define permissions. Should I also map a table to each team ? ...
- I am currently seeking opportunities as ...
Hey! 👋 I'm a Shopify guy. Been building stores for 8+ years. Still haven't lost my mind. Barely. I make stores that don't suck fast, smooth, and actually built...