Giter Site home page Giter Site logo

Comments (14)

Simon-Laux avatar Simon-Laux commented on July 16, 2024 3

still an open issue on electron: electron/electron#40461
another related issue: flathub/org.electronjs.Electron2.BaseApp#47

I guess the workaround is to disable notifications in the DC settings

from deltachat-desktop.

DynamicOperationsArchitect avatar DynamicOperationsArchitect commented on July 16, 2024 1

Disabling "Enable system notifications for new messages" indeed solves/workarounds this issue.

from deltachat-desktop.

Simon-Laux avatar Simon-Laux commented on July 16, 2024 1

Still an issue, the electron upgrade did unfortunately not solve this (just tried a local test build)

from deltachat-desktop.

Simon-Laux avatar Simon-Laux commented on July 16, 2024 1

seems there is a flag we can use: NOTIFY_IGNORE_PORTAL=1 to go back to dbus and not use the portal that crashes.
will be released with 1.44, I'll close this here, we can track it in flathub/chat.delta.desktop#125

from deltachat-desktop.

Simon-Laux avatar Simon-Laux commented on July 16, 2024

I can reproduce a crash when I click on the notification, but not when I click on the chat with the unread message.

Unfortunately neither the log nor the crashdump (Program terminated with signal SIGTRAP, Trace/breakpoint trap. ) were helpful in my case.

There is also some libnotify related warning in the stdout of the process, might be related:

(deltachat-desktop:2): libnotify-WARNING **: 01:13:45.319: Running in confined mode, using Portal notifications. Some features and hints won't be supported

from deltachat-desktop.

DynamicOperationsArchitect avatar DynamicOperationsArchitect commented on July 16, 2024

I can reproduce the crash with every unread message. It doesn’t matter if I click the notification or if I minimize Delta Chat Desktop to the taskbar. It always crashes as soon as I want to interact with the new message.

Delta Chat Desktop v1.42.2 with flatpak 1.14.4 on Debian 12.4 and openSUSE 15.5.

Here are all the logs I could find. Those are on openSUSE.

running from bash:

**redacted**:~> /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=/app/bin/run.sh --file-forwarding chat.delta.desktop @@u %U @@
[2:0104/082350.665595:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Logfile: /home/**redacted**/.var/app/chat.delta.desktop/config/DeltaChat/logs/2024-01-04-08-23-50.log
LaunchProcess: failed to execvp:
xdg-settings
LaunchProcess: failed to execvp:
xdg-settings
LaunchProcess: failed to execvp:
xdg-settings
LaunchProcess: failed to execvp:
xdg-settings
LaunchProcess: failed to execvp:
xdg-settings
LaunchProcess: failed to execvp:
xdg-settings
Gtk-Message: 08:23:50.905: Failed to load module "canberra-gtk-module"
[2:0104/082350.951373:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[2:0104/082350.951411:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[2:0104/082351.076589:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[2:0104/082351.076620:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[2:0104/082351.076657:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
init: 603.956ms
(deltachat-desktop:2): libnotify-WARNING **: 10:22:55.061: Running in confined mode, using Portal notifications. Some features and hints won't be supported

Delta Chat Desktop log:

2024-01-04T09:22:49.502Z        core/event              INFO    ""      1       "src/imap/idle.rs:66: INBOX: Idle has NewData ResponseData { raw: 4096, response: MailboxData(Exists(1)) }"
2024-01-04T09:22:49.508Z        core/event              INFO    ""      1       "src/imap.rs:911: 1 mails read from \"INBOX\"."
2024-01-04T09:22:49.538Z        core/event              INFO    ""      1       "src/imap/scan_folders.rs:27: Starting full folder scan"
2024-01-04T09:22:49.542Z        core/event              INFO    ""      1       "src/imap.rs:911: 0 mails read from \"INBOX\"."
2024-01-04T09:22:49.548Z        core/event              INFO    ""      1       "src/scheduler.rs:629: IMAP session supports IDLE, using it."
2024-01-04T09:22:49.549Z        core/event              INFO    ""      1       "src/imap.rs:1833: got unsolicited response Other(ResponseData { raw: 4096, response: Data { status: Ok, code: Some(CopyUid(1633948304, [Uid(294)], [Uid(299)])), information: Some(\"Moved UIDs.\") } })"
2024-01-04T09:22:49.549Z        core/event              INFO    ""      1       "src/imap/idle.rs:54: INBOX: Idle entering wait-on-remote state"
2024-01-04T09:22:50.014Z        core/event              INFO    ""      1       "src/imap/idle.rs:66: DeltaChat: Idle has NewData ResponseData { raw: 4096, response: MailboxData(Exists(246)) }"
2024-01-04T09:22:50.020Z        core/event              INFO    ""      1       "src/imap.rs:1433: Starting a full FETCH of message set \"299\"."
2024-01-04T09:22:50.023Z        core/event              INFO    ""      1       "src/imap.rs:1546: Passing message UID 299 to receive_imf()."
2024-01-04T09:22:50.023Z        core/event              INFO    ""      1       "src/receive_imf.rs:142: Receiving message, seen=false..."
2024-01-04T09:22:50.023Z        core/event              INFO    ""      1       "src/receive_imf.rs:176: Received message has Message-Id: Mr.hnKsqJjW66l.KCVcEpvDcgk**redacted**.net"
2024-01-04T09:22:50.023Z        core/event              INFO    ""      1       "src/receive_imf.rs:593: Message is an MDN (TRASH)."
2024-01-04T09:22:50.024Z        core/event              INFO    ""      1       "src/receive_imf.rs:1366: Message has 1 parts and is assigned to chat #Chat#Trash."
2024-01-04T09:22:50.024Z        core/event              INFO    ""      1       "src/contact.rs:1736: Recently seen loop waiting for 0h 9m 51s or interrupt"
2024-01-04T09:22:50.024Z        core/event              INFO    ""      1       "src/imap/idle.rs:75: INBOX: Idle wait was interrupted"
2024-01-04T09:22:50.035Z        core/event              INFO    ""      1       "src/imap.rs:1585: Successfully received 1 UIDs."
2024-01-04T09:22:50.035Z        core/event              INFO    ""      1       "src/imap.rs:911: 1 mails read from \"DeltaChat\"."
2024-01-04T09:22:50.037Z        core/event              INFO    ""      1       "src/scheduler.rs:629: IMAP session supports IDLE, using it."
2024-01-04T09:22:50.039Z        core/event              INFO    ""      1       "src/imap/idle.rs:54: DeltaChat: Idle entering wait-on-remote state"
2024-01-04T09:22:50.039Z        core/event              INFO    ""      1       "src/imap.rs:1196: Marked messages 299 in folder DeltaChat as seen."
2024-01-04T09:22:50.049Z        core/event              INFO    ""      1       "src/imap.rs:733: No new emails in folder \"INBOX\"."
2024-01-04T09:22:50.052Z        core/event              INFO    ""      1       "src/scheduler.rs:629: IMAP session supports IDLE, using it."
2024-01-04T09:22:50.054Z        core/event              INFO    ""      1       "src/imap/idle.rs:54: INBOX: Idle entering wait-on-remote state"
2024-01-04T09:22:50.534Z        core/event              INFO    ""      1       "src/imap/idle.rs:66: DeltaChat: Idle has NewData ResponseData { raw: 4096, response: Fetch(246, [ModSeq(591), Flags([\"\\\\Seen\"])]) }"
2024-01-04T09:22:50.540Z        core/event              INFO    ""      1       "src/imap.rs:911: 0 mails read from \"DeltaChat\"."
2024-01-04T09:22:50.543Z        core/event              INFO    ""      1       "src/scheduler.rs:629: IMAP session supports IDLE, using it."
2024-01-04T09:22:50.545Z        core/event              INFO    ""      1       "src/imap/idle.rs:54: DeltaChat: Idle entering wait-on-remote state"
2024-01-04T09:22:54.511Z        core/event              INFO    ""      1       "src/imap/idle.rs:66: INBOX: Idle has NewData ResponseData { raw: 4096, response: MailboxData(Exists(1)) }"
2024-01-04T09:22:54.516Z        core/event              INFO    ""      1       "src/imap.rs:911: 1 mails read from \"INBOX\"."
2024-01-04T09:22:54.548Z        core/event              INFO    ""      1       "src/scheduler.rs:629: IMAP session supports IDLE, using it."
2024-01-04T09:22:54.549Z        core/event              INFO    ""      1       "src/imap.rs:1833: got unsolicited response Other(ResponseData { raw: 4096, response: Data { status: Ok, code: Some(CopyUid(1633948304, [Uid(295)], [Uid(300)])), information: Some(\"Moved UIDs.\") } })"
2024-01-04T09:22:54.549Z        core/event              INFO    ""      1       "src/imap/idle.rs:54: INBOX: Idle entering wait-on-remote state"
2024-01-04T09:22:55.023Z        core/event              INFO    ""      1       "src/imap/idle.rs:66: DeltaChat: Idle has NewData ResponseData { raw: 4096, response: MailboxData(Exists(247)) }"
2024-01-04T09:22:55.030Z        core/event              INFO    ""      1       "src/imap.rs:1433: Starting a full FETCH of message set \"300\"."
2024-01-04T09:22:55.032Z        core/event              INFO    ""      1       "src/imap.rs:1546: Passing message UID 300 to receive_imf()."
2024-01-04T09:22:55.033Z        core/event              INFO    ""      1       "src/receive_imf.rs:142: Receiving message, seen=false..."
2024-01-04T09:22:55.039Z        core/event              INFO    ""      1       "src/decrypt.rs:34: Detected Autocrypt-mime message."
2024-01-04T09:22:55.042Z        core/event              INFO    ""      1       "src/receive_imf.rs:176: Received message has Message-Id: Mr.CToef9FJiBJ.09ny4sMpDTj**redacted**.net"
2024-01-04T09:22:55.042Z        core/event              INFO    ""      1       "src/receive_imf.rs:2287: Not creating ad-hoc group: too few contacts."
2024-01-04T09:22:55.043Z        core/event              INFO    ""      1       "src/receive_imf.rs:1366: Message has 1 parts and is assigned to chat #Chat#14."
2024-01-04T09:22:55.043Z        core/event              INFO    ""      1       "src/contact.rs:1736: Recently seen loop waiting for 0h 9m 46s or interrupt"
2024-01-04T09:22:55.056Z        core/event              INFO    ""      1       "src/imap.rs:1585: Successfully received 1 UIDs."
2024-01-04T09:22:55.056Z        core/event              INFO    ""      1       "src/imap.rs:911: 1 mails read from \"DeltaChat\"."
2024-01-04T09:22:55.071Z        core/event              INFO    ""      1       "src/scheduler.rs:629: IMAP session supports IDLE, using it."
2024-01-04T09:22:55.071Z        core/event              INFO    ""      1       "src/imap/idle.rs:54: DeltaChat: Idle entering wait-on-remote state"
2024-01-04T09:23:19.480Z        main/menu               INFO    ""      "rebuilding menu with locale en"
2024-01-04T09:23:19.505Z        core/event              INFO    ""      1       "src/scheduler.rs:760: smtp fake idle - interrupted"
2024-01-04T09:23:19.506Z        core/event              INFO    ""      1       "src/imap/idle.rs:75: INBOX: Idle wait was interrupted"
2024-01-04T09:23:19.506Z        core/event              INFO    ""      1       "src/imap/idle.rs:75: DeltaChat: Idle wait was interrupted"
2024-01-04T09:23:19.507Z        core/event              INFO    ""      1       "src/smtp.rs:652: Selected rows from SMTP queue: []."
2024-01-04T09:23:19.507Z        core/event              INFO    ""      1       "src/smtp.rs:757: Sending MDNs"
2024-01-04T09:23:19.507Z        core/event              INFO    ""      1       "src/scheduler.rs:728: smtp fake idle - started"
2024-01-04T09:23:19.508Z        core/event              INFO    ""      1       "src/scheduler.rs:756: smtp has no messages to retry, waiting for interrupt"
2024-01-04T09:23:19.512Z        core/event              INFO    ""      1       "src/imap.rs:911: 0 mails read from \"DeltaChat\"."
2024-01-04T09:23:19.515Z        core/event              INFO    ""      1       "src/scheduler.rs:629: IMAP session supports IDLE, using it."
2024-01-04T09:23:19.517Z        core/event              INFO    ""      1       "src/imap/idle.rs:54: DeltaChat: Idle entering wait-on-remote state"
2024-01-04T09:23:19.525Z        core/event              INFO    ""      1       "src/imap.rs:911: 0 mails read from \"INBOX\"."
2024-01-04T09:23:19.529Z        core/event              INFO    ""      1       "src/scheduler.rs:629: IMAP session supports IDLE, using it."
2024-01-04T09:23:19.531Z        core/event              INFO    ""      1       "src/imap/idle.rs:54: INBOX: Idle entering wait-on-remote state"

dmesg:

[ 8666.378154] show_signal: 44 callbacks suppressed
[ 8666.378158] traps: deltachat-deskt[12307] trap int3 ip:5593cafa44ac sp:7ffc2b7dc320 error:0 in deltachat-desktop[5593cab28000+79c9000]

syslog:

2024-01-04T10:23:22.220152+01:00 **redacted** kernel: [ 8666.378154][T12307] show_signal: 44 callbacks suppressed
2024-01-04T10:23:22.220166+01:00 **redacted** kernel: [ 8666.378158][T12307] traps: deltachat-deskt[12307] trap int3 ip:5593cafa44ac sp:7ffc2b7dc320 error:0 in deltachat-desktop[5593cab28000+79c9000]

from deltachat-desktop.

adzialocha avatar adzialocha commented on July 16, 2024

I've stumbled upon this here, not sure if related: flathub/org.signal.Signal#521 and https://gitlab.gnome.org/GNOME/libnotify/-/issues/34

from deltachat-desktop.

farooqkz avatar farooqkz commented on July 16, 2024

Can you please post logs from Desktop app? You should do Ctrl + Shift + I and open the developer tools. Then in Console tab, see if any error gets printed. If not, change default level to verbose.

from deltachat-desktop.

farooqkz avatar farooqkz commented on July 16, 2024

I suspect the problem's with this call:

https://github.com/deltachat/deltachat-desktop/blob/master/src/renderer/components/message/MessageList.tsx#L168

from deltachat-desktop.

tapete avatar tapete commented on July 16, 2024

Can you please post logs from Desktop app? You should do Ctrl + Shift + I and open the developer tools. Then in Console tab, see if any error gets printed. If not, change default level to verbose.

I just tried this but the developer tools also crash so I can not see if there are errors in the console.

from deltachat-desktop.

Simon-Laux avatar Simon-Laux commented on July 16, 2024

I've stumbled upon this here, not sure if related: flathub/org.signal.Signal#521 and https://gitlab.gnome.org/GNOME/libnotify/-/issues/34

I also think it's probably related to libnotify.

from deltachat-desktop.

Simon-Laux avatar Simon-Laux commented on July 16, 2024

maybe we could somehow downgrade libnotify in the flatpak before it used portals, maybe that could also help.

otherwise the options are:

A. try to fix the electron bug ourselves / or hope that it fixed soon; and wait for it to be merged
B. disable notification cleanup/closing on flatpak or disable notifications completely on flatpak
C. use the notification api directly on flatpak version bypassing the bug in electron but adding a native npm dependency that we might need to write ourselves.

from deltachat-desktop.

Simon-Laux avatar Simon-Laux commented on July 16, 2024

I researched option C a bit:

  • on npm there only seem to be packages for notifications that were not updated in years
  • the tauri notification plugin is not standalone and seems to implement notifications by itself and not relying on other crates, fun fact: it still seems to support windows 7
  • 2 crates seem interesting to put into a node bindings package (probably with napi.rs)
    • libnotify - bindings to libnotify
      • advantage: uses the notification portal on flatpak if libnotify is new enough
      • passing it an image requires it to be converted to a gtk image first, plain rust image is not enough
    • notify-rust notifications over dbus, also partially supports windows and macOS
      • maybe advantage: does not depend on libnotify (which also had a crash before), uses dbus directly but no portal from what I can tell

Update1:

  • pure nodejs without native dependencies, uses dbus: https://github.com/Hill-98/node-dbus-notifier
    • on first glance it seems to lack a way to set images without saving them to disk first, but that can be probably solved
      • after looking at source code and dbus protocol: its possible and one of the options to pass the image as image data

Update 2:
https://github.com/Hill-98/node-dbus-notifier looks most promising, we tried it and it worked both on nixOS and inside of flatpak, so I plan to migrate the linux notifications to this package very soon.

from deltachat-desktop.

adzialocha avatar adzialocha commented on July 16, 2024

seems there is a flag we can use: NOTIFY_IGNORE_PORTAL=1 to go back to dbus and not use the portal that crashes. will be released with 1.44, I'll close this here, we can track it in flathub/chat.delta.desktop#125

Amazing find! Well done!

from deltachat-desktop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.