I tried to test the firebase push notification with the stream-cli for my android device
On flutter mobile, i have connected my user and add the firebase messaging token to the StreamChatClient.
await client.connectUser(
User(
id: userId, extraData: {'name': name, 'image': profile?.avatarUrl}),
token,
);
log('connect chat user $userId');
final firebaseMessagingToken =
await FirebaseMessaging.instance.getToken();
log('add user device to push notification service');
if (firebaseMessagingToken != null) {
log('firebase messaging token $firebaseMessagingToken');
await client.addDevice(
firebaseMessagingToken, PushProvider.firebase);
}
After that, i try to test a push notif with the right userId (copied from the log in my flutter app) with the cli like below
stream-cli chat test-push --user-id dQIECWpyHbTaEsXmA1rp8e0ETyf2 --app epeak_production
but i got the following error
Error: CheckPush failed with error: "User has no enabled devices associated"