Joplin: Reminders do not show notifications

Created on 22 Mar 2018  路  46Comments  路  Source: laurent22/joplin

Operating system

  • [ ] Windows
  • [ ] macOS
  • [ ] Linux
  • [x] Android
  • [ ] iOS

Application

  • [ ] Desktop
  • [x] Mobile
  • [ ] Terminal

Hi,

It looks like that reminders do not display a message in the notification status.
It may also happened on any OS, but I just notice it this morning on the mobile ;)

Regards.

bug

All 46 comments

Do you mean there's no notification or there's no message in the notification? If you had a screenshot that might help (assuming there's something to take a screenshot of). For me it's working on Android.

I mean there is no message in the notification bar at the top of the phone even no sound.
I could set several reminders but none of them appear in the notification status bar :/
I have Android 7 on Asus zen phone

Does it work if you set a short delay for the notification? Eg 2 min later

Hi,
No I tried that too to be sure. But nothing happens

I made others tests.
It works. May be I postponed alarm on tasks that were checked.
I tried with checked and unchecked tasks , when unchecked, the notification Comes.

Yes that might be why. Here are the conditions to get the notification to trigger - https://github.com/laurent22/joplin/blob/master/ReactNativeClient/lib/models/Note.js#L457

I met a new case where the notification does not appear in the notification bar.
I didn't know yet why.
But I've setup a alarm the morning for the evening and it wasn't coming.

Alarm does not work (display notification) when mode "do not disturb" is on
But it should, this mode mutes the sound but does not block notification, usually.

Another notice. I setup the do not disturb at 22:00 and the alarm in Joplin at 21:00 but it never comes up too. As if the winterr hour remained.

I have a similar issue on my phone, but not on my tablet. If I create a new todo and set the alarm for two minutes time, then lock the device, my phone does nothing whereas the tablet displays the notification correctly. The notification never appears on the phone.

My phone is running Android 8.1.0 and the tablet is on Android 6.0.1.

@foxmask what Android version is your phone on?

Hi @jdenly I own an android 7 on Asus phone/tablet

I've looked a bit further into how the notifications are implemented and I suspect the Android 8 problem might be this issue in the react-native-push-notifications library:

https://github.com/zo0r/react-native-push-notification/issues/575

No idea what the issue might be with Android 7 though, sorry.

@foxmask in #574 you said you think it's because of Don't Disturb mode. I tried it with DD mode on and off. Same problem.

Log on android 8 (if it help to resolve):

11-21 09:12:00.001 1087 1221 W AlarmManager: mIsScreenOn is: true, WAKEUP alarm trigger action = null package name is: net.cozic.joplin
11-21 09:12:00.011 1087 1087 V AlarmManager: Received TIME_TICK alarm; rescheduling
11-21 09:12:00.026 1087 1087 I HwAlarmManagerService: hwSetAlarm listenerTag: time_tick
11-21 09:12:00.028 8304 8304 I RNPushNotification: NotificationPublisher: Prepare To Publish: 22, Now Time: 1542766320027
11-21 09:12:00.029 1381 1381 W HwKeyguardDragHelper: AnimationBlocked
11-21 09:12:00.033 8304 8304 W Bundle : Key number expected String but value was a java.lang.Double. The default value was returned.
11-21 09:12:00.033 8304 8304 W Bundle : Attempt to cast generated internal exception:
11-21 09:12:00.033 8304 8304 W Bundle : java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.String
11-21 09:12:00.033 8304 8304 W Bundle : at android.os.BaseBundle.getString(BaseBundle.java:1093)
11-21 09:12:00.033 8304 8304 W Bundle : at com.dieam.reactnativepushnotification.modules.RNPushNotificationHelper.sendToNotificationCentre(RNPushNotificationHelper.java:182)
11-21 09:12:00.033 8304 8304 W Bundle : at com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher.onReceive(RNPushNotificationPublisher.java:24)
11-21 09:12:00.033 8304 8304 W Bundle : at android.app.ActivityThread.handleReceiver(ActivityThread.java:3695)
11-21 09:12:00.033 8304 8304 W Bundle : at android.app.ActivityThread.-wrap18(Unknown Source:0)
11-21 09:12:00.033 8304 8304 W Bundle : at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1979)
11-21 09:12:00.033 8304 8304 W Bundle : at android.os.Handler.dispatchMessage(Handler.java:108)
11-21 09:12:00.033 8304 8304 W Bundle : at android.os.Looper.loop(Looper.java:166)
11-21 09:12:00.033 8304 8304 W Bundle : at android.app.ActivityThread.main(ActivityThread.java:7425)
11-21 09:12:00.033 8304 8304 W Bundle : at java.lang.reflect.Method.invoke(Native Method)
11-21 09:12:00.033 8304 8304 W Bundle : at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
11-21 09:12:00.033 8304 8304 W Bundle : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
11-21 09:12:00.034 1381 1381 E DateView: DateView,mCurrentTime: 1542766320033
11-21 09:12:00.037 1381 1381 I EventCenter: EventCenter Get :android.intent.action.TIME_TICK
11-21 09:12:00.041 8304 8304 E NotificationManager: notifyAsUser: tag=null, id=22, user=UserHandle{0}
11-21 09:12:00.049 1087 5617 D HwNotificationManagerService: recognize: not in china
11-21 09:12:00.051 1087 5617 E NotificationService: No Channel found for pkg=net.cozic.joplin, channelId=null, id=22, tag=null, opPkg=net.cozic.joplin, callingUid=10181, userId=0, incomingUserId=0, notificationUid=10181, notification=Notification(channel=null pri=1 contentView=null vibrate=[0,300] sound=content://settings/system/notification_sound defaults=0x4 flags=0x10 color=0x00000000 category=call vis=PRIVATE)
11-21 09:12:00.051 1381 1381 W HwKeyguardDragHelper: AnimationBlocked

On Windows 10 Joplin also doesn't work.

I have the same issue. Recently my phone got an update from Android 7 to 8.1. Since then all the notifications of my reminders doesn't seem to work on my phone anymore, whereas they work on my tablet (Android 6) and my PC (Linux Manjaro). Before the update everything worked. Has this something to do with the way android 8 handles push notifications?

I think I found the reason. I got the same failure in my log as @AlexIs72 . And the following phrases are the key to the problem:
11-29 11:59:00.018 10181 26350 26350 W Bundle : Key number expected String but value was a java.lang.Double. The default value <null> was returned.
11-29 11:59:00.041 1000 2674 13912 E NotificationService: No Channel found for pkg=net.cozic.joplin, channelId=null, id=34, tag=null, opPkg=net.cozic.joplin, callingUid=10181, userId=0, incomingUserId=0, notificationUid=10181, notification=Notification(channel=null pri=1 contentView=null vibrate=[0,300] sound=content://settings/system/notification_sound defaults=0x4 flags=0x10 color=0x00000000 category=call vis=PRIVATE)

With Android 8 came a new notification function, which forces the apps to use a so called notification channels. See: https://developer.android.com/guide/topics/ui/notifiers/notifications#ManageChannels

But the logs show, that joplin doesn't have such a channel id and gets the value null, so the reminders are not displayed.

@laurent22 Can you please implement this channel id into the android app?

On macOS 10.14.1 the notifications also doesn't work.

Edit: They do, but not always.

Can't wait testing it

Version 10.0.179
Still no notifications.

``
12-18 16:05:00.010 1087 1087 V AlarmManager: Received TIME_TICK alarm; rescheduling
12-18 16:05:00.020 1087 1087 I HwAlarmManagerService: hwSetAlarm listenerTag: time_tick
12-18 16:05:00.052 1381 1381 E DateView: DateView,mCurrentTime: 1545123900051
12-18 16:05:00.071 11993 16902 E NotificationManager: notifyAsUser: tag=null, id=1323344117, user=UserHandle{0}
......
12-18 16:05:00.094 1087 2694 E NotificationService: No Channel found for pkg=net.cozic.joplin, channelId=com.google.firebase.messaging.default_notification_channel_id, id=1323344117, tag=null, opPkg=net.cozic.joplin, callingUid=10181, userId=0, incomingUserId=0, notificationUid=10181, notification=Notification(channel=com.google.firebase.messaging.default_notification_channel_id pri=0 contentView=null vibrate=null sound=null defaults=0x0 flags=0x0 color=0x00000000 vis=PRIVATE)
12-18 16:05:00.101 1381 1381 I EventCenter: EventCenter Get :android.intent.action.TIME_TICK
....

12-18 16:07:13.130 1087 2436 W ActivityManager: Scheduling restart of crashed service net.cozic.joplin/org.chromium.content.app.SandboxedProcessService3 in 1000ms

``

Weird, I did specify a channel. Will check.

It works for me actually. @AlexIs72, if you go to Settings > Applications > Joplin. Are the notifications allowed for the app?

Yes, notifications is allowed. On Android 4 and 7 all ok. I have problems only on Android 8 (Honor 8). I will test further

I don't have notification too (android 8.1)

Ok seems to be Android 8 so, as I didn't test with it. Will check, thanks for the feedback.

I'll try on another device on Android 7

Notifications don't work for me either. I got again the same log as @AlexIs72.
I looked a bit further into it and I think there are 2 parameters missing.

A user at stackoverflow stated, that notifications require 4 parameters. your application uses only setChannelId and setSmallIcon() (see line 26&27 in AlarmServiceDriver.android.js) I think setContentTitle() and setContentText() are also required for displaying notifications on Android 8.

But since I'm not an expert in programming android apps, I'm not shure about this. Hopefully it helps ;)

1.0.119
Windows 10

No notifications also

On Android 7 , Seems to work when reminder is set for a few minutes later not for hours

On Android 7 , Seems to work when reminder is set for a few minutes later not for hours

How many hours was it specifically? (so that I can test directly with that)

I think I've fixed it for Android 8.x - could someone give it a try with this APK?

https://github.com/laurent22/joplin-android/releases/download/android-v1.0.181/joplin-v1.0.181.apk

I've tested the new version and it works fine for me. Thank you for all the effort you've put in solving this issue.

Yes, it's work for me, but alarm signal delays on 1-2 minutes.
Joplin stopped working on Android 4 - I see white screen only

I've set an alarm at 7h for 8h, and nothing happened.
I make another try for 9h30.

edit at 9h43: no notification in the android status bar

edit at 9h43: no notification in the android status bar

and that's with the latest version 181?

edit at 9h43: no notification in the android status bar

and that's with the latest version 181?

i installed 181 yesterday evening, this is the behavior with version 181

todo alarm doesn't work on Linux Ubuntu Gnome

i set an alarm for 2mn later: ok,
i set an alarm for 30mn later : ko
i set an alarm for 1h later : ko

with joplin android version 1.0.234

maybe that the update for "react-native-push-notification" provides the behavior to blink the led notification like the issue #377 I closed earlier today

This is working for me. If it doesn't for you, feel free to post again with Android version.

i'm going to explain the feeling of how things happened.

When the smartphone goes in standby (en veille quoi), nothing happened at all for me, what ever the next few minutes or not. Once the screen is off it's over.

the alarm work only if 3 things

  • the screen is on
  • the memory has not been cleaned (by selecting the button of "windows stack" at bottom of the smartphone and cleaning all of them to free some memory)

last notice : when I set alarm on the smartphone then sync , then on the linux, once I synced, nothing happened too, and joplin is still opened and present in the task bar.

  • android version 8.1.0
  • joplin version 1.0.241

@foxmask, could it be the energy saver of your phone that somehow breaks the notifications? If you have that feature, did you try to white list Joplin? Normally it shouldn't change anything since the app uses system notifications, which once setup are independent of the app, but it could still be worth a try.

It seems to be that behavior with the energy saver. I could have all the notifications.
It's very annoying and very fragile (i don't speak about joplin but android itself). I don't know if my habits won't prevent the notif to work.

thanks for the tips

may I open another issue if the reminder dont work on PC or do we keep this one opened ? ;)

Another issue would make sense as the notification systems are quite different.

Notification doesn鈥檛 work even on iPad, iPhone nor windows10.

My configuration: iPhone 7, iOS 12.3.1, Joplin 10.0.35.

On iOS, sometimes a notification appears right after creating a todo that has an alarm. But there is never a notification at the time of the alarm, though in the settings Joplin is allowed to do all notification types.

This is how Joplin's iOS notification looks like: https://www.dropbox.com/s/to3iafj06dif326/joplin%20notification%20iOS.png?dl=0

This is how a typical iOS notification looks like: https://www.dropbox.com/s/5uti0pwluw4qw1h/Apple%20reminders%20notification%20iOS.jpeg?dl=0

On iOS, notifications of various apps all look similar to the one above. I personally never saw a notification like the one of Joplin and, as explained above, it does not appear at the time of the alarm. It also does not appear in iOS' notification area. Maybe the notification library that is used on iOS does not generate native iOS notifications?

On MacOS, sometimes a notification appears at the configured alarm time. Unfortunately, even if it appeared reliably, it wouldn't be of any use, because it just appears shortly and does not appear in the notification area of MacOS, like e. g. notifications of Wunderlist. My configuration: MacBook Pro (13-inch, 2017, Four Thunderbolt 3 Ports) MacOS 10.14.5

Don't get me wrong, I'm really a fan of Joplin, using it for lots of stuff and I really want to use it also for todos with notifications. It's a pity that it does not work, at least in my configuration.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GuyOlivier picture GuyOlivier  路  37Comments

gituser94x54102 picture gituser94x54102  路  38Comments

dimyself picture dimyself  路  308Comments

SamuelBlickle picture SamuelBlickle  路  46Comments

harmancasvi picture harmancasvi  路  34Comments