Closed vikram25897 closed 4 years ago
I have added FCM server key on the dashboard, and I am trying to register my device for push notifications from channels like this: await client.addPushChannels(fcmToken, PushGateway.fcm, channelSet);
await client.addPushChannels(fcmToken, PushGateway.fcm, channelSet);
However I am receiving this error:
E/flutter (13240): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PubNubException: null error: Invalid type argument E/flutter (13240): #0 new PubNubException (package:pubnub/src/core/exceptions.dart:6:29) E/flutter (13240): #1 getExceptionFromDefaultResult (package:pubnub/src/dx/_utils/exceptions.dart:31:10) E/flutter (13240): #2 getExceptionFromAny (package:pubnub/src/dx/_utils/exceptions.dart:6:12) E/flutter (13240): #3 defaultFlow (package:pubnub/src/dx/_utils/default_flow.dart:34:11) E/flutter (13240): E/flutter (13240): #4 PushNotificationDx.addPushChannels (package:pubnub/src/dx/push/push.dart:74:12)
I also tried calling it other way like:
await client.device(fcmToken).registerToChannels(channelSet, PushGateway.fcm);
But the error stays the same. Any ideas about what could it be?
Hi @vikram25897! I have started looking into your issue. Thanks for reporting it!
@vikram25897 this issue is addressed in v1.4.2
I have added FCM server key on the dashboard, and I am trying to register my device for push notifications from channels like this:
await client.addPushChannels(fcmToken, PushGateway.fcm, channelSet);
However I am receiving this error:
I also tried calling it other way like:
await client.device(fcmToken).registerToChannels(channelSet, PushGateway.fcm);
But the error stays the same. Any ideas about what could it be?