Closed grahammcculloch closed 5 years ago
@grahammcculloch I believe this is fixed in the 0.12.2 release https://github.com/OneSignal/OneSignal-Gradle-Plugin/releases/tag/0.12.2
If you are still seeing the issue please feel free to reopen this issue. Thanks.
OneSignal push notifications were working fine when I was using React Native v0.55.4. After upgrading React Native to 0.59.8 (and several other NPM dependencies) I now get a runtime error (
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.google.firebase.iid.FirebaseInstanceId.getToken(java.lang.String, java.lang.String)' on a null object reference
, see below for stack trace) when trying to initialize OneSignal (callingOneSignal.init(<MY_KEY>);
from my app).Analysing the changes, I noticed one particular change which I think might be significant:
Back when my OneSignal push notifications were working,
firebase-messaging
would resolve to v12.xI'm posting in this repo because I see that the onesignal-gradle-plugin has logic to decide which version of firebase to resolve to and I wonder if my particular set of dependencies has exposed an issue with this? Or maybe I'm way off the actual problem!!
Possibly relevant: I also have dependencies on
countly-sdk-react-native
andappcenter
Project Setup
build.gradle
app/build.gradle
Full Error
Dependency Tree
(Abbreviated - just the
releaseCompileClasspath
section. Can provide the whole output if required!)