Every triggers countless notifications for a minute, then stops - 0.9-beta.3
See original GitHub issueWARNING: IF YOU IGNORE THIS TEMPLATE, WE’LL IGNORE YOUR ISSUE. YOU MUST FILL THIS IN!
Provide a general summary of the issue.
Your Environment
- Plugin version: 0.9-beta.3
- Platform: Android
- OS version: 8.1 and 7.1
- Device manufacturer / model: Nexus 5X
- Cordova version (
cordova -v
): 8.0.0 - Cordova platform version (
cordova platform ls
): android 6.4.0 - Plugin config
- Ionic Version (if using Ionic) 3.9.2, but using the plugin directly, without the ionic-native layer
Expected Behavior
There should be a single notification at the specified time, and the nothing until the following minute/hour/day/week
Actual Behavior
I’m trying to get a daily/weekly notification, but I ran into a bug. When the matching time comes, notifications start firing (i.e. more than one notification per second), until the clock of the phone changes. I fround this issue both using the every match, and every repeat
Steps to Reproduce
// Something like this
let notifications = [
{
id: 0,
title: "title",
text: "text",
icon: "",
smallIcon: "res://"+this.notificationStrings.icon,
wakeup: false,
trigger: {
every: {hour: at.getHours(), minute: at.getMinutes()},
}
}
]
// Or even
let notifications = [
{
id: 0,
title: "title",
text: "text",
icon: "",
smallIcon: "res://"+this.notificationStrings.icon,
wakeup: false,
trigger: {
firstAt: at,
every: "minute",
}
}
]
cordova.plugins.notification.local.schedule(notifications,()=>{
console.log("notification set ", at);
});
Context
Debug logs
02-13 12:59:00.492 1634 1634 E NotificationService: Muting recently noisy 0|com.tapabit.zest|0|null|10079
02-13 12:59:00.705 1634 1634 I chatty : uid=1000 system_server identical 29 lines
02-13 12:59:00.710 1634 1634 E NotificationService: Muting recently noisy 0|com.tapabit.zest|0|null|10079
02-13 12:59:00.717 1634 8564 E NotificationService: Package enqueue rate is 5.6015325. Shedding 0|com.tapabit.zest|0|null|10079. package=com.tapabit.zest
02-13 12:59:00.830 1634 1634 E NotificationService: Muting recently noisy 0|com.tapabit.zest|0|null|10079
02-13 12:59:01.833 1634 1634 I chatty : uid=1000 system_server identical 4 lines
02-13 12:59:02.036 1634 1634 E NotificationService: Muting recently noisy 0|com.tapabit.zest|0|null|10079
02-13 12:59:02.172 2241 9000 E ActivityThread: Failed to find provider info for com.google.android.apps.gsa.testing.ui.audio.recorded
02-13 12:59:02.238 1634 1634 E NotificationService: Muting recently noisy 0|com.tapabit.zest|0|null|10079
--------- beginning of main
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.receiver.AbstractTriggerReceiver.onReceive(AbstractTriggerReceiver.java:65)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Notification.trigger(Notification.java:254)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Notification.schedule(Notification.java:206)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Manager.schedule(Manager.java:100)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.localnotification.TriggerReceiver.onTrigger(TriggerReceiver.java:73)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.receiver.AbstractTriggerReceiver.onReceive(AbstractTriggerReceiver.java:65)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Notification.trigger(Notification.java:254)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Notification.schedule(Notification.java:206)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Manager.schedule(Manager.java:100)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.localnotification.TriggerReceiver.onTrigger(TriggerReceiver.java:73)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.receiver.AbstractTriggerReceiver.onReceive(AbstractTriggerReceiver.java:65)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Notification.trigger(Notification.java:254)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Notification.schedule(Notification.java:206)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Manager.schedule(Manager.java:100)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.localnotification.TriggerReceiver.onTrigger(TriggerReceiver.java:73)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.receiver.AbstractTriggerReceiver.onReceive(AbstractTriggerReceiver.java:65)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Notification.trigger(Notification.java:254)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Notification.schedule(Notification.java:206)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Manager.schedule(Manager.java:100)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.localnotification.TriggerReceiver.onTrigger(TriggerReceiver.java:73)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.receiver.AbstractTriggerReceiver.onReceive(AbstractTriggerReceiver.java:65)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Notification.trigger(Notification.java:254)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Notification.schedule(Notification.java:206)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Manager.schedule(Manager.java:100)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.localnotification.TriggerReceiver.onTrigger(TriggerReceiver.java:73)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.receiver.AbstractTriggerReceiver.onReceive(AbstractTriggerReceiver.java:65)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Notification.trigger(Notification.java:254)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Notification.schedule(Notification.java:206)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Manager.schedule(Manager.java:100)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.localnotification.TriggerReceiver.onTrigger(TriggerReceiver.java:73)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.receiver.AbstractTriggerReceiver.onReceive(AbstractTriggerReceiver.java:65)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Notification.trigger(Notification.java:254)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Notification.schedule(Notification.java:206)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Manager.schedule(Manager.java:100)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.localnotification.TriggerReceiver.onTrigger(TriggerReceiver.java:73)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.receiver.AbstractTriggerReceiver.onReceive(AbstractTriggerReceiver.java:65)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Notification.trigger(Notification.java:254)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Notification.schedule(Notification.java:206)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Manager.schedule(Manager.java:100)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.localnotification.TriggerReceiver.onTrigger(TriggerReceiver.java:73)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.receiver.AbstractTriggerReceiver.onReceive(AbstractTriggerReceiver.java:65)
02-13 12:59:02.658 8854 8854 W System.err: at de.appplant.cordova.plugin.notification.Notification.trigger(Notification.java:254)
...
Continues like this for several MB
Issue Analytics
- State:
- Created 6 years ago
- Comments:31 (2 by maintainers)
Top Results From Across the Web
Notification Triggers - Chrome Developers
Notification Triggers allows you to schedule local notifications that don't require a network connection, which makes them ideal for use ...
Read more >Ionic3 LocalNotification every day specifi hour - Stack Overflow
I've just look at the docs but the code i've tried work only once. //this is my code cordova.plugins.notification.local.schedule({ id: 1, ...
Read more >PRTG Manual: Notification Triggers Settings - Paessler
This notification trigger performs the notification Email and push notification to admin if any sensor is in the Down status for at least...
Read more >Triggers | Notifee
Understand how to use triggers to create notifications that fire ... to cancel the trigger notification and stop any future notifications ...
Read more >Alert repeatedly sends "back to normal" message despite ...
I've got a scheduled query that runs every minute and produces a single ... These messages even when the alert was not recently...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just use : trigger: { every: { hour: 20, minute: 20, second: 15 }, count: 1 },
it will be fired only once at the right time.
Hope it works 4 u too!
Hello everybody!
I had this problem for a long time and I just found out that the master branch has already resolved this issue. All this time I installed it through package.json so I was using the “0.9.0-beta.3” and “0.9.0-beta.2”
So if you use the repository url in the config.xml file, it will work. Or you can fork the project and make your own release.
@katzer can you please make a release with your latest commits.
Thank you in advance.