joplin
joplin copied to clipboard
No notification/ alarm on joplin desktop (linux)
Environment
Joplin version: 2.8.8-1 Platform: Manjaro Linux OS specifics: Installed joplin-appimage 2.8-8-1 via pacman
Steps to reproduce
- Create a new todo entry [ ] Test todo
- Set alarm e.g. 16:20
- Wait for the selected time
- Nothing happens
Describe what you expected to happen
I expected a notification but received nothing.
Logfile
2022-07-14 16:20:00: "AlarmServiceDriverNode::scheduleNotification: Triggering notification (default):", "{"appID":"net.cozic.joplin-desktop","title":"Test Todo","icon":"/tmp/.mount_joplin8YNvHq/resources/build/icons/512x512.png","message":"bla"}"
2022-07-14 16:20:00: "AlarmServiceDriverNode::scheduleNotification: node-notifier response:", "Error: Command failed: notify-send "Test Todo" "bla" --icon "/tmp/.mount_joplin8YNvHq/resources/build/icons/512x512.png" --expire-time "10000"
notify-send: symbol lookup error: notify-send: undefined symbol: notify_notification_get_activation_token
Code: 127
Error: Command failed: notify-send "Test Todo" "bla" --icon "/tmp/.mount_joplin8YNvHq/resources/build/icons/512x512.png" --expire-time "10000"
notify-send: symbol lookup error: notify-send: undefined symbol: notify_notification_get_activation_token
at ChildProcess.exithandler (child_process.js:328:12)
at ChildProcess.emit (events.js:376:20)
at maybeClose (internal/child_process.js:1055:16)
at Socket.<anonymous> (internal/child_process.js:441:11)
at Socket.emit (events.js:376:20)
at Pipe.<anonymous> (net.js:673:12)", "undefined"
On System -> Applications -> Joplin -> Notifications are also enabled
is there a notification server running? Try running this:
notify-send "This is a Notification"
If this does not return a notification then most probably you don't have a notification server running.
Also, please attach some more info regarding your system like the wm you are using.
You can run inxi
for this.
inxi -F
or neofetch
is there a notification server running? Try running this:
notify-send "This is a Notification"
If this does not return a notification then most probably you don't have a notification server running.
Also, please attach some more info regarding your system like the wm you are using. You can run
inxi
for this.inxi -F
or
neofetch
Thanks!
With that command I receive a notification. So there is a notification server running?
And I use Xorg
:thinking: Can you provide the output of:
grep -r org.freedesktop.Notifications /usr/share/dbus-1/services/
And also can you try the same with the .appImage?
There is no output with this command. Is that right?
There is no output with this command. Is that right?
🤔 Run the test notification command and xwininfo
just after that and paste the output.
I suspect that the problem is with the AUR package and not Joplin. As AppImage works fine.
The output of: notify-send "This is a Notification" xwininfo
is:
Is that correct? I have installed the joplin-appimage (AUR) via Manjaro package manager pacman.
The output of:
notify-send "This is a Notification" xwininfo
is:
Is that correct? I have installed the joplin-appimage (AUR) via Manjaro package manager pacman.
xwininfo
is a command.
Run this:
notify-send "This is a Notification" && xwininfo
Did you tried the appImage? Joplin AUR package is not maintained by Joplin devs. You can try asking the same in the comments of Joplin AUR page.
I deinstalled joplin-appimage via package manager. And I used this script to install the original joplin. But same behavior - no notification.
xwininfo output by clicking on notification:
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, feel free to create a new issue with up-to-date information.
Ran into the exact same bug today on Fedora 39 and Joplin 2.13.12 installed app Image via the installer
https://github.com/laurent22/joplin/blob/e027cdce265b38f25c8fd298b5d9050f6a70af08/Joplin_install_and_update.sh#L1
In the console log I got the same error as in https://github.com/laurent22/joplin/issues/6669#issue-1304870212
notify-send: symbol lookup error: notify-send: undefined symbol: notify_notification_get_activation_token
What is really weird in that notify-send works just fine in the terminal.
$ notify-send "test" "just testing" --icon "/tmp/.mount_Joplin8uOpfQ/resources/build/icons/512x512.png" --expire-time "10000"
$ echo $?
0
I also tried reproducing by calling the [email protected]
https://github.com/laurent22/joplin/blob/e027cdce265b38f25c8fd298b5d9050f6a70af08/packages/lib/package.json#L74
like we do in the code
https://github.com/laurent22/joplin/blob/e027cdce265b38f25c8fd298b5d9050f6a70af08/packages/lib/services/AlarmServiceDriverNode.ts#L61
node-notifier displays the notification just fine when used standalone as well:
const notifier = require("node-notifier")
notifier.notify({
appID: 'net.cozic.joplin-desktop',
icon: '/tmp/.mount_Joplin8uOpfQ/resources/build/icons/512x512.png',
title: 'My notification',
message: 'Hello, there!'
}, function(err, res, meta){
if(err)
console.log("error is: ", err);
if(meta)
console.log("meta is: ", meta);
if(res)
console.log("res is: ", res);
});
So what gives why does it fail when called within Joplin?
It complains about notify_notification_get_activation_token
which I'm not sure about.
Is that something that Joplin needs to do?
The only reference to that symbol that I could find is here:
https://github.com/GNOME/libnotify/blob/7849c5ddda75250e30a6cbb50ecd9c171b7db532/tools/notify-send.c#L173
Ran into the exact same bug today on Fedora 39 and Joplin 2.13.12 installed app Image via the installer
I'm re-opening this.
Note that it works for me on Ubuntu 23.10 (Joplin 2.13.12 -- Snap version).
node-notifier displays the notification just fine when used standalone as well:
Another thing to try is calling alarmDriver.scheduleNotification
directly from Joplin's development tools:
const AlarmServiceDriverNode = require('@joplin/lib/services/AlarmServiceDriverNode').default;
const packageInfo = require('./packageInfo.js');
const alarmDriver = new AlarmServiceDriverNode({ appName: packageInfo.build.appId });
alarmDriver.setService({ logger: () => Logger.create('Test') });
alarmDriver.scheduleNotification({ date: new Date(Date.now() + 50), title: 'Testing...' }); // 50 ms delay
I'm re-opening this.
Note that it works for me on Ubuntu 23.10 (Joplin 2.13.12 -- Snap version).
Appreciate you looking into this again! Hopefully we can get to the bottom of this and get it resolved.
Another thing to try is calling alarmDriver.scheduleNotification directly from Joplin's development tools:
I will give this a shot and report back.
Another thing to try is calling
alarmDriver.scheduleNotification
directly from Joplin's development tools:const AlarmServiceDriverNode = require('@joplin/lib/services/AlarmServiceDriverNode').default; const packageInfo = require('./packageInfo.js'); const alarmDriver = new AlarmServiceDriverNode({ appName: packageInfo.build.appId }); alarmDriver.setService({ logger: () => Logger.create('Test') }); alarmDriver.scheduleNotification({ date: new Date(Date.now() + 50), title: 'Testing...' }); // 50 ms delay
@personalizedrefrigerator
After running the above in the dev console looks like we get the same error message as before:
AlarmServiceDriverNode::scheduleNotification: Triggering notification (default):
{appID: 'net.cozic.joplin-desktop', title: 'Testing...', icon: '/tmp/.mount_JoplinJDOcmL/resources/build/icons/512x512.png',message: '-'}
appID: "net.cozic.joplin-desktop"
icon: "/tmp/.mount_JoplinJDOcmL/resources/build/icons/512x512.png"
message: "-"
title: "Testing..."
Test: AlarmServiceDriverNode::scheduleNotification: node-notifier response: Error: Command failed: notify-send "Testing..." "-" --icon "/tmp/.mount_JoplinJDOcmL/resources/build/icons 512x512.png" --expire-time "10000"
notify-send: symbol lookup error: notify-send: undefined symbol: notify_notification_get_activation_token
at __node_internal_genericNodeError (node:internal/errors:867:15)
at ChildProcess.exithandler (node:child_process:430:12)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1091:16)
at Socket.<anonymous> (node:internal/child_process:449:11)
at Socket.emit (node:events:513:28)
at Pipe.<anonymous> (node:net:322:12) undefined
Same problem here, Ubuntu 23.10 (installed Joplin using bash script as recommended on installation instructions)
Joplin log shows:
notify-send: symbol lookup error: notify-send: undefined symbol: notify_notification_get_activation_token
Uninstalling and reinstalling via snap, it works.
I think this fails (also on my system and probably others) due to a library version mismatch. There is an outdated libnotify.so.4 in the mount image (Appimage version 2.14.17 is where I encountered it) of Joplin that is linked first. This is a conjecture at the moment since I have not modified the Appimage yet to remove the offending library (version from 2019) . My system has its own libnotify.so.4 that matches the version of the installed libnotify-bin package (0.8.1, circa 2022) but it is never reached due to the precedence of the (outdated) library in the appimage. The error:
node-notifier response: Error: Command failed: notify-send "Full S.... Season ....." "-" --icon "/tmp/.mount_Joplin5Hrjfau/resources/build/icons/512x512.png" --expire-time "10000"
notify-send: symbol lookup error: notify-send: undefined symbol: notify_notification_get_activation_token.
The symbol (function) that is being missed by notify-send (when called by node-notifier) is NOT present in the old library (libnotify.so.4 in the appimage) but IS present in the system libnoitify.so.4. I have confirmed that so I am 99 % sure that removing the old libnotify.so.4 from the appimage (if possible) or updating it will fix the issue. I am developing an accessory for Joplin that relies on successfully emitting session notifications and would appreciate having this fixed officially.
To follow up, I can confirm that the issue (which has persisted in the subsequent 2.14.19 and 2.14.20 Appimage releases??) is eliminated as I expected when the outdated libnotify.so.4 in the appimage is removed. I used appimagetool to repackage the Joplin Appimage (2.14.20) without the library in question and Joplin then successfully finds the system libnotify.so.4, resulting in a notification. Hopefully someone will update the official appimages soon (either drop the lib or replace with an updated one, IMHO better to drop it since (AFAIK) it seems to be needed only by notify-send, which is external to the appimage). With notifications working properly in GNOME, one can check out this GNOME shell extension, which reads out loud the notifications emitted by Joplin.