OneSignal-Cordova-SDK
OneSignal-Cordova-SDK copied to clipboard
Cannot get the FCM Token to receive notifications
Description Cannot get the FCM Token to receive notifications. The app doesn't use any Firebase plugin. The app doesn't use the OneSignal Gradle Plugin.
Device Xiaomi Mi Note 10 Lite - M2002F4LG Android 12SKQ1.210908.001 Miui 13.0.2 Stable
Environment
- @capacitor/android - 3.8.0
- @capacitor/core - 3.8.0
[info] Found 10 Capacitor plugins for android:
- @capacitor/[email protected]
- @capacitor/[email protected]
- @capacitor/[email protected]
- @capacitor/[email protected]
- @capacitor/[email protected]
- @capacitor/[email protected]
- @capacitor/[email protected]
- @capacitor/[email protected]
- @capacitor/[email protected]
- @capacitor-community/[email protected]
[info] Found 13 Cordova plugins for android:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
Steps to Reproduce Issue
The issue is not reproducible.
The issue appears to be only on the device "Xiaomi Mi Note 10 Lite - M2002F4LG". On other devices such as Samsung and Oppo smartphones this issue doesn't happen.
I install the app on the device and doesn't receive notifications, then I clear the app data from settings or uninstall then reinstall the app and then the device receives notifications. If I repeat these steps, maybe, the app won't receive notifications anymore. That's totally random.
When the device doesn't receive notifications the getDeviceState method returns subscribed: true but the OneSignal dashboard returns that the same device isn't subscribed. In this situation I've tried to disable push notifications and then re-enable them, but this didn't solve the issue.
Anything else This is the log of the app unable to get the FCM Token at the startup: OneSignal.log. I've looked on this repository and on "OneSignal/OneSignal-Android-SDK" repository for a similar issue and I've found this Android-681, but nothing on this repository.