testing troubleshooting - optimove-tech/Optimove-SDK-Android GitHub Wiki
Mobile Marketing Testing
If you have integrated the Mobile credentials for your app project then you can check the progress of your integration by using the install browser.
Checking installs of your App
When you run your app on a simulator or install your app on a device, you can check that the SDK has been initialized correctly by selecting the app in your Mobile Marketing UI and clicking the Installs
tab to see the ten most recent installs of your app. Click on any install to see more information.
Sending test pushes
Once you have run your app on a device or simulator and found it in the Installs
tab you can send a test push directly to that device,click on an install, click the 'Push' tab and click Send Test Push
.
If you do not receive the push notification, you can check the Error Log for any errors sending the push notification to the native push gateways by accessing Messaging, Configuration, then selecting the Error Log tab.
Troubleshooting
No push open metrics
One of possible causes is overriding PushBroadcastReceiver as mentioned here or using your own FirebaseMessagingService as mentioned here. Please, make sure you are not overriding methods responsible for tracking conversion events. If you are, you need to track them manually. For more details check the relevant sections.
Push registration is not working
If you are using ProGuard to optimize your Java code and you are having issues with push registration, then you need to ensure that your proguard.cfg
file includes the Optimove SDK and required components, something like:
-keep class com.google.android.gms.** { *; }
-dontwarn com.google.android.gms.
-keep class com.google.firebase.** { *; }
-dontwarn com.google.firebase.
-keep class android.support.v7.widget.** { *; }
-dontwarn android.support.v7.widget.
-keep class android.support.v4.widget.Space { *; }
-dontwarn android.support.v4.widget.Space
-keep class com.optimove.** { *; }
-dontwarn com.optimove.**
-keep class okhttp3.** { *;}
-dontwarn okhttp3.**
-keep class oikio.** { *;}
-dontwarn okio.**
-keep class com.huawei.hms.** { *; }
-dontwarn com.huawei.hms.
Proguard is also very sensitive to UTF-8 with BOM encoding, whereas Android tooling will only accept UTF-8. Therefore, an easy way to ensure you don't inadvertently have UTF-8 byte-order-marks in your proguard.cfg
is to use vim via the terminal as follows:
$ vim proguard.cfg
:set nobomb
:wq!
Common FCM Errors
Error message | Meaning |
---|---|
Permission 'cloudmessaging.messages.create' denied on resource '//cloudresourcemanager.googleapis.com/projects/<ANDROID_PACKAGE_NAME' (or it may not exist). |
Firebase Cloud Messaging Admin does not have a cloudmessaging.messages.create permission. Follow the instructions here. |
Sender_ID_mismatch |
The sender ID uploaded to the Optimobile platform doesn't match the sender ID used to generate the push token. |
Firebase Cloud Messaging API has not been used in the project |
This error can sometimes be received from FCM depending on how old your Firebase project is and where in the Google developer console you enabled FCM. To learn more about why this error has occurred, please go to your Google developer console and enable the Firebase Cloud Messaging API. Wait a few minutes for the action to propagate to our systems and retry. |
"status": "INVALID_ARGUMENT", "message": "Android message is too big" |
The message payload is too large. Payload size limit is 4kb - general iOS/Android push limitation. |
"status": "INVALID_ARGUMENT", "message": "Invalid registration" |
Token mismatch (possibly using other apps token for production app or vice versa). |
"status": "INVALID_ARGUMENT", "message": "Invalid package name" |
The app push certificate and package name are mismatched. Verify that the package name saved in Optimobile (Mobile Push Notifications Configuration) matches the package name in the application source code exactly. |
"QUOTA_EXCEEDED" |
Too many requests to a gateway. Contact OptiMobile team. |