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.

onRegister is never called (on device)

See original GitHub issue

I’ve spent countless hours trying to debug this, and although PushNotification.configure({..}) is called, the onRegister callback never fires — I’ve set requestPermissions to true, and even tried calling it manually; it still never fires. Currently I’m running it on an ASUS Zenfone Android 7.0 device, but just cant seem to get the token

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:15
  • Comments:33 (1 by maintainers)

github_iconTop GitHub Comments

19reactions
jjantcommented, Mar 18, 2018

@Amnesthesia To test, I found using PushNotificationIOS.addEventListener('registrationError', console.log) EXTREMELY useful, it showed me the exact reason of why it was failing.

16reactions
dgurnscommented, Aug 29, 2018

This fixed it for me – I had to go into XCode > Project > Capabilities and turn on Push Notifications. Then the onRegister() callback started firing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native onRegister event not working (iOS)
This function never gets called. It doesn't matter if I have requestPermissions:true or not PushNotification.configure({ onRegister: ...
Read more >
react-native-push-notification Code Examples - Snyk
receivedNotification, // ANDROID ONLY: GCM Sender ID (optional - not required ... (optional) Called when Token is generated (iOS and Android) onRegister: ...
Read more >
Push Notifications - Optimizely
How to configure push notifications to your mobile device for an Optimizely Data Platform (ODP) campaign. ... onRegister callback will not be called...
Read more >
Step by Step guide for Implementing Push Notifications in iOS ...
However, that's not always true. ... “onRegister” is the event that gets called upon the device's successful registration to the firebase ...
Read more >
Push Notification with Amplify | Sumerian school
If you are not working on a project, then the first step is creating one by the ... Android package name can be...
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