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.

cordova.plugins.notification.local.schedule works first time, crashes every other time

See original GitHub issue

WARNING: IF YOU IGNORE THIS TEMPLATE, WE’LL IGNORE YOUR ISSUE. YOU MUST FILL THIS IN!

Provide a general summary of the issue.

iOS

  • Plugin version: cordova-plugin-local-notification 0.9.2
  • Platform: iOS
  • OS version: 12.0.1
  • Device manufacturer / model: iPhone 7 (MNAJ2LL/A)
  • Cordova version (cordova -v): 8.1.2 (cordova-lib@8.1.1)
  • Cordova platform version (cordova platform ls): 8.1.2 (cordova-lib@8.1.1)
  • Plugin config cordova-plugin-local-notification 0.9.2 “LocalNotification”
  • Ionic Version (if using Ionic)

Expected Behavior

Notification pop-ups work every time

Actual Behavior

First notification is successful. Every other notification crashes the app in UNUserNotificationCenter(APPLocalNotification) getNotificationWithID Line 131

Steps to Reproduce

Happens consistently

Context

Code snippet: cordova.plugins.notification.local.schedule({ title: ‘PEARL Alert’, text:inText, smallIcon: ‘res://noti-logo.png’, icon: ‘file://img/noti-logo.jpg’,
vibrate:true, lockscreen:true, foreground: true, actions: [ acts function(data){ console.log("Notification callback: ",data); } ] });

Debug logs

Include iOS / Android logs

  • ios XCode logs 2019-03-03 15:26:27.735880-0500 PEARL[2178:698268] 15:26:27:730 Scheduling notification is moving for item Aircraft 2019-03-03 15:26:27.753769-0500 PEARL[2178:698819] -[NSNull stringValue]: unrecognized selector sent to instance 0x23fc659a0 2019-03-03 15:41:49.352519-0500 PEARL[2178:698819] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[NSNull stringValue]: unrecognized selector sent to instance 0x23fc659a0’ *** First throw call stack: (0x20f793ef8 0x20e961a40 0x20f6ab154 0x20f799810 0x20f79b4bc 0x1003b6904 0x1003abdd0 0x100bdb840 0x100bdcde4 0x100bdfcac 0x100bee1f8 0x100beebe4 0x20f3ae190 0x20f3b0d00) libc++abi.dylib: terminating with uncaught exception of type NSException

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
rnovaskicommented, May 29, 2019

I removed and added the Android platform again and it’s working right now. Thanks!

0reactions
Tawpiecommented, May 29, 2019

I’d add a id, in case you want to deal individually with the notification later or want to schedule another one (with a different id). But glad it was as simple as a remove/reinstall!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cordova Local Notification Repeat after firstAt - Stack Overflow
Cordova plugin notification local to trigger every day after ...
Read more >
cordova-plugin-local-notification-fork - npm
The plugin allows to schedule multiple notifications at once. cordova.plugins.notification.local.schedule([ { id: 1, title: 'My first ...
Read more >
Local notification crashes the iOS app - cordova - Ionic Forum
When i schedule the notification it crashes the app in iOS. is shows error in. APPLocalNotification.m
Read more >
How to Display Ionic 4 Local Notifications (Schedule, Payload ...
Join my special Ionic School today: https://ionicacademy.com/Video Courses, Project Templates, Community & the Support you deserve to learn ...
Read more >
Cordova App Crashed When Local Notification Tried To ...
Local Notifications Plugin Hi I'm trying to build a mobile app that schedules ... when launched the App for the first time only...
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