Yubico / yubioath-flutter

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

ERROR: ImportError: libffi.so.7: cannot open shared object file: No such file or directory #1726

Closed eliroca closed 3 days ago

eliroca commented 2 weeks ago

Hi, trying to get the app running on linux, I get this error.

My system:

❯ lsb_release -a
Distributor ID: openSUSE
Description:    openSUSE Tumbleweed
Release:    20241105

❯ uname -srm
Linux 6.11.6-2-default x86_64
❯ zypper search --installed-only libffi
S  | Name         | Summary                                   | Type
---+--------------+-------------------------------------------+--------
i+ | libffi-devel | Include files for development with libffi | package
i+ | libffi8      | Foreign Function Interface Library        | package

❯ rpm -ql libffi8
/usr/lib64/libffi.so.8
/usr/lib64/libffi.so.8.1.4
/usr/share/licenses/libffi8
/usr/share/licenses/libffi8/LICENSE

Output:

yubico-authenticator-7.1.1-linux 
❯ ./authenticator 
21:12:52.291 [desktop.init] INFO: Logging initialized, outputting to stderr
21:12:52.293 [desktop.init] INFO: Window hidden on startup: false
21:12:52.293 [desktop.init] INFO: Starting Helper subprocess: /home/eli/yubico-authenticator-7.1.1-linux/helper/authenticator-helper
21:12:52.293 [main] INFO: Running Yubico Authenticator...
{app_version: 7.1.1, dart: 3.5.2 (stable) (Wed Aug 28 10:01:20 2024 +0000) on "linux_x64", os: linux, os_version: Linux 6.11.6-2-default #1 SMP PREEMPT_DYNAMIC Mon Nov  4 08:15:48 UTC 2024 (8545f24)}
21:12:52.298 [desktop.init] INFO: Helper process started

(authenticator:81507): Gtk-CRITICAL **: 21:12:52.406: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
21:12:52.515 [helper] ERROR: Traceback (most recent call last):
21:12:52.515 [helper] ERROR:   File "authenticator-helper.py", line 17, in <module>
21:12:52.515 [helper] ERROR:   File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
21:12:52.515 [helper] ERROR:   File "helper/__init__.py", line 16, in <module>
21:12:52.515 [helper] ERROR:   File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
21:12:52.515 [helper] ERROR:   File "helper/device.py", line 26, in <module>
21:12:52.515 [helper] ERROR:   File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
21:12:52.515 [helper] ERROR:   File "helper/management.py", line 21, in <module>
21:12:52.515 [helper] ERROR:   File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
21:12:52.515 [helper] ERROR:   File "ykman/device.py", line 59, in <module>
21:12:52.515 [helper] ERROR:   File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
21:12:52.515 [helper] ERROR:   File "ctypes/__init__.py", line 8, in <module>
21:12:52.515 [helper] ERROR: ImportError: libffi.so.7: cannot open shared object file: No such file or directory
21:12:52.515 [helper] ERROR: [PYI-81540:ERROR] Failed to execute script 'authenticator-helper' due to unhandled exception!
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Bad state: No elements
#0      _NextRequest.update (package:async/src/stream_queue.dart:695)
#1      StreamQueue._updateRequests (package:async/src/stream_queue.dart:419)
#2      StreamQueue._close (package:async/src/stream_queue.dart:513)
#3      StreamQueue._ensureListening.<anonymous closure> (package:async/src/stream_queue.dart:481)
#4      _RootZone.runGuarded (dart:async/zone.dart:1582)
#5      _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:418)
#6      _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:428)
#7      _BufferingStreamSubscription._close (dart:async/stream_impl.dart:317)
#8      _ForwardingStream._handleDone (dart:async/stream_pipe.dart:99)
#9      _ForwardingStreamSubscription._handleDone (dart:async/stream_pipe.dart:161)
#10     _RootZone.runGuarded (dart:async/zone.dart:1582)
#11     _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:418)
#12     _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:428)
#13     _BufferingStreamSubscription._close (dart:async/stream_impl.dart:317)
#14     _SinkTransformerStreamSubscription._close (dart:async/stream_transformers.dart:87)
#15     _EventSinkWrapper.close (dart:async/stream_transformers.dart:21)
#16     _ByteAdapterSink.close (dart:convert/byte_conversion.dart:53)
#17     _LineSplitterSink.close (dart:convert/line_splitter.dart:141)
#18     _SinkTransformerStreamSubscription._handleDone (dart:async/stream_transformers.dart:132)
#19     _RootZone.runGuarded (dart:async/zone.dart:1582)
#20     _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:418)
#21     _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:428)
#22     _BufferingStreamSubscription._close (dart:async/stream_impl.dart:317)
#23     _SinkTransformerStreamSubscription._close (dart:async/stream_transformers.dart:87)
#24     _EventSinkWrapper.close (dart:async/stream_transformers.dart:21)
#25     _ByteAdapterSink.close (dart:convert/byte_conversion.dart:53)
#26     _Utf8ConversionSink.close (dart:convert/string_conversion.dart:295)
#27     _ConverterStreamEventSink.close (dart:convert/chunked_conversion.dart:78)
#28     _SinkTransformerStreamSubscription._handleDone (dart:async/stream_transformers.dart:132)
#29     _RootZone.runGuarded (dart:async/zone.dart:1582)
#30     _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:418)
#31     _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:428)
#32     _BufferingStreamSubscription._close (dart:async/stream_impl.dart:317)
#33     _SyncStreamControllerDispatch._sendDone (dart:async/stream_controller.dart:792)
#34     _StreamController._closeUnchecked (dart:async/stream_controller.dart:647)
#35     _StreamController.close (dart:async/stream_controller.dart:640)
#36     _Socket._onData (dart:io-patch/socket_patch.dart:2462)
#37     _RootZone.runUnaryGuarded (dart:async/zone.dart:1594)
#38     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:365)
#39     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:297)
#40     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:784)
#41     _StreamController._add (dart:async/stream_controller.dart:658)
#42     _StreamController.add (dart:async/stream_controller.dart:606)
#43     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1949)
#44     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1378)
#45     _microtaskLoop (dart:async/schedule_microtask.dart:40)
#46     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49)

** (authenticator:81507): WARNING **: 21:12:58.845: Attempted to set message handler on an FlBinaryMessenger without an engine

** (authenticator:81507): WARNING **: 21:12:58.845: Attempted to set message handler on an FlBinaryMessenger without an engine
eliroca commented 2 weeks ago

If I cp helper/_internal/libffi.so.7 /usr/lib64/libffi.so.7 then the app works..

AdamVe commented 3 days ago

Hi, I tested on a more recent Tumbleweed version (20241119) and couldn’t reproduce the error with the package downloaded from https://developers.yubico.com/yubioath-flutter/Releases/. However, I was able to reproduce the exact stack trace you mentioned by removing the libffi.so.7 file from the _internal folder.

Could you try to reproduce the issue with version 7.1.0? This will help us pinpoint when the issue was introduced.

eliroca commented 3 days ago

Hi, version 7.1.0 seems to work fine.

AdamVe commented 3 days ago

Thanks for quick confirmation, that is helpful.

eliroca commented 3 days ago

Actually, even 7.1.1 starts just fine, running TW 20241118.

AdamVe commented 3 days ago

That sounds good. I am going to test the original version for which you reported (20241105) if the issue can still be reproduced there. I didn't think about that when I downloaded the image.

AdamVe commented 3 days ago

I was not able to reproduce with the 20241105 snapshot, but this can be because I had to tumbleweed switch from 20241119 to 20241105 which might be different from installing from scratch. I tried this with both KDE and GNOME.

eliroca commented 3 days ago

Thank you for trying that out, I'll close this for now.