deltachat-desktop
deltachat-desktop copied to clipboard
Crash when clicking on a system notification bubble
- Operating System (Linux/Mac/Windows/iOS/Android): Artix Linux LXDE
- Delta Chat Version: 1.32 Linux64 Appimage and/or compiled via AUR, both tested
- Expected behavior: DeltaChat opens to message refered in notification
- Actual behavior: DeltaChat exits.
- Steps to reproduce the problem: Click on a notification bubble text for a new incoming message
- Screenshots:
- Logs:
The output of strace DeltaChat-1.32.0.AppImage:
write(2, "[710:0810/155150.926573:ERROR:li"..., 203[710:0810/155150.926573:ERROR:libnotify_notification.cc(50)] notify_notification_close: domain=1236 code=36 message="GDBus.Error:org.freedesktop.Notifications.InvalidId: Invalid notification identifier"
) = 203
--- SIGTRAP {si_signo=SIGTRAP, si_code=SI_KERNEL} ---
+++ killed by SIGTRAP +++
Trace/breakpoint trap
The output of strace deltachat (vers:1.32.0 self compiled) :
[847:0810/155622.444550:ERROR:libnotify_notification.cc(51)] notify_notification_close: domain=1236 code=36 message="GDBus.Error:org.freedesktop.Notifications.InvalidId: Invalid notification identifier"
[{WIFSIGNALED(s) && WTERMSIG(s) == SIGTRAP}], 0, NULL) = 847
rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f311fd4e8e0}, {sa_handler=0x555a462f8100, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f311fd4e8e0}, 8) = 0
ioctl(2, TIOCGWINSZ, {ws_row=24, ws_col=247, ws_xpixel=0, ws_ypixel=0}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
newfstatat(AT_FDCWD, "/home/test/.terminfo", 0x555a47e315f0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/share/terminfo", {st_mode=S_IFDIR|0755, st_size=84, ...}, 0) = 0
access("/usr/share/terminfo/x/xterm-256color", R_OK) = 0
openat(AT_FDCWD, "/usr/share/terminfo/x/xterm-256color", O_RDONLY) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=3852, ...}, AT_EMPTY_PATH) = 0
read(3, "\36\2%\0&\0\17\0\235\1Z\6xterm-256color|xterm"..., 32768) = 3852
read(3, "", 28672) = 0
brk(0x555a47e54000) = 0x555a47e54000
close(3) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCGWINSZ, {ws_row=24, ws_col=247, ws_xpixel=0, ws_ypixel=0}) = 0
ioctl(0, TIOCGWINSZ, {ws_row=24, ws_col=247, ws_xpixel=0, ws_ypixel=0}) = 0
openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2998, ...}, AT_EMPTY_PATH) = 0
read(3, "# Locale name alias data base.\n#"..., 4096) = 2998
read(3, "", 4096) = 0
close(3) = 0
openat(AT_FDCWD, "/usr/share/locale/en_US.UTF-8/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en_US.utf8/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en_US/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en.UTF-8/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en.utf8/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
newfstatat(2, "", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0xa), ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "/usr/bin/deltachat: line 3: 84"..., 76/usr/bin/deltachat: line 3: 847 Trace/breakpoint trap electron14 . "$@"
) = 76
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=847, si_uid=1000, si_status=SIGTRAP, si_utime=330, si_stime=73} ---
wait4(-1, 0x7ffdecd1ebd0, WNOHANG, NULL) = -1 ECHILD (No child processes)
rt_sigreturn({mask=[]}) = 0
read(255, "\n", 66) = 1
read(255, "", 66) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
exit_group(133) = ?
+++ exited with 133 +++
Since I may be the only one having this issue, I'll assume it's a problem with my notification subsystem not passing a correct identifier along somewhere. I'll try using a different notification system. Regardless, I don't think the app should exit just because it got an invalid message identifier.
I'll continue to investigate.
just a guess: could be something in electron or libnotify, in that case it would be a bit out of our control. you could try a newer electron version. maybe it will be fixed there?
Debugging further using v1.34 appimage, clicking on a notification stoppped the app with the same console output:
[24059:1129/050435.287457:ERROR:libnotify_notification.cc(49)] notify_notification_close: domain=1236 code=36 message="GDBus.Error:org.freedesktop.Notifications.InvalidId: Invalid notification identifier"
Trace/breakpoint trap
So off to libnotify_notification.cc I go and see a reference to setting an ENV var ELECTRON_USE_UBUNTU_NOTIFIER. So I set ELECTRON_USE_UBUNTU_NOTIFIER=1 and run Deltachat, which now stays running when I click on a notification. It doesn't bring me to the message in Deltachat, or even bring Deltachat to focus, but this is better than having to restart Deltachat everytime I accidentally clicked the notification.
So the issue I have is Electron related (libnotify_notification.cc), not Deltachat code.
Finally, I figured it out! After reading about other Electron apps, like SIgnal that also crashed with notifications, one solution was tro install & run xfce4-notifyd. So I did it and now the DeltaChat notification bubble has a "View" button in it and it opens up the Deltachat window from the background right to the message.
In conclusion, I installed xfce4-notifyd and then added the line /usr/lib/xfce4/notifyd/xfce4-notifyd &
to my .xinitrc , rebooted and notifications from DeltaChat work perfectly.
For those that run Artix or Arch Linux, this is the solution.