AppFlowy icon indicating copy to clipboard operation
AppFlowy copied to clipboard

[Bug] Failed to load dynamic library 'libdart_ffi.so'

Open sharp opened this issue 4 years ago • 8 comments

截屏2021-12-01 下午11 07 07

Hello, when I run app with vs code&android&mac m1, it gave error:

ArgumentError (Invalid argument(s): Failed to load dynamic library 'libdart_ffi.so': dlopen failed: library "libdart_ffi.so" not found)

截屏2021-12-01 下午11 09 08

sharp avatar Dec 01 '21 15:12 sharp

Are you trying to build for android? Appflowy only supports desktops as of now

irfanbacker avatar Dec 01 '21 17:12 irfanbacker

@irfanbacker Got it , thanks

sharp avatar Dec 02 '21 01:12 sharp

@irfanbacker Got it , thanks

You can close the issue then

irfanbacker avatar Dec 02 '21 06:12 irfanbacker

Found this issue through the FAQ. On Fedora you may need to install openssl1.1.x86_64, e.g.

sudo dnf in openssl1.1.x86_64 # Workstation
rpm-ostree upgrade && rpm-ostree install openssl1.1.x86_64 # Silverblue

jcdickinson avatar May 21 '22 16:05 jcdickinson

I did this on Ubuntu 22.04.

  • When I first launched the Linux built app, got the blank window.
  • Ran the app through the terminal: ~/Downloads/AppFlowy/app_flowy and saw the libssl whatever not being found.
  • Then ran ldd ~/Downloads/AppFlowy/lib/libdart_ffi.so which was first read to reach the error and shown the missing 2 library links, which Ubuntu has new versions of:
    libssl.so.1.1 => not found
    libcrypto.so.1.1 => not found
    
  • So now I needed to see if the exact versions are available somewhere, and ran sudo find / -name "libssl*", which had found that that torguard app has them in its lib directory!
  • I also understood that LD_LIBRARY_PATH variable is used to find those libraries and initially echoing it has an empty result!
  • So I first tried to run the app counting those libraries in LD_LIBRARY_PATH="/opt/torguard/lib" ~/Downloads/AppFlowy/app_flowy and it worked!
  • Now I copied them the 2 libraries to /usr/local/lib, then touched 2 conf files for them like so:
    • sudo nano /etc/ld.so.conf.d/libcrypto.so.1.1.conf with only /usr/local/lib inside.
    • sudo nano /etc/ld.so.conf.d/libssl.so.1.1.conf with only /usr/local/lib inside.
  • Now just had to export LD_LIBRARY_PATH="/usr/local/lib, I guess, then run sudo ldconfig to save it all! 😋

Credits: dave1 and HeadOnFire (from Laravel community)

Random72IsTaken avatar Jun 17 '22 19:06 Random72IsTaken

An easier way to get the missing libraries in Ubuntu 22.04:

$ wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1l-1ubuntu1.6_amd64.deb $ sudo dpkg -i libssl1.1_1.1.1l-1ubuntu1.6_amd64.deb

if the above doesn''t work, see https://stackoverflow.com/a/72633324/132510.

alflanagan avatar Jul 19 '22 11:07 alflanagan

Reopened because this problem seems to be our "blank page" problem. I will check this out. We problably need to add to the documentation. Note to self: also look at #566

MikeWallaceDev avatar Jul 23 '22 14:07 MikeWallaceDev

Hey @MikeWallaceDev , how is this related to the blank page problem? Assuming you mean #136 ?

aarhusgregersen avatar Aug 06 '22 17:08 aarhusgregersen

It crash even the flatpak https://github.com/flathub/io.appflowy.AppFlowy/issues/12

yodatak avatar Feb 13 '23 18:02 yodatak

Same thing for the flatpak version

ldd /home/yodatak/.local/share/flatpak/app/io.appflowy.AppFlowy/x86_64/stable/df5e19d9bbfc49b666700edeb08529bc8064abce328cd6bdcee9b35db5241baf/files/appflowy/lib/libdart_ffi.so linux-vdso.so.1 (0x00007ffd50f0c000) libssl.so.1.1 => not found libcrypto.so.1.1 => not found libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f05429e0000) librt.so.1 => /lib64/librt.so.1 (0x00007f0543fb7000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0543fb2000) libm.so.6 => /lib64/libm.so.6 (0x00007f0542900000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f0543fab000) libc.so.6 => /lib64/libc.so.6 (0x00007f0542723000) /lib64/ld-linux-x86-64.so.2 (0x00007f0543fda000)

yodatak avatar Feb 25 '23 21:02 yodatak

The flatpak version gives a blank page. In the terminal:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument(s): Failed to load dynamic library 'libdart_ffi.so': libssl.so.1.1: cannot open shared object file: No such file or directory
#0      _open (dart:ffi-patch/ffi_dynamic_library_patch.dart:12)
#1      new DynamicLibrary.open (dart:ffi-patch/ffi_dynamic_library_patch.dart:23)
#2      _open (package:appflowy_backend/ffi.dart:27)
#3      _dart_ffi_lib (package:appflowy_backend/ffi.dart:10)
#4      _set_stream_port (package:appflowy_backend/ffi.dart)
#5      set_stream_port (package:appflowy_backend/ffi.dart)
#6      FlowySDK.init (package:appflowy_backend/appflowy_backend.dart:32)
#7      InitRustSDKTask.initialize.<anonymous closure> (package:app_flowy/startup/tasks/rust_sdk.dart:24)
<asynchronous suspension>
#8      AppLauncher.launch (package:app_flowy/startup/startup.dart:124)
<asynchronous suspension>
#9      FlowyRunner.run (package:app_flowy/startup/startup.dart:64)
<asynchronous suspension>
#10     main (package:app_flowy/main.dart:25)
<asynchronous suspension>

johnblommers avatar Mar 03 '23 05:03 johnblommers

Still not working? @johnblommers

annieappflowy avatar Jun 12 '23 11:06 annieappflowy

Still not working? @johnblommers

appflowy is working normally today. Thanks for asking :-)

johnblommers avatar Jun 12 '23 18:06 johnblommers