-
Notifications
You must be signed in to change notification settings - Fork 605
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
[@capacitor/push-notifications] FCM Token received invalid when app deployed via Play Console or Apple Connect #1556
Comments
@morsagmon Check this, it worked well for me: Guide |
Any solution to this beside using a different plugin? I'm getting the same issue on iOS in development. The token return is not a valid Firebase token |
This issue needs more information before it can be addressed. Please see the Contributing Guide for how to create a Sample App. Thanks! |
It looks like this issue didn't get the information it needed, so I'll close it for now. If I made a mistake, sorry! I am just a bot. Have a great day! |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out. |
Bug Report
Plugin(s)
@capacitor/push-notifications 4.1.2
@capacitor/core 4.7.3
@angular/fire 7.5.0
@ionic/angular 7.0.2
Capacitor Version
Capacitor Doctor:
Platform(s)
iOS
Android
Angular
Current Behavior
When I deploy my app directly from Android Studio locally to Android devices, the token I receive and use for sending notification is OK.
However, when the same App is deployed to the Google Play or to Apple Connect (TestFlight) and installed by the testers from Google Play or TestFlight on their devices - the token received is invalid. It also does not look like a token: it is much shorter and has only all-caps chars. Naturally, notifications fail on these devices (Google log screenshot attached here).
I print the received token immediately to the console, before I take it for DB storage, consider this console.log command in the registration process:
This is the console.log output with the weird token received:
My token: {"value":"D8636BCC62A673B4D574736AFCA1F73AF7C34EBBB7D99A38E05CDB6963FEAE8B"}
On a device with local deployment from Android Studio, the (working) token received looks like this:
My token: {"value":"c0qi_fp5QxmILTqsPVkYXv:APA91bFVDfv_EX8RjC5uB23p9Sb--1tYj4Piob2tuGgslcib8aKLAfFKKlCr7EFcZp7p05Rjb8WwY4X-aHMr-1DDUTDbR_MABTuAr4snxdAWGTwihx7I8VHuCa1VNHcdYU0DnWj33YvP"}
Please help me understand and fix this weird behavior - happening only when the app is deployed through Google Play or Apple Connect.
Expected Behavior
Token received from FCM should be exactly the same and a valid one regardless of the app deployment path - locally from Android Studio / XCode or through the App Store / Google Play.
Other Technical Details
My Angular service code registering with FCM looks like this:
Additional Context
I tried the Google Firebase support, but as I'm not using their FCM SDK, they are not helpful.
The text was updated successfully, but these errors were encountered: