Yubico / yubioath-flutter

Yubico Authenticator for Desktop (Windows, macOS and Linux) and Android
https://developers.yubico.com/yubioath-flutter/
Apache License 2.0
958 stars 129 forks source link

crashing on KDE #1320

Closed Be-ing closed 5 months ago

Be-ing commented 6 months ago

Yubico Authenticator crashes soon (30-60 seconds at most, sometimes more, sometimes less) after startup, regardless of what I do in the application before that happens. This is 100% reproducible on KDE 5.27.10 on Fedora 39, both on Wayland and X11. I cannot reproduce this on GNOME nor Weston.

Yubico Authenticator was installed from Flathub:

❯ flatpak info com.yubico.yubioath

Yubico Authenticator - Graphical interface for displaying OATH codes with a
YubiKey

          ID: com.yubico.yubioath
         Ref: app/com.yubico.yubioath/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 6.3.1
     License: BSD-2-Clause
      Origin: flathub
  Collection: org.flathub.Stable
Installation: system
   Installed: 71.5 MB
     Runtime: org.freedesktop.Platform/x86_64/23.08
         Sdk: org.freedesktop.Sdk/x86_64/23.08

      Commit: ab22e5e485a66a3aa2c54cce10f91fc02c91694dd5e0845fd18bf3b0e79b5800
      Parent: 48488206ade3f0f51d79e587d54f6fe4890f0e68fcf3cda96364af59e5dcfbec
     Subject: Disable polkit for pcsc-lite (7d768432)
        Date: 2023-12-13 08:09:05 +0000

flatpak-coredumpctl doesn't produce a useful backtrace even with org.freedesktop.Sdk.Debug/x86_64/23.08 and com.yubico.yubioath.Debug installed, but curiously it shows that it's crashing in pipewire?? Perhaps the old version of Pipewire (0.3) is clashing with the system Pipewire 1.0.0? Though I don't know what Yubico Authenticator is doing with Pipewire...

❯ flatpak-coredumpctl com.yubico.yubioath
Executable /usr/bin/pipewire doesn't seem to be a flatpaked application.
Running: `"flatpak" "run" "--filesystem=home" "--filesystem=/tmp" "--command=gdb" "--devel" "com.yubico.yubioath" "/usr/bin/pipewire" "/tmp/tmpne0i3hax"`
GNU gdb (GDB) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
/usr/bin/pipewire: No such file or directory.
Downloading executable for /usr/bin/pipewire
Download failed: No route to host.  Continuing without executable for /usr/bin/pipewire.                                                                                                     

warning: Can't open file /usr/bin/pipewire during file-backed mapping note processing
Downloading executable for /usr/lib64/spa-0.2/audiomixer/libspa-audiomixer.so
Download failed: No route to host.  Continuing without executable for /usr/lib64/spa-0.2/audiomixer/libspa-audiomixer.so.                                                                    

warning: Can't open file /usr/lib64/spa-0.2/audiomixer/libspa-audiomixer.so during file-backed mapping note processing
Downloading executable for /usr/lib64/libudev.so.1.7.7
Download failed: No route to host.  Continuing without executable for /usr/lib64/libudev.so.1.7.7.                                                                                           

warning: Can't open file /usr/lib64/libudev.so.1.7.7 during file-backed mapping note processing
Downloading executable for /usr/lib64/libasound.so.2.0.0
Download failed: No route to host.  Continuing without executable for /usr/lib64/libasound.so.2.0.0.                                                                                         

warning: Can't open file /usr/lib64/libasound.so.2.0.0 during file-backed mapping note processing

warning: Can't open file /memfd:pipewire-memfd:flags=0x0000000f,type=2,size=32832 (deleted) during file-backed mapping note processing
Downloading executable for /usr/lib64/spa-0.2/alsa/libspa-alsa.so
Download failed: No route to host.  Continuing without executable for /usr/lib64/spa-0.2/alsa/libspa-alsa.so.                                                                                

warning: Can't open file /usr/lib64/spa-0.2/alsa/libspa-alsa.so during file-backed mapping note processing
Downloading executable for /usr/lib64/spa-0.2/audioconvert/libspa-audioconvert.so
Download failed: No route to host.  Continuing without executable for /usr/lib64/spa-0.2/audioconvert/libspa-audioconvert.so.                                                                

warning: Can't open file /usr/lib64/spa-0.2/audioconvert/libspa-audioconvert.so during file-backed mapping note processing
Downloading executable for /usr/lib64/pipewire-0.3/libpipewire-module-session-manager.so
Download failed: No route to host.  Continuing without executable for /usr/lib64/pipewire-0.3/libpipewire-module-session-manager.so.                                                         

warning: Can't open file /usr/lib64/pipewire-0.3/libpipewire-module-session-manager.so during file-backed mapping note processing
Downloading executable for /usr/lib64/libglib-2.0.so.0.7800.3
                                                                                                                                                                                             --Type <RET> for more, q to quit, c to continue without paging--
Download failed: No route to host.  Continuing without executable for /usr/lib64/libglib-2.0.so.0.7800.3.

warning: Can't open file /usr/lib64/libglib-2.0.so.0.7800.3 during file-backed mapping note processing

warning: Can't open file /memfd:pipewire-memfd:flags=0x0000000f,type=2,size=2312 (deleted) during file-backed mapping note processing
Downloading executable for /usr/lib64/pipewire-0.3/libpipewire-module-adapter.so
Download failed: No route to host.  Continuing without executable for /usr/lib64/pipewire-0.3/libpipewire-module-adapter.so.                                                                 

warning: Can't open file /usr/lib64/pipewire-0.3/libpipewire-module-adapter.so during file-backed mapping note processing
Downloading executable for /usr/lib64/pipewire-0.3/libpipewire-module-client-node.so
Download failed: No route to host.  Continuing without executable for /usr/lib64/pipewire-0.3/libpipewire-module-client-node.so.                                                             

warning: Can't open file /usr/lib64/pipewire-0.3/libpipewire-module-client-node.so during file-backed mapping note processing
Downloading executable for /usr/lib64/libpcre2-8.so.0.11.2
Download failed: No route to host.  Continuing without executable for /usr/lib64/libpcre2-8.so.0.11.2.                                                                                       

warning: Can't open file /usr/lib64/libpcre2-8.so.0.11.2 during file-backed mapping note processing
Downloading executable for /usr/lib64/libselinux.so.1
Download failed: No route to host.  Continuing without executable for /usr/lib64/libselinux.so.1.                                                                                            

warning: Can't open file /usr/lib64/libselinux.so.1 during file-backed mapping note processing
Downloading executable for /usr/lib64/pipewire-0.3/libpipewire-module-protocol-native.so
Download failed: No route to host.  Continuing without executable for /usr/lib64/pipewire-0.3/libpipewire-module-protocol-native.so.                                                         

warning: Can't open file /usr/lib64/pipewire-0.3/libpipewire-module-protocol-native.so during file-backed mapping note processing
Downloading executable for /usr/lib64/libdbus-1.so.3.32.4
Download failed: No route to host.  Continuing without executable for /usr/lib64/libdbus-1.so.3.32.4.                                                                                        

warning: Can't open file /usr/lib64/libdbus-1.so.3.32.4 during file-backed mapping note processing
Downloading executable for /usr/lib64/libzstd.so.1.5.5
Download failed: No route to host.  Continuing without executable for /usr/lib64/libzstd.so.1.5.5.                                                                                           

warning: Can't open file /usr/lib64/libzstd.so.1.5.5 during file-backed mapping note processing
Downloading executable for /usr/lib64/libsystemd.so.0.37.0
Download failed: No route to host.  Continuing without executable for /usr/lib64/libsystemd.so.0.37.0.                                                                                       

warning: Can't open file /usr/lib64/libsystemd.so.0.37.0 during file-backed mapping note processing

warning: Can't open file /usr/lib/locale/locale-archive during file-backed mapping note processing

warning: Can't open file /memfd:pipewire-memfd:flags=0x0000000f,type=2,size=4096 (deleted) during file-backed mapping note processing
Downloading executable for /usr/lib64/pipewire-0.3/libpipewire-module-link-factory.so
Download failed: No route to host.  Continuing without executable for /usr/lib64/pipewire-0.3/libpipewire-module-link-factory.so.                                                            

warning: Can't open file /usr/lib64/pipewire-0.3/libpipewire-module-link-factory.so during file-backed mapping note processing
Downloading executable for /usr/lib64/pipewire-0.3/libpipewire-module-access.so
Download failed: No route to host.  Continuing without executable for /usr/lib64/pipewire-0.3/libpipewire-module-access.so.                                                                  

warning: Can't open file /usr/lib64/pipewire-0.3/libpipewire-module-access.so during file-backed mapping note processing
Downloading executable for /usr/lib64/pipewire-0.3/libpipewire-module-portal.so
Download failed: No route to host.  Continuing without executable for /usr/lib64/pipewire-0.3/libpipewire-module-portal.so.                                                                  

warning: Can't open file /usr/lib64/pipewire-0.3/libpipewire-module-portal.so during file-backed mapping note processing
Downloading executable for /usr/lib64/pipewire-0.3/libpipewire-module-client-device.so
Download failed: No route to host.  Continuing without executable for /usr/lib64/pipewire-0.3/libpipewire-module-client-device.so.                                                           

warning: Can't open file /usr/lib64/pipewire-0.3/libpipewire-module-client-device.so during file-backed mapping note processing
Downloading executable for /usr/lib64/pipewire-0.3/libpipewire-module-spa-node-factory.so
--Type <RET> for more, q to quit, c to continue without paging--c
Download failed: No route to host.  Continuing without executable for /usr/lib64/pipewire-0.3/libpipewire-module-spa-node-factory.so.                                                        

warning: Can't open file /usr/lib64/pipewire-0.3/libpipewire-module-spa-node-factory.so during file-backed mapping note processing
Downloading executable for /usr/lib64/pipewire-0.3/libpipewire-module-spa-device-factory.so
Download failed: No route to host.  Continuing without executable for /usr/lib64/pipewire-0.3/libpipewire-module-spa-device-factory.so.                                                      

warning: Can't open file /usr/lib64/pipewire-0.3/libpipewire-module-spa-device-factory.so during file-backed mapping note processing
Downloading executable for /usr/lib64/liblzma.so.5.4.4
Download failed: No route to host.  Continuing without executable for /usr/lib64/liblzma.so.5.4.4.                                                                                           

warning: Can't open file /usr/lib64/liblzma.so.5.4.4 during file-backed mapping note processing
Downloading executable for /usr/lib64/liblz4.so.1.9.4
Download failed: No route to host.  Continuing without executable for /usr/lib64/liblz4.so.1.9.4.                                                                                            

warning: Can't open file /usr/lib64/liblz4.so.1.9.4 during file-backed mapping note processing
Downloading executable for /usr/lib64/libm.so.6
Download failed: No route to host.  Continuing without executable for /usr/lib64/libm.so.6.                                                                                                  

warning: Can't open file /usr/lib64/libm.so.6 during file-backed mapping note processing
Downloading executable for /usr/lib64/pipewire-0.3/libpipewire-module-metadata.so
Download failed: No route to host.  Continuing without executable for /usr/lib64/pipewire-0.3/libpipewire-module-metadata.so.                                                                

warning: Can't open file /usr/lib64/pipewire-0.3/libpipewire-module-metadata.so during file-backed mapping note processing
Downloading executable for /usr/lib64/pipewire-0.3/libpipewire-module-profiler.so
Download failed: No route to host.  Continuing without executable for /usr/lib64/pipewire-0.3/libpipewire-module-profiler.so.                                                                

warning: Can't open file /usr/lib64/pipewire-0.3/libpipewire-module-profiler.so during file-backed mapping note processing
Downloading executable for /usr/lib64/pipewire-0.3/libpipewire-module-rt.so
Download failed: No route to host.  Continuing without executable for /usr/lib64/pipewire-0.3/libpipewire-module-rt.so.                                                                      

warning: Can't open file /usr/lib64/pipewire-0.3/libpipewire-module-rt.so during file-backed mapping note processing

warning: Can't open file /usr/lib64/gconv/gconv-modules.cache during file-backed mapping note processing
Downloading executable for /usr/lib64/spa-0.2/support/libspa-dbus.so
Download failed: No route to host.  Continuing without executable for /usr/lib64/spa-0.2/support/libspa-dbus.so.                                                                             

warning: Can't open file /usr/lib64/spa-0.2/support/libspa-dbus.so during file-backed mapping note processing
Downloading executable for /usr/lib64/libgcc_s-13-20231205.so.1
Download failed: No route to host.  Continuing without executable for /usr/lib64/libgcc_s-13-20231205.so.1.                                                                                  

warning: Can't open file /usr/lib64/libgcc_s-13-20231205.so.1 during file-backed mapping note processing
Downloading executable for /usr/lib64/libc.so.6
Download failed: No route to host.  Continuing without executable for /usr/lib64/libc.so.6.                                                                                                  

warning: Can't open file /usr/lib64/libc.so.6 during file-backed mapping note processing
Downloading executable for /usr/lib64/libpipewire-0.3.so.0.1000.0
Download failed: No route to host.  Continuing without executable for /usr/lib64/libpipewire-0.3.so.0.1000.0.                                                                                

warning: Can't open file /usr/lib64/libpipewire-0.3.so.0.1000.0 during file-backed mapping note processing
Downloading executable for /usr/lib64/libcap.so.2.48
Download failed: No route to host.  Continuing without executable for /usr/lib64/libcap.so.2.48.                                                                                             

warning: Can't open file /usr/lib64/libcap.so.2.48 during file-backed mapping note processing
Downloading executable for /usr/lib64/spa-0.2/support/libspa-journal.so
Download failed: No route to host.  Continuing without executable for /usr/lib64/spa-0.2/support/libspa-journal.so.                                                                          

warning: Can't open file /usr/lib64/spa-0.2/support/libspa-journal.so during file-backed mapping note processing
Downloading executable for /usr/lib64/spa-0.2/support/libspa-support.so
Download failed: No route to host.  Continuing without executable for /usr/lib64/spa-0.2/support/libspa-support.so.                                                                          

warning: Can't open file /usr/lib64/spa-0.2/support/libspa-support.so during file-backed mapping note processing
[New LWP 1942]
[New LWP 1926]
Downloading executable for /tmp/tmpne0i3hax
Download failed: No route to host.  Continuing without executable for /tmp/tmpne0i3hax.                                                                                                      
Downloading separate debug info for system-supplied DSO at 0x7fff8359d000
Download failed: No route to host.  Continuing without separate debug info for system-supplied DSO at 0x7fff8359d000.                                                                        
Core was generated by `/usr/bin/pipewire'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f3ba18badb6 in ?? ()
[Current thread is 1 (LWP 1942)]
(gdb) bt
#0  0x00007f3ba18badb6 in ?? ()
#1  0x00007f3ba2d99c50 in ?? ()
#2  0x0000063b5ca879df in ?? ()
#3  0x0100000100000030 in ?? ()
#4  0x0000000000000000 in ?? ()
(gdb) bt
#0  0x00007f3ba18badb6 in ?? ()
#1  0x00007f3ba2d99c50 in ?? ()
#2  0x0000063b5ca879df in ?? ()
#3  0x0100000100000030 in ?? ()
#4  0x0000000000000000 in ?? ()
(gdb) Traceback (most recent call last):
  File "/usr/bin/flatpak-coredumpctl", line 83, in <module>
    coredumper.run()
  File "/usr/bin/flatpak-coredumpctl", line 58, in run
    subprocess.check_call(flatpak_command)
  File "/usr/lib64/python3.12/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['flatpak', 'run', '--filesystem=home', '--filesystem=/tmp', '--command=gdb', '--devel', 'com.yubico.yubioath', '/usr/bin/pipewire', '/tmp/tmpne0i3hax']' returned non-zero exit status 137.
AdamVe commented 6 months ago

Hi, I am sorry to hear that the app is crashing. Could you try the following to see if the official build has the same issue?

  1. in terminal, create a new folder
    cd ~ && mkdir ya-test && cd ya-test
  2. get Yubico Authenticator build from our Release page (https://developers.yubico.com/yubioath-flutter/Releases/)
    wget https://developers.yubico.com/yubioath-flutter/Releases/yubico-authenticator-6.3.1-linux.tar.gz
  3. Unpack the archive and run the app
    tar xzf yubico-authenticator-6.3.1-linux.tar.gz
    cd yubico-authenticator-6.3.1-linux
    ./authenticator

    Let me know if you have any questions and whether the app also crashes or not.

Be-ing commented 6 months ago

The build from https://developers.yubico.com/yubioath-flutter/Releases/ doesn't crash, only the flatpak. Both are version 6.3.1. Perhaps the flatpak manifest is missing some permission and the application crashes when the flatpak sandbox blocks it from doing something?

Be-ing commented 6 months ago

I just realized the flatpak on Flathub is unofficial. This is surprising and disappointing in wake of the choice to move to Flutter, which isn't packaged by most Linux distros (I'm not sure if that's due to policy reasons, lack of effort, or both). I expected Linux support to be maintained by Yubico with a practical package format that allows automatic updating (flatpak).

Be-ing commented 6 months ago

I installed 6.0.0 (commit af8f9ba2c5cac564e21ad5f7e2be4dcbfbdccbe41e930ca1f1ae52c68c08bdac) and 5.1.0 (commit adab42d3ee859f7ab354bf80ca93bab8df409df9079db60531b4f788576ea464) from Flathub and can reproduce the crash with both of them. This used to work without crashing on my machine, so it seems something changed in Fedora and/or KDE that's causing the crash. Regardless, Yubico Authenticator should show some error instead of crashing.

I have pcsc-lite-2.0.1-1.fc39.x86_64 installed and systemctl status pcscd shows it is running. journalctl -u pcscd shows:

Jan 08 19:21:03 unknown00e04c205662.attlocal.net systemd[1]: Started pcscd.service - PC/SC Smart Card Daemon.
Jan 08 19:21:03 unknown00e04c205662.attlocal.net (pcscd)[63773]: pcscd.service: Referenced but unset environment variable evaluates to an empty string: PCSCD_ARGS
AdamVe commented 6 months ago

Thanks for detailed investigation. We chose to avoid using any particular linux packaging solution for Yubico Authenticator with the goal to support all linux environments and minimize issues which can be related to third party components - this gives us the power to make sure that the app, as we release it, will work correctly on the platforms we state as supported. We will investigate if we could handle the error you have in a more user friendly way.