Skip to content
This repository has been archived by the owner on Oct 17, 2019. It is now read-only.

Fedora 28 / Nheko 0.6.0: New install fails to close completely (by design) and opening it again will yield an error. #451

Open
almereyda opened this issue Sep 25, 2018 · 2 comments

Comments

@almereyda
Copy link

System:

  • Nheko version: 0.6.0
  • Installation method: Flatpak/Flathub
  • Operating System: Fedora 28, Linux 4.18.9-200.fc28.x86_64
  • Desktop Environment: Gnome 3.28.3

Actual behavior

After successfully logging in, closing the application (unknowingly to tray) and trying to start it again from the Activities view in Gnome, an error occurs.

Expected behavior

Nheko starts, recognises a running instance and displays itself.

Steps to reproduce

  1. Install Nheko via Gnome Software from Flathub
  2. Run it
  3. Sign in with custom home server credentials
  4. See the rooms and exit.
    Note by default this will only minimise to tray.
  5. Start the application again.

Logs

The error looks like this for a user when using the regular .desktop shortcut entry:

bildschirmfoto vom 2018-09-25 18-04-21

The Gnome screenshot program is able to see the following

bildschirmfoto vom 2018-09-25 18-06-23
bildschirmfoto vom 2018-09-25 18-03-53

When running from command line we get:

# flatpak run io.github.mujx.Nheko/x86_64/stable 
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.

(process:2): Gtk-WARNING **: Locale not supported by C library.
	Using the fallback 'C' locale.
ssl3 ext invalid servername
ssl3 ext invalid servername
[2018-09-25 17:58:13.374] [db] [critical] failure during boot: mdb_txn_begin: Resource temporarily unavailable
[2018-09-25 17:58:13.374] [db] [info] deleted cache files from disk
[2018-09-25 17:58:13.374] [net] [info] falling back to initial sync
[2018-09-25 17:58:13.374] [crypto] [info] creating new olm account
[2018-09-25 17:58:13.392] [crypto] [info] ed25519   : J7/HNuK/6jd3H/thTPXSN0/NTvmjEL7BazzzlaNxrps
[2018-09-25 17:58:13.392] [crypto] [info] curve25519: G312hKYrrWZmuR1x5azyIedcBC+1HpgiCApHZARZ4Q4
[2018-09-25 17:58:13.392] [crypto] [info] generating one time keys
[2018-09-25 17:58:13.411] [ui] [info] starting nheko 0.6.0
[2018-09-25 17:58:13.716] [db] [critical] image: mdb_txn_begin: Resource temporarily unavailable mxc://matrix.allmende.io/yFpayUpidJncgGzTkqcDeeIN
[2018-09-25 17:58:15.085] [crypto] [critical] failed to upload one time keys: One time key signed_curve25519:AAAAKQ already exists. Old key: {"key":"Ehr2n7c72BvP0ezu1rUcx9rMeN2pc3uiSZAAZ3Bf7ws","signatures":{"@ya:matrix.allmende.io":{"ed25519:GECUCEHWNO":"gZOtExF08iREziaHmAaHalWB//qw2bzSHa9qqEMXjkU1XnFrg22g2nclu/t3TnLtnY5/iD6GyNZFd+x8AyvwAQ"}}}; new key: {'signatures': {'@ya:matrix.allmende.io': {'ed25519:GECUCEHWNO': '8KZoGIP9RIoPTLrhpjHg9ftN/CiRaqqX3H6jFhBftM+q+C5Y/OpkExTC+f30zGgKKg43YStvGv85JRVd3UwUCw'}}, 'key': '/8ByhvTPrP36oo8VyoNbqFjVQGZ+7LQVWIRDDuebHGw'} 400
[2018-09-25 17:58:15.085] [ui] [info] dropping to the login page: Failed to setup encryption keys. Server response: One time key signed_curve25519:AAAAKQ already exists. Old key: {"key":"Ehr2n7c72BvP0ezu1rUcx9rMeN2pc3uiSZAAZ3Bf7ws","signatures":{"@ya:matrix.allmende.io":{"ed25519:GECUCEHWNO":"gZOtExF08iREziaHmAaHalWB//qw2bzSHa9qqEMXjkU1XnFrg22g2nclu/t3TnLtnY5/iD6GyNZFd+x8AyvwAQ"}}}; new key: {'signatures': {'@ya:matrix.allmende.io': {'ed25519:GECUCEHWNO': '8KZoGIP9RIoPTLrhpjHg9ftN/CiRaqqX3H6jFhBftM+q+C5Y/OpkExTC+f30zGgKKg43YStvGv85JRVd3UwUCw'}}, 'key': '/8ByhvTPrP36oo8VyoNbqFjVQGZ+7LQVWIRDDuebHGw'} 400. Please try again later.
[2018-09-25 17:58:15.085] [db] [info] deleted cache files from disk
shutdown: data length too longshutdown: 
Operation canceled
shutdown: Operation canceled
shutdown: Operation canceled
shutdown: shutdown: Operation canceleddecryption failed or bad record mac

shutdown: Operation canceled
shutdown: Operation canceled
shutdown: Operation canceled
shutdown: Operation canceled

Conclusion

When closing the program for the first time, it only minimized itself into system tray. Subsequent instances were not aware to be actually running already. This may be due to Flatpak isolation. Closing the application from system tray and starting it again did not show these effects.

Additional off-topic notes

The scaling factor setting is a little too hidden for new installs, but works after one found it. Yet it is not applied to the context menu of the tray icon, nor to the settings. This is eventually another issue.

@mujx
Copy link
Owner

mujx commented Sep 25, 2018

With the flatpak isolation in place, nheko won't be able to detect another instance. In general displaying the current running instance is something the program launcher should be responsible, not the application.

Looking at the logs there seems to be a deadlock because multiple instances are trying to access the same db.

I would recommend to disable the minimize to tray option since you're in GNOME and see if that helps.

@almereyda
Copy link
Author

Yes, that is what I did, and it helps.

Should we report this somewhere upstream, either Gnome or Flatpak?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants