React Native android: Push registration failed

 

Neither in our app nor in the react-native sample app (https://github.com/urbanairship/react-native-module/tree/master/sample) I get push notifications to work on Android. 

Both apps compile and launch but instantly after the launch I get the error that the push registration failed which reoccurs unregulary afterwards. 

The app key for our own app is y-kEswr4SZKB5CtVO2ec8g, the key of the Sample app is WhwPGXUEQ6aSxKstppE7nQ. I checked the airshipconfig.properties where I inserted the app key/app secret-combination for development- and production-version and also the gcm sender id. I also checked the api-key for android in the UA-dashboard and tried both the api_key from the downloaded google-services.json file and the server key from the firebase project settings -> cloud messaging tab (error occurs in both cases). Did I maybe miss a step in the firebase project creation? I only created the project and downloaded the google-services.json but skipped the firebase sdk integration as I assume that this comes with the Urban Airship RN-sdk, right? 

The 1st flight app works.

The error looks as follows:

05-09 13:48:11.471 24290 24849 E AirshipSample - UALib: Push registration failed.

05-09 13:48:11.471 24290 24849 E AirshipSample - UALib: com.urbanairship.push.PushProvider$RegistrationException: GCM registration failed.

05-09 13:48:11.471 24290 24849 E AirshipSample - UALib: at com.urbanairship.push.gcm.GcmPushProvider.getRegistrationToken(GcmPushProvider.java:55)

05-09 13:48:11.471 24290 24849 E AirshipSample - UALib: at com.urbanairship.push.PushManagerJobHandler.onUpdatePushRegistration(PushManagerJobHandler.java:178)

05-09 13:48:11.471 24290 24849 E AirshipSample - UALib: at com.urbanairship.push.PushManagerJobHandler.performJob(PushManagerJobHandler.java:118)

05-09 13:48:11.471 24290 24849 E AirshipSample - UALib: at com.urbanairship.push.PushManager.onPerformJob(PushManager.java:402)

05-09 13:48:11.471 24290 24849 E AirshipSample - UALib: at com.urbanairship.job.Job$1.run(Job.java:91)

05-09 13:48:11.471 24290 24849 E AirshipSample - UALib: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)

05-09 13:48:11.471 24290 24849 E AirshipSample - UALib: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)

05-09 13:48:11.471 24290 24849 E AirshipSample - UALib: at java.lang.Thread.run(Thread.java:818)

05-09 13:48:11.471 24290 24849 E AirshipSample - UALib: Caused by: java.io.IOException: INVALID_SENDER

05-09 13:48:11.471 24290 24849 E AirshipSample - UALib: at com.google.android.gms.iid.zzaf.zzi(Unknown Source)

05-09 13:48:11.471 24290 24849 E AirshipSample - UALib: at com.google.android.gms.iid.InstanceID.zze(Unknown Source)

05-09 13:48:11.471 24290 24849 E AirshipSample - UALib: at com.google.android.gms.iid.InstanceID.getToken(Unknown Source)

05-09 13:48:11.471 24290 24849 E AirshipSample - UALib: at com.urbanairship.push.gcm.GcmPushProvider.getRegistrationToken(GcmPushProvider.java:47)

05-09 13:48:11.471 24290 24849 E AirshipSample - UALib: ... 7 more

 

happened on urbanairship-react-native 1.6.2

Help would be really appreciated :)

Didn't find what you were looking for?

New post

Comments

1 comment

Please sign in to leave a comment.