4

I am working with a React-Native Android application that is using react-native-fcm. We are getting notifications generated by our app server that notify a user that they are receiving a shipment of product. When we test this feature in debug mode, it works perfectly fine. Every time a release build is made and uploaded to the Play store though, we fail to get notifications. We don't even get Firebase tokens. I will get errors back from Firebase on our app server saying 'NotRegistered'.

What we have:

  • I created a separate project using the Firebase console to generate the correct google-services.json file (and the package names match).

  • google-services.json is in the correct directory (projectname/android/app)

  • I am using the HTTP version of cloud messaging, and I am using the legacy server key provided in the Firebase console.

  • Using version 11.0.4 of both Firebase (tried both core and cloud-messaging libraries) and google-play-servies-base, with apply plugin: 'com.google.gms.google-services' at the bottom of the gradle.build file in the android/app directory.

  • Google services version is 3.1.0 in the build.gradle file in the android directory

  • minifyEnabled is set to false, so ProGuard shouldn't be excluding Firebase when the release version is built.

This only seemed to be a problem once we switched to JavaScript. I didn't have this issue when the implementation of the app was all in Java. Any help is greatly appreciated.

Thanks!

Kiith Nabaal
  • 366
  • 2
  • 5
  • 16
  • I usually have these issues when proguard is stripping too many classes. Do you see any error in the android log? (You might ignore this, as I just read you have minify disabled) – sebastianf182 Nov 17 '17 at 02:28
  • Sorry for the delayed response. As you noticed, yes I do have minify disabled so I can't see ProGuard being an issue. I don't have a great logging system at this time so I won't see any Firebase issues specifically. – Kiith Nabaal Nov 17 '17 at 20:16
  • Hi everyone, I am no longer with this company, and therefore can no longer verify if anyone's answers are correct. Once I get enough points I will close the question. Thanks! – Kiith Nabaal Apr 10 '18 at 19:17

0 Answers0