Rank 2: Process
When sending a notification within the cloud console (with just a title and description).
I get this error:
Failed sending to target dqv6Wc40bEdfszpousRZwy:APA91bF8kIdBGMjB7Iqu22a1fEN_5lhsf05wY-510sQOV3YS8uvs7zwCM2NuKQgh7iDF15DPAYrq-osYEVaHBEQ1UqlxnOwg0C3Rv4x2SkTUebdE_XVVGkQ with error: Request contains an invalid argument.
What is also interesting is that the target is formatted with a '-' and ':' within the string. I am not sure if this is normal?
Some extra information:
- Initially the notifications work, after registering the token (For 1 or 2 messages)
- I validated that it happens on IOS (can't test on Android currently)
I register the token on device with the following method:
if (Platform.isIOS) {
await FirebaseMessaging.instance.getAPNSToken();
}
final String? token = await FirebaseMessaging.instance.getToken();
if (token == null) {
return null;
}
final String targetId = ID.unique();
final Target target = await account.createPushTarget(
targetId: targetId,
identifier: token,
providerId: 'xxxxxx',
);
Which direction could I look into to debug this and is there a way to know what the invalid argument is?