question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

null is not an object (evaluating 'RNPushNotification.presentLocalNotification')

See original GitHub issue

package.json:

{
  "main": "index.js",
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "web": "expo start --web",
    "start": "react-native start",
    "test": "jest"
  },
  "dependencies": {
    "expo": "~37.0.3",
    "expo-updates": "~0.1.0",
    "react": "~16.9.0",
    "react-dom": "~16.9.0",
    "react-native": "~0.61.5",
    "react-native-gesture-handler": "~1.6.0",
    "react-native-push-notification": "^3.4.0",
    "react-native-reanimated": "~1.7.0",
    "react-native-screens": "~2.2.0",
    "react-native-unimodules": "~0.9.0",
    "react-native-web": "~0.11.7"
  },
  "devDependencies": {
    "@babel/core": "~7.9.0",
    "babel-jest": "~25.2.6",
    "jest": "~25.2.6",
    "react-test-renderer": "~16.9.0"
  },
  "jest": {
    "preset": "react-native"
  },
  "private": true
}

React Native autolink is enabled and firebase messaging is set correctly.

Issue is When I’m logging the console.log(NativeModules.RNPushNotification), It is returning null, I’m using expo’s bare-workflow and when i try to manualy add RN…package in mainapplication.java’s getPagackges, it shows that module is already registered. So the module is registered, but not showing up in NativeModules

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

4reactions
pedrohba1commented, Jun 30, 2020

I’m having the same problem. Works fine with plain react-native, but doesn’t work in expo.

0reactions
LucasFernandez97commented, Nov 18, 2021

Hi guys! I had the same issue, any progress with this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

undefined is not an object (evaluating 'RNPushNotification ...
I have this error: undefined is not an object (evaluating 'RNPushNotification.presentLocalNotification'). Have you some idea about this ?
Read more >
react-native-push-notification is undefined - Stack Overflow
Its all working on iOS but on android I get undefined is not an object(evaluating RNPushnotification.getInitialNotifications).
Read more >
cljsrn 2022-01-29 - Slack Archive
reminder.core=> rnpn #js {:handler #object[NotificationsComponent [object ... null is not an object (evaluating 'RNPushNotification.
Read more >
Discussion of React Native Push Notifications
typeError null:null is not an object evaluating.this.nativeCommandModule.refreshToken. can not ready refreshtoken of undefined. 2 likes Like
Read more >
Typeerror: Undefined Is Not An Object (Evaluating ... - ADocLib
I have this error: undefined is not an object evaluating 'RNPushNotification.presentLocalNotification'. Have you some idea about this ?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found