Hi guys,
I'm having some issues, before update to 2.0.1 I was able to call PushNotification.configure from componentWillMount lifecycle method, but now it throws a warning and the app do not load (white screen).

Here's the code:
import PushNotification from 'react-native-push-notification'
module.exports = React.createClass({
componentWillMount() {
PushNotification.configure({
onNotification: function(notification) {
console.log(notification)
},
})
},
...
})
Any idea what could be the problem?
Confirmed @zo0r, I just downgrade to 2.0.0 and the code works, what going on?
@frangeris what version of RN are you using? Android or iOS?
"react": "^15.2.1"
"react-native": "^0.29.0"
Android 4.2.2
@frangeris I can't replicate the error, please try restarting the react-native packager and re-compile the project.
Yeah, it seems was catching something.
rm -rf node_modules/
npm i
npm start -- --reset-cache
react-native run-android
Running the above solved the issue.
I'm seeing this same error, and was unable to solve it with @frangeris solution. I have followed all the requisite steps from the troubleshooting steps. Any Ideas?
Turns out react-native link doesn't seem to do the android side, so I had to follow the manual installation instructions.
and I have the same problem
I have the same problem, using android 6.0
"react-native": "0.49.3",
"react-native-push-notification": "^3.0.1"
any solution?
Getting same error on latest version
I have the same problem, using android 6.0
"react-native": "0.49.3",
"react-native-push-notification": "^3.0.1"
I am using Android.
any solution?
TypeError: RNPushNotification.getInitialNotification is not a function
I am implemented this with Expo ,is this working with Expo Applications?
I have the same problem, using Android 10
"react-native-push-notification": "^3.0.1"
I am using Android 10
any solution?
Most helpful comment
I have the same problem, using android 6.0
"react-native": "0.49.3",
"react-native-push-notification": "^3.0.1"
any solution?