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.

Crashes in production app for local notifications

See original GitHub issue

Hi, I’ve used this package for an app that only shows local notifications and everything works fine, but Play Console is telling me 10% of the users (~1000 people) are experiencing this crash:

java.lang.NumberFormatException: 
  at java.lang.Integer.parseInt (Integer.java:608)
  at java.lang.Integer.parseInt (Integer.java:643)
  at com.dieam.reactnativepushnotification.modules.RNPushNotificationHelper.toScheduleNotificationIntent (RNPushNotificationHelper.java:70)
  at com.dieam.reactnativepushnotification.modules.RNPushNotificationHelper.cancelScheduledNotification (RNPushNotificationHelper.java:501)
  at com.dieam.reactnativepushnotification.modules.RNPushNotificationHelper.cancelAllScheduledNotifications (RNPushNotificationHelper.java:475)
  at com.dieam.reactnativepushnotification.modules.RNPushNotification.cancelAllLocalNotifications (RNPushNotification.java:210)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:372)
  at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:158)
  at com.facebook.react.bridge.queue.NativeRunnable.run (Native Method)
  at android.os.Handler.handleCallback (Handler.java:808)
  at android.os.Handler.dispatchMessage (Handler.java:101)
  at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:29)
  at android.os.Looper.loop (Looper.java:166)
  at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run (MessageQueueThreadImpl.java:232)
  at java.lang.Thread.run (Thread.java:784)

I’m running cancelAllLocalNotifications() only once in the code and made sure every notification is created with numeric string ids as the doc says, but I’m not sure why would it want to parseInt() them. Since I can’t reproduce it on development I’m not sure how should I debug it. Any ideas? 😃

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:8

github_iconTop GitHub Comments

1reaction
david-saintcommented, Jul 26, 2019

This is urgent

0reactions
github-actions[bot]commented, May 14, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

IOS 10 crashes caused by Local Notification - Apple Developer
Repeatedly scheduling notifications just keeps adding work to the queue and everything backs up more and more. Eventually Springboard will crash. The problem ......
Read more >
iOS App crashes when launched from local notification
I have set up a daily reminder local notification for my app. It works great when the app is in the background. However,...
Read more >
App crashes on local notification tap - MSDN - Microsoft
I have created an application on Xamarin Forms in which I am scheduling local notifications in PCL through a Plugin named Plugin.
Read more >
Detect and diagnose crashes - Android Developers
There are many situations that can cause a crash in your app. Some reasons are obvious, like checking for a null value or...
Read more >
View crashes and application not responding (ANR) errors
Note: After you select a cluster, a separate section is displayed if an issue was found while testing your app to generate a...
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