[ReactNativeJS] null is not an object (evaluating 'c.getInitialNotification')
I am using Amazon SNS for sending out notifications, When I receive notification I get this error and the app crashes. Can someone help me out on this, any help would be appreciated.
Resolved this. I had a configuration issue with package react-native-wix-navigation which led to this.
I am using Amazon SNS for sending out notifications, When I receive notification I get this error and the app crashes. Can someone help me out on this, any help would be appreciated.
What's the error you received?
There were two getPackages method in file MainApplication.java, when I configured package react-native-wix-navigation I didn't removed the earlier version of getPackages, due to this the other package react-async-storage throws an error when i receive notification and the app crashes. This was obviously silly from my side.
I am receiving this exact error message and I have checked the android configurations several times. Any thoughts on what could be the cause?
Update: I was using this package with an ejected Expo app, I believe that was the source of the problems I was having and why I was seeing this message. Basically I had never filled out this section correctly:
`ext {
googlePlayServicesVersion = "
// Other settings
compileSdkVersion = <Your compile SDK version> // default: 23
buildToolsVersion = "<Your build tools version>" // default: "23.0.1"
targetSdkVersion = <Your target SDK version> // default: 23
supportLibVersion = "<Your support lib version>" // default: 23.1.1
}` Because none of those values came populated for me, I could get the googlePlay, firebase, compile and target from the gradle files but I didn't know the others and I think that was causing me fits. Eventually I blew away android and ios directories from my project and did a fresh ejection then that section was populated and I was able to simply add the googlePlay and firebase keys and was able to get a good build and the notification package would configure successfully.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.