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!