AppFlowy icon indicating copy to clipboard operation
AppFlowy copied to clipboard

Cannot run on Ubuntu22.4

Open JamesUmmec opened this issue 3 years ago • 15 comments

When running on Ubuntu22.4 (linux x86_64), the window stay blank and cannot show anything.

  • Operating system: Ubuntu22.4, x86_64 GNU/Linux

Here are cli output when running this app:

[ERROR:flutter/lib/ui/ui_dart_state.cc(198)] 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:flowy_sdk/ffi.dart:23)
#3      _dl (package:flowy_sdk/ffi.dart:10)
#4      _set_stream_port (package:flowy_sdk/ffi.dart)
#5      set_stream_port (package:flowy_sdk/ffi.dart)
#6      FlowySDK.init (package:flowy_sdk/flowy_sdk.dart:32)
#7      InitRustSDKTask.initialize.<anonymous closure> (package:app_flowy/startup/tasks/rust_sdk.dart:13)
#8      InitRustSDKTask.initialize.<anonymous closure> (package:app_flowy/startup/tasks/rust_sdk.dart:12)
#9      _rootRunUnary (dart:async/zone.dart:1434)
<asynchronous suspension>
#10     InitRustSDKTask.initialize (package:app_flowy/startup/tasks/rust_sdk.dart:12)
<asynchronous suspension>
#11     AppLauncher.launch (package:app_flowy/startup/startup.dart:99)
<asynchronous suspension>

JamesUmmec avatar Jun 18 '22 13:06 JamesUmmec

I ran into the same situation and found that a problem with packaging in 22.04 causes the issue. A more detailed discussion can be found here.

Just use:

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

Works fine for me (for now)!

jpastolfo avatar Jul 15 '22 12:07 jpastolfo

@JamesUmmec are you still having the issue?

annieappflowy avatar Jul 18 '22 11:07 annieappflowy

@JamesUmmec are you still having the issue?

Sorry, I'm now using arch rather than ubuntu. 😂

JamesUmmec avatar Jul 19 '22 01:07 JamesUmmec

Ah ok, if you are no longer having issues with running AppFlowy on your device, please close this issue. Thanks

annieappflowy avatar Jul 19 '22 02:07 annieappflowy

Would it be helpful if I work on a snap package of AppFlowy?

willlogs avatar Jul 19 '22 11:07 willlogs

The problem persists - I have the very same error on my Fedora 36 after extracting the tar file, moving the AppFlowy directory to /opt/ and trying to start as a regular user instead of admin. The error message reads the same as above, but in german.

[tliebig@FEDORA-36` ~]$ cd /opt/AppFlowy/
[tliebig@FEDORA-36 AppFlowy]$ ./app_flowy 
[ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: Invalid argument(s): Failed to load dynamic library 'libdart_ffi.so': libssl.so.1.1: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
#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:flowy_sdk/ffi.dart:23)
#3      _dl (package:flowy_sdk/ffi.dart:10)
#4      _set_stream_port (package:flowy_sdk/ffi.dart)
#5      set_stream_port (package:flowy_sdk/ffi.dart)
#6      FlowySDK.init (package:flowy_sdk/flowy_sdk.dart:32)
#7      InitRustSDKTask.initialize.<anonymous closure> (package:app_flowy/startup/tasks/rust_sdk.dart:13)
#8      InitRustSDKTask.initialize.<anonymous closure> (package:app_flowy/startup/tasks/rust_sdk.dart:12)
#9      _rootRunUnary (dart:async/zone.dart:1434)
<asynchronous suspension>
#10     InitRustSDKTask.initialize (package:app_flowy/startup/tasks/rust_sdk.dart:12)
<asynchronous suspension>
#11     AppLauncher.launch (package:app_flowy/startup/startup.dart:99)
<asynchronous suspension>

tliebig avatar Jul 19 '22 20:07 tliebig

I also have same issue on Fedora 36.

manV avatar Jul 21 '22 04:07 manV

@tliebig @manV Please search the issue tracker before posting new questions. You need to install another library for Fedora 36. you can find instructions here: https://github.com/AppFlowy-IO/AppFlowy/issues/112#issuecomment-1133666925

FinnRG avatar Jul 21 '22 12:07 FinnRG

I had the same problem on Fedora 36 Silverblue. However, installing sudo rpm-ostree install openssl-devel did not solve the issue.

On Ubuntu, you'd have to find the libraries that provide the libssl-dev packages, I believe.

This dependency should be called out on the README for now, or somewhere else. Otherwise, if this can be packaged as a Flatpak, I think you'd reach a larger, much more accepting audience. Obsidian is nice, but it's closed source, Joplin is nice, but everything is in one bucket.

FilBot3 avatar Jul 21 '22 19:07 FilBot3

Should be solved here: Issue https://github.com/AppFlowy-IO/AppFlowy/issues/112 but the version of OpenSSL I have installed is supposedly much newer?

➜  AppFlowy 
> openssl version
OpenSSL 3.0.5 5 Jul 2022 (Library: OpenSSL 3.0.5 5 Jul 2022)

FilBot3 avatar Jul 21 '22 19:07 FilBot3

@FilBot3 thanks for your input. We decide to work on supporting Flatpak. Please follow this thread for the update: https://github.com/AppFlowy-IO/AppFlowy/issues/175 RE: update the dependency, can you clarify what dependencies for which system? We're open to documentation contributions. Maybe you can directly edit it and submit a PR. It can probably goes here: https://github.com/AppFlowy-IO/AppFlowy-Docs/blob/main/essential-documentation/install-appflowy/installation-methods/mac-windows-linux-packages/installing-on-linux.md

annieappflowy avatar Jul 22 '22 03:07 annieappflowy

I will check this out. We problably need to add to the documentation. Note to self: also look at #112

MikeWallaceDev avatar Jul 23 '22 14:07 MikeWallaceDev

confirmed on Pop!_OS 22.04 LTS (ostensibly, Ubuntu 22.04)

fixed with sudo apt install libssl1.1 (because the lib is in the official repos)

Ch4ni avatar Aug 01 '22 06:08 Ch4ni

Should be solved here: Issue #112 but the version of OpenSSL I have installed is supposedly much newer?

➜  AppFlowy 
> openssl version
OpenSSL 3.0.5 5 Jul 2022 (Library: OpenSSL 3.0.5 5 Jul 2022)

for fedora you should be able to resolve your issue with sudo dnf install openssl1.1 IIRC (it's been a few months since I looked, dnf search ssl1.1 should give you some ideas, if not try the dnf search again with libssl1.1 and openssl)

Ch4ni avatar Aug 01 '22 06:08 Ch4ni

libssl1.1_1.1.1l-1ubuntu1.6_amd64.deb is 404

Works with : wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb

juliendf avatar Aug 10 '22 13:08 juliendf

This problem also happens on Void.

IcedQuinn avatar Dec 25 '22 17:12 IcedQuinn

Happened on Gentoo.

System Info Linux raylaptop 5.15.80-gentoo #14 SMP Sun Jan 8 19:56:27 CST 2023 x86_64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz GenuineIntel GNU/Linux

OpenSSL Info OpenSSL 1.1.1s 1 Nov 2022

When maually link libssl.so to libssl.so.3, same to libcrypto.so.3, error is: ~  [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: Invalid argument(s): Failed to load dynamic library 'libdart_ffi.so': /usr/lib64/libcrypto.so.3: versionOPENSSL_3.0.0' not found (required by /opt/appflowy-bin/lib/libdart_ffi.so) #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:flowy_sdk/ffi.dart:27) #3 _dart_ffi_lib (package:flowy_sdk/ffi.dart:10) #4 _set_stream_port (package:flowy_sdk/ffi.dart) #5 set_stream_port (package:flowy_sdk/ffi.dart) #6 FlowySDK.init (package:flowy_sdk/flowy_sdk.dart:32) #7 InitRustSDKTask.initialize. (package:app_flowy/startup/tasks/rust_sdk.dart:24) #8 InitRustSDKTask.initialize. (package:app_flowy/startup/tasks/rust_sdk.dart:23) #9 _rootRunUnary (dart:async/zone.dart:1434) #10 AppLauncher.launch (package:app_flowy/startup/startup.dart:124) #11 FlowyRunner.run (package:app_flowy/startup/startup.dart:64) #12 main (package:app_flowy/main.dart:25) `

oopschen avatar Jan 18 '23 01:01 oopschen

Hi

I have the same problem on Ubuntu. The window stays blank. I tried all the things written in this chat, but nothing works. I am not an experienced user, so if there is a solution to this issue, I would be really grateful if somebody could break it down to single steps to follow. Thanks! Hopefully, I can use Appflowy soon!

PaulLafargue avatar Feb 24 '23 11:02 PaulLafargue

Hey, @PaulLafargue. There's a workaround for Ubuntu users.

wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb

https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/environment-setup/building-on-linux

LucasXu0 avatar Feb 24 '23 13:02 LucasXu0

Hey @LucasXu0

Thanks for your help. I tried that, but when I open AppFlowy, the page still remains blank. How can I provide you with more information about my problem?

PaulLafargue avatar Feb 25 '23 11:02 PaulLafargue

is this issue open...I want to give it a try

prashant235913 avatar Mar 22 '23 17:03 prashant235913

Hey, @PaulLafargue. Yes. I think we need to embed the libssl into the package to solve this problem.

LucasXu0 avatar Mar 23 '23 03:03 LucasXu0

Hey, @LucasXu0 . Well, I didn't open AppFlowy for some weeks after I couldn't solve the problem. But when I opened it some days ago, it suddenly worked. I have no idea why.

PaulLafargue avatar Mar 23 '23 07:03 PaulLafargue

Hi, guys,

I was wondering why you don't use a newer version of OpenSSL. The openssl 1.1.1 version is coming to the end of its life (see https://en.wikipedia.org/wiki/OpenSSL) and that's why it's no longer installed by default on new versions of linux distributions.

VxDlH avatar Jun 21 '23 05:06 VxDlH