[Bug]: FIREBASE_FCM_INIT_ERROR for Android API < 33
What happened?
Hey there,
We implement "com.onesignal:OneSignal:5.1.2"
through
apply from: "../../node_modules/onesignal-cordova-plugin/build-extras-onesignal.gradle" (version 5.0.5)
in our Ionic project to manage the Push Notifications in our Android app.
Everything was working fine as always untill we realized that Push Notifications doesn't work anymore on any device with Android API lower than 13.
In those versions Logcat throws this log:
OperationRepo.enqueue(operation: {"name":"update-subscription" ....ids..... "type":"PUSH","enabled":false,"address":"","status":"FIREBASE_FCM_INIT_ERROR"}, flush: false)
The higher versions that work doesn't throw such Firebase error.
iOS push notifications work fine.
Just in case we use
com.google.gms:google-services:4.3.15
Steps to reproduce?
1. Install these dependencies
NodeJS : v20.9.0
npm : 10.2.4
Ionic CLI : 7.1.5
Ionic Framework : @ionic/angular 6.7.5
@angular-devkit/build-angular : 15.2.10
@angular-devkit/schematics : 15.2.10
@angular/cli : 15.2.10
@ionic/angular-toolkit : 10.0.0
Capacitor CLI : 5.5.1
@capacitor/android : 5.5.1
@capacitor/core : 5.5.1
@capacitor/ios : 5.5.1
"onesignal-cordova-plugin": "^5.0.5"
"@awesome-cordova-plugins/onesignal": "^6.6.0",
-
Create Android project with Ionic commands
npx cap add android``ionic build && ionic capacitor copy android --no-build && npx cap open android` -
Build project in Android Studio and run it in a device with Android API version < 33
### What did you expect to happen?
I expect Push notifications work with lower Android versions
### OneSignal Android SDK version
5.1.2
### Android version
12, 11, 10
### Specific Android models
```Markdown
Models are irrelevant
Relevant log output
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
@jmonloop we have upgraded the FCM version in OneSignal-Android-SDK 5.1.4 which is included in OneSignal-Cordova-SDK 5.0.6. Can you try upgrading to see if it fixes this issue?
Can you check for other firebase errors before FIREBASE_FCM_INIT_ERROR?
Closing due to no response.