Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Notifications web socket #21

Closed
alenas opened this issue Dec 6, 2023 · 0 comments · Fixed by #22
Closed

[BUG] Notifications web socket #21

alenas opened this issue Dec 6, 2023 · 0 comments · Fixed by #22

Comments

@alenas
Copy link

alenas commented Dec 6, 2023

Using the latest version of thingsboard 3.6.1 and version 1.0.7 of dart client
trying to get notifications with a code from examples:
var notificationService = client.getNotificationWebsocketService(); var subscription = NotificationSubscriber.createNotificationsSubscription(notificationService: notificationService, limit: 100); subscription.notificationStream.listen(onData, onError: onError, onDone: onDone, cancelOnError: true); subscription.subscribe();
first data retrieval was successful, but further notifications getting this error:

Error: Expected a value of type 'Iterable', but got one of type 'WhereIterable'

dart-sdk/lib/internal/js_dev_runtime/private/ddc_runtime/errors.dart 294:3 throw
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 127:3 castError
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 818:12 cast
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/classes.dart 652:14 as_C
packages/thingsboard_client/src/model/notification_models.dart 373:58 _onNotificationData
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54 runBody
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 127:5 _async
packages/thingsboard_client/src/model/notification_models.dart 365:35 [_onNotificationData]
packages/thingsboard_client/src/model/notification_models.dart 355:7 onCmdUpdate
packages/thingsboard_client/src/service/notification_websocket_service.dart 219:23 _onMessage
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50
dart-sdk/lib/async/zone.dart 1661:54 runUnary
dart-sdk/lib/async/future_impl.dart 162:18 handleValue
dart-sdk/lib/async/future_impl.dart 846:44 handleValueCallback
dart-sdk/lib/async/future_impl.dart 875:13 _propagateToListeners
dart-sdk/lib/async/future_impl.dart 647:5 [_completeWithValue]
dart-sdk/lib/async/future_impl.dart 721:7 callback
dart-sdk/lib/async/schedule_microtask.dart 40:11 _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5 _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 181:7

@vvlladd28 vvlladd28 linked a pull request Dec 12, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant