react-native-push-notification icon indicating copy to clipboard operation
react-native-push-notification copied to clipboard

[ReactNativeJS] null is not an object (evaluating 'c.getInitialNotification')

Open nairabhijit opened this issue 7 years ago • 6 comments

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.

nairabhijit avatar Jun 05 '19 20:06 nairabhijit

Resolved this. I had a configuration issue with package react-native-wix-navigation which led to this.

nairabhijit avatar Jun 06 '19 11:06 nairabhijit

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?

ddthuan87 avatar Jun 07 '19 02:06 ddthuan87

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.

nairabhijit avatar Jun 07 '19 07:06 nairabhijit

I am receiving this exact error message and I have checked the android configurations several times. Any thoughts on what could be the cause?

jSkrills avatar Jun 29 '19 19:06 jSkrills

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 = "" // default: "+" firebaseVersion = "" // default: "+"

// 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.

jSkrills avatar Jun 30 '19 18:06 jSkrills

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.

github-actions[bot] avatar Jun 30 '20 00:06 github-actions[bot]