Hey, I get a following error: `toastNotification.errorMessages.fcm_unspecified_error` when trying to send an Android notification through Klaviyo dashboard.
I’m using react-native (0.73.6) and klaviyo-react-native-sdk (0.3.1). I’ve integrated also @react-native-firebase/app (19.1.1) and @react-native-firebase/messaging (19.1.1). I can send iOS notifications both from Firebase Console and Klaviyo Console (using APNS tokens). When it comes to Android I can only send notifications from Firebase Console. Trying to send them through Klaviyo I get an error above. Android notifications are enabled in Klaviyo. The error message does not help. It looks like a FCM unspecified error:
However, it’d be weird, cause I can send notifications from Firebase using the same FCM token. Any idea what can be the reason?
Best answer by markpiana
Hi @jsaleniuk ! This issue could be due to a variety of issues, so it’s hard to tell without more information. However, I can try to point you in the right direction.
Can you confirm that you’ve uploaded the correct file for the google service account key and that it has all of the right permissions? This guide should walk you through all of the necessary steps to ensure your key has the right permissions and you’re uploading the right file.
Can you confirm that the token is linked to a profile in Klaviyo? If not, the send will fail.
Is the token that you’re using for the same version of your app for which uploaded credentials in Klaviyo? Some people have run into issues when they try to use a token from a test version of an app but have their production credentials in Klaviyo. Look at the sender ID mismatch error here for more context.
This error looks like it’s happening when you send a preview notification. Have you tried sending an actual campaign to a this device? If it fails when you do, you can look under Recipient Activity > Skipped for the campaign, and you should be able to see more details for the most common errors. Some errors are bucketed under a generic “unable to send” message, so let us know if you still can’t see any more information.
Hi @jsaleniuk ! This issue could be due to a variety of issues, so it’s hard to tell without more information. However, I can try to point you in the right direction.
Can you confirm that you’ve uploaded the correct file for the google service account key and that it has all of the right permissions? This guide should walk you through all of the necessary steps to ensure your key has the right permissions and you’re uploading the right file.
Can you confirm that the token is linked to a profile in Klaviyo? If not, the send will fail.
Is the token that you’re using for the same version of your app for which uploaded credentials in Klaviyo? Some people have run into issues when they try to use a token from a test version of an app but have their production credentials in Klaviyo. Look at the sender ID mismatch error here for more context.
This error looks like it’s happening when you send a preview notification. Have you tried sending an actual campaign to a this device? If it fails when you do, you can look under Recipient Activity > Skipped for the campaign, and you should be able to see more details for the most common errors. Some errors are bucketed under a generic “unable to send” message, so let us know if you still can’t see any more information.
@markpiana thanks for the message. I’ve tried to update react-native sdk to the latest version and actually I noticed I didn’t finish the 1. point correctly before, the Firebase wasn’t actually enabled in Google Cloud Console and the role wasn’t attached. However after finishing those steps I still can’t send the notifications to Android users through Klaviyo dashboard. When trying to send a preview message I get:
“Your notification could not be sent due to an unexpected error. Verify that your Android credentials are correct under your account's Push Notification settings.”
The device token is assigned to the profile and I can use the same token to send notifications through Firebase Console properly.
I’ve tried to create a campaign and actually send it to the user, but then was listed as skipped in the campaign as: “Skipped: Unable to send push notification”
Tried the app both in development and production mode.
Any other ideas what could go wrong there? Do you have access to some more detailed errors perhaps?
@tfab@jsaleniuk we recently released updates to the error messages that are displayed to hopefully make them more clear and provide guidance on how to fix any issues you have. If you are still running into issues, I recommend writing in to Klaviyo Support so that they can take a detailed look at your specific scenario. It is hard to troubleshoot without knowing the specifics of your account.