Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Flatpak, x86/ARM electron exited with code: 7 #433

Closed
oxwivi opened this issue Mar 15, 2021 · 15 comments
Closed

[BUG] Flatpak, x86/ARM electron exited with code: 7 #433

oxwivi opened this issue Mar 15, 2021 · 15 comments
Labels

Comments

@oxwivi
Copy link

oxwivi commented Mar 15, 2021

Description

On Manjaro and Manjaro ARM, running the flatpak results in crash before any sort of UI can load:

$ flatpak run org.nanuc.Axolotl
INFO[0000] [axolotl] Starting Signal for Ubuntu version 0.9.8 
INFO[0000] [axolotl] Setup completed                    
INFO[0000] [axolotl] Start electron                     
INFO[0000] [axolotl] Axolotl server started             
INFO[0000] [axolotl] Starting axolotl ws                
DEBU[0000] [axolotl] Using axolotl-web path /app/bin/axolotl-web/dist 
DEBU[0000] [axolotl] Run Backend                        
DEBU[0000] [axolotl] openDb: /home/user/.local/share/textsecure.nanuc/db 
DEBU[0000] [axolotl] NewDataStore                       
INFO[0000] astikit: starting worker...                  
DEBU[0000] [axolotl] NewDataStore finished              
INFO[0000] [axolotl] Loading Chats                      
INFO[0000] [axolotl] Db setup finished                  
DEBU[0000] [axolotl] Start Session after Decryption     
DEBU[0000] [axolotl] starting Signal connection         
DEBU[0000] [axolotl] config path:  /home/user/.config/textsecure.nanuc 
DEBU[2021/03/15 16:29:14] [axoltol] Opening Dialog: getPhoneNumber     
DEBU[2021/03/15 16:29:14] [axolotl-ws] send request getPhoneNumber     
ERRO[0028] '/home/user/.config/textsecure.nanuc/electron/vendor/electron-linux-amd64/electron' exited with code: 7 
INFO[0028] astikit: stopping worker...                  
DEBU[2021/03/15 16:29:42] [axolotl-electron] main: creating window failed: context canceled 
DEBU[2021/03/15 16:29:42] [axolotl-electron] open dev tools false      
INFO[0028] astikit: worker is now waiting...            
ERRO[2021/03/15 16:29:42] [axolotl-electron] Electron App has crashed {app.crash app <nil>   <nil>   <nil>  <nil>  <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil>   <nil> <nil>  <nil> <nil>      <nil>} 
ERRO[0028] accept tcp 127.0.0.1:40997: use of closed network connection while TCP accepting

Steps to Reproduce

  1. Install flatpak from Flathub
  2. Run using .desktop file or flatpak run

Expected behavior: [What you expect to happen]
Axolotl running.

Actual behavior: [What actually happens]
Axolotl crashes.

Versions

Please provide the Version as written in Settings->About Axolotl
N/A

Device

What device or OS are you using?
Manjaro/Manjaro ARM

Link to Debug Log

Please provide a link to debug from ~/.cache/upstart/application-click-textsecure.nanuc_textsecure*.log
Be careful it contains sensible data
N/A (Can't find it in .var/app/org.nanuc.Axolotl dir, doesn't seem like Axolotl got to the point of generating the log; no equivalents on host home folder outside flatpak)

@emiljoha
Copy link

Seeing the same thing on a Librem 5 running PureOS.

@s4msy
Copy link

s4msy commented Mar 16, 2021

Confirmed, same here on pinephone with arch-linux plasma-mobile.

@olof-nord
Copy link
Collaborator

Could it be that this is an issue coming from Electron only allowing, per default, 6 connections per host?

From what I understand, the communication between the axolotl backend and frontend is done with WebSockets.

Electron offers a --ignore-connections-limit flag - perhaps setting the localhost domain as without limits could be a solution.

https://www.electronjs.org/docs/api/command-line-switches#--ignore-connections-limitdomains

https://github.com/electron/electron/blob/master/shell/common/options_switches.cc#L260

@olof-nord
Copy link
Collaborator

Did some initial testing, and I am starting to believe that this issue is not related to Electron, but to the go-helper go-astilectron which is used. The below issue mentions some problems regarding event handlers.

asticode/go-astilectron#267

Another method might be to provide a known working Electron as a bundle bundle and not rely on downloading it at startup.
That would definitely increase the install size though.

https://github.com/asticode/go-astilectron-bundler

We do have a QT version of the Flatpak which can be used, which does not rely on Electron. That could potentially be seen as a workaround as well.

https://github.com/nanu-c/axolotl/blob/main/docs/INSTALL.md#qt-version

@oxwivi
Copy link
Author

oxwivi commented Mar 22, 2021

We do have a QT version of the Flatpak which can be used, which does not rely on Electron. That could potentially be seen as a workaround as well.

https://github.com/nanu-c/axolotl/blob/main/docs/INSTALL.md#qt-version

Doesn't seem like existing flatpak can switch over to the Qt version on the fly.

@otrebu
Copy link

otrebu commented Mar 22, 2021

Unfortunately the Qt version doesn't work either for me on the pinephone.

@MabeyC
Copy link

MabeyC commented Apr 27, 2021

+1 on Failed to start on Mobian Pinephone
Attempted flathub repo and local build, same result as oxwivi

@ghost
Copy link

ghost commented Jan 11, 2022

I am seeing the same issue on Artix Linux with the Flatpak I just downloaded.

@Ferenc-
Copy link
Contributor

Ferenc- commented Jan 11, 2022

I am seeing the same issue on Artix Linux with the Flatpak I just downloaded.

The flatpak builds on flathub are currently outdated (v0.9.9 vs v1.0.9 ) and broken. There is WIP MR for fixing that.
In the meantime it should be possible to install like this: #615

@olof-nord
Copy link
Collaborator

olof-nord commented Mar 7, 2022

The work on a new Flathub release is completed, and in the coming days there will be a new, updated, Axolotl Flathub version ready to install (using the latest Axolotl release, v1.1.0)

This release not only uses the latest and greatest of the axolotl and axolotl-web projects, but also includes the new libraries and perhaps most importantly, bundles Electron with the installer instead of installing it when first started as was the case previously.

To test this build already, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/78531/org.nanuc.Axolotl.flatpakref

@langfingaz
Copy link

Seems like the bug use of closed network connection while TCP accepting still resides in version 1.2.0.

Log from x86 Arch Linux - installed via flatpak
time="2022-04-16T21:50:30+02:00" level=info msg="[axolotl] Starting axolotl version 1.2.0"
time="2022-04-16T21:50:30+02:00" level=info msg="[axolotl] Setup completed"
time="2022-04-16T21:50:30+02:00" level=info msg="[axolotl-electron] starting astilelectron with the following switches: [--disable-dev-shm-usage --no-sandbox --ozone-platform-hint=auto]"
time="2022-04-16T21:50:30+02:00" level=info msg="astikit: starting worker..."
time="2022-04-16T21:50:30+02:00" level=info msg="[axolotl] Axolotl server started"
time="2022-04-16T21:50:30+02:00" level=info msg="[axolotl] Starting axolotl ws"
time="2022-04-16T21:50:30+02:00" level=info msg="[axolotl] Loading Chats"
time="2022-04-16T21:50:30+02:00" level=info msg="[axolotl] Db setup finished"
time="2022/04/16 21:50:30" level=info msg="[textsecure-crayfish] Starting crayfish-backend"
time="2022/04/16 21:50:30" level=info msg="[crayfish] starting crayfish 7bbaf1665234ce8dd3455ded2164b107fae7f972\n"
time="2022/04/16 21:50:30" level=info msg="[crayfish] Starting libsignal-service web socket at ws://127.0.0.1:9081/libsignal\n"
time="2022-04-16T21:50:30+02:00" level=error msg="'/home/yoda/.var/app/org.nanuc.Axolotl/data/vendor/electron-linux-amd64/electron' exited with code: -1"
time="2022-04-16T21:50:30+02:00" level=info msg="astikit: stopping worker..."
time="2022/04/16 21:50:30" level=error msg="[axolotl-electron] main: creating window failed: context canceled"
time="2022-04-16T21:50:30+02:00" level=info msg="astikit: worker is now waiting..."
time="2022-04-16T21:50:30+02:00" level=error msg="accept tcp 127.0.0.1:39477: use of closed network connection while TCP accepting"
time="2022/04/16 21:50:30" level=info msg="[axolotl] ending axolotl"
time="2022/04/16 21:50:30" level=error msg="[axolotl] error stopping crayfish: [textsecure-crayfish-ws] there is no listening connection to stop"
Log from PinePhone (DanctNix) - installed via extracted arm64.deb release

PKGBUILD used: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=axolotl-bin

ERRO[0000] [axolotl] creating settings file open /home/alarm/.config/textsecure.nanuc/settings.yml: no such file or directory 
INFO[0000] [axolotl] Starting axolotl version 1.2.0     
INFO[0000] [axolotl] Setup completed                    
INFO[0000] [axolotl-electron] starting astilelectron with the following switches: [--disable-dev-shm-usage --no-sandbox --ozone-platform-hint=auto] 
INFO[0000] astikit: starting worker...                  
INFO[0000] [axolotl] Axolotl server started             
INFO[0000] [axolotl] Starting axolotl ws                
INFO[0000] [axolotl] Loading Chats                      
INFO[0000] [axolotl] Db setup finished                  
ERRO[0000] [axolotl] InitModels open /home/alarm/.config/textsecure.nanuc/settings.yml: no such file or directory 
INFO[2022/04/16 21:42:47] [textsecure-crayfish] Starting crayfish-backend 
INFO[2022/04/16 21:42:47] [crayfish] starting crayfish                 
INFO[2022/04/16 21:42:47] [crayfish] Starting libsignal-service web socket at ws://127.0.0.1:9081/libsignal 
INFO[2022/04/16 21:42:48] [crayfish] establishing client connection... WebSocket 
ERRO[0044] '/home/alarm/.config/textsecure.nanuc/electron/vendor/electron-linux-arm64/electron' exited with code: -1 
INFO[0044] astikit: stopping worker...                  
ERRO[2022/04/16 21:43:32] [axolotl-electron] main: creating window failed: context canceled 
INFO[0044] astikit: worker is now waiting...            
ERRO[0044] accept tcp 127.0.0.1:43859: use of closed network connection while TCP accepting 
INFO[2022/04/16 21:43:32] [axolotl] ending axolotl 

And lastly I tried the to run the flatpak version on my Pinephone. There it hang for 45 seconds after the time="2022/04/16 22:39:56" level=info msg="[crayfish] establishing client connection... WebSocket\n" but then succeeded! Here is the log:

Log from PinePhone (DanctNix) - installed via flatpak
time="2022-04-16T22:39:55+02:00" level=info msg="[axolotl] Starting axolotl version 1.2.0"
time="2022-04-16T22:39:55+02:00" level=info msg="[axolotl] Setup completed"
time="2022-04-16T22:39:55+02:00" level=info msg="[axolotl-electron] starting astilelectron with the following switches: [--disable-dev-shm-usage --no-sandbox --ozone-platform-hint=auto]"
time="2022-04-16T22:39:55+02:00" level=info msg="astikit: starting worker..."
time="2022-04-16T22:39:55+02:00" level=info msg="[axolotl] Axolotl server started"
time="2022-04-16T22:39:55+02:00" level=info msg="[axolotl] Starting axolotl ws"
time="2022-04-16T22:39:55+02:00" level=info msg="[axolotl] Loading Chats"
time="2022-04-16T22:39:55+02:00" level=info msg="[axolotl] Db setup finished"
time="2022-04-16T22:39:55+02:00" level=info msg="[textsecure-crayfish] Starting crayfish-backend"
time="2022/04/16 22:39:55" level=info msg="[crayfish] starting crayfish 7bbaf1665234ce8dd3455ded2164b107fae7f972\n"
time="2022/04/16 22:39:55" level=info msg="[crayfish] Starting libsignal-service web socket at ws://127.0.0.1:9081/libsignal\n"
time="2022/04/16 22:39:56" level=info msg="[crayfish] establishing client connection... WebSocket\n"
time="2022/04/16 22:40:41" level=info msg="[axolotl] Client Connected false"
time="2022/04/16 22:40:41" level=info msg="[axolotl-electron] Page loaded"
time="2022/04/16 22:40:41" level=info msg="[axolotl-electron] Electron navigation http://127.0.0.1:9080/"
time="2022-04-16T22:40:41+02:00" level=info msg="astikit: worker is now waiting..."
time="2022/04/16 22:40:41" level=error msg="[axolotl-ws] wsReader  websocket: close 1001 (going away)"
time="2022/04/16 22:40:42" level=info msg="[axolotl] Client Connected false"
time="2022/04/16 22:40:42" level=error msg="[axolotl-ws] send message websocket: close sent"
time="2022/04/16 22:40:42" level=info msg="[axolotl-electron] Page loaded"

@olof-nord
Copy link
Collaborator

Thanks for getting back!

To rule out local issues with Electron, can you start it without Axolotl?

$HOME/.var/app/org.nanuc.Axolotl/data/vendor/electron-linux-amd64/electron https://github.com/nanu-c/axolotl/issues/433

Additionally, just as to allow for a better understanding of your systems, what Desktop Environment do they use, and are you using Wayland or not?

@langfingaz
Copy link

langfingaz commented Apr 23, 2022

x86 Arch Linux - installed via flatpak

I'm using XFCE4 with xorg.
uname -r: 5.15.34-1-lts
xfwm4 --version: 4.16.1 (revision 5f61a84ad) for Xfce 4.16

$HOME/.var/app/org.nanuc.Axolotl/data/vendor/electron-linux-amd64/electron https://github.com/nanu-c/axolotl/issues/433

20220423_143248

PinePhone (DanctNix) - installed via flatpak

I'm using Phosh with wayland.
uname -r: 5.17.2-1-danctnix
phosh --version: 0.17.0

$HOME/.var/app/org.nanuc.Axolotl/data/vendor/electron-linux-arm64/electron https://github.com/nanu-c/axolotl/issues/433

When started via ssh:

arm64/electron https://github.com/nanu-c/axolotl/issues/433
Trace/breakpoint trap (core dumped)

When started in a terminal on the phone:
20220423_^162916

[5250:0423/163656.903352:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser”
[5250:0423/163656.905436:ERROR:select_file_dialog_impl_portal.cc(243)] Failed to read portal version property
[5286:0423/163657.436212:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.

Questions

Is the folder $HOME/.var/app/org.nanuc.Axolotl/ on my PinePhone from the flatpak installation? And where would electron reside when I'm using the AUR version? I could test that electron version as well. At the moment I have the AUR version uninstalled (as flatpak is working).

@oxwivi
Copy link
Author

oxwivi commented Jul 9, 2022

Screenshot_20220709_044812

Flatpak Axolotl on Fedora 36, KDE Plasma and Wayland. Basically the save behavior as the last comment except for the STDOUT:

$ $HOME/.var/app/org.nanuc.Axolotl/data/vendor/electron-linux-amd64/electron https://github.com/nanu-c/axolotl/issues/433
Gtk-Message: 04:47:20.929: Failed to load module "appmenu-gtk-module"
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[32700:0709/044721.011540:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.
[32700:0709/044723.526082:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[32700:0709/044726.362623:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[32700:0709/044731.454342:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!

@nanu-c
Copy link
Collaborator

nanu-c commented Feb 14, 2023

#985 will switch from electron to tauri

@nanu-c nanu-c closed this as completed Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants