-
Notifications
You must be signed in to change notification settings - Fork 152
Open
Labels
bugSomething isn't workingSomething isn't working
Description
👟 Reproduction steps
- Set up an Appwrite Realtime subscription on a collection/document channel (e.g., messaging).
- Trigger a document creation event (e.g., send a message that creates a document in the subscribed collection).
- The Realtime WebSocket receives the event of type
"event". - The SDK attempts to parse the incoming event data via
RealtimeMessage.fromMap(). - The app crashes with an unhandled exception.
👍 Expected behavior
The RealtimeMessage.fromMap() factory constructor should correctly parse the incoming WebSocket event data regardless of whether the server sends events or channels as a List or a Map. The Realtime subscription callback should fire with a valid RealtimeMessage object containing the event payload.
👎 Actual Behavior
E/flutter (16642): [ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: type '_Map<String, dynamic>' is not a subtype of type 'Iterable<dynamic>'
E/flutter (16642): #0 new RealtimeMessage.fromMap (package:appwrite/src/realtime_message.dart:57:47)
E/flutter (16642): #1 RealtimeMixin._createSocket.<anonymous closure> (package:appwrite/src/realtime_mixin.dart:100:45)
E/flutter (16642): #2 _RootZone.runUnaryGuarded (dart:async/zone.dart:1778:10)
...
🎲 Appwrite version
Version 2.0.x
💻 Operating system
Windows
🧱 Your Environment
Flutter app using BLoC pattern for state management
Appwrite Realtime subscriptions on tablesdb/tables channels
Standard Appwrite Cloud
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working