[Bug] 0.6.3, 0.6.4, 0.6.5 - Linux - Import Data and Insert Image Cannot Browse Folder
Bug Description
When I go to Settings -> Manage Data -> Import Data -> Browse File, it doesn't open the folder selection dialog.
This also affects the "Insert Image" functionality. You cannot select an image to insert from the file system.
How to Reproduce
Have AppFlowy 0.6.3, 0.6.4 or 0.6.5 on a Linux machine and go to:
Settings -> Manage Data -> Import Data -> Browse File
or
Add an Image -> Upload -> Click to upload image
Expected Behavior
It should allow to select a folder to import the data or insert an image on each case.
Operating System
Ubuntu 24.04 LTS
AppFlowy Version(s)
0.6.3, 0.6.4, 0.6.5
Screenshots
Additional Context
No response
Confirmed on 0.6.6 (snap) Ubuntu 22.04.4 LTS x86_64 GNOME 42.9 - Mutter
The log shows:
{"msg":"[USER_DIR - END]","time":"08-08 11:51:18","target":"flowy_user::user_manager::manager"}
2024-08-08 11:51:19 ERROR dart_ffi: [Flutter]: Uncaught platform error
at dart-ffi/src/lib.rs:245
{"msg":"[Flutter]: Uncaught platform error","time":"08-08 11:51:19","target":"dart_ffi"}
2024-08-08 11:51:21 ERROR dart_ffi: [Flutter]: Uncaught platform error
at dart-ffi/src/lib.rs:245
{"msg":"[Flutter]: Uncaught platform error","time":"08-08 11:51:21","target":"dart_ffi"}
2024-08-08 11:51:21 ERROR dart_ffi: [Flutter]: Uncaught platform error
at dart-ffi/src/lib.rs:245
{"msg":"[Flutter]: Uncaught platform error","time":"08-08 11:51:21","target":"dart_ffi"}
The same error, referencing the same line in lib.rs, appears when using any of the import buttons under the modal that opens at the + button, then import, at a workspace.
2024-08-29 10:53:52 ERROR dart_ffi: [Flutter]: Uncaught platform error
at dart-ffi/src/lib.rs:245
{"msg":"[Flutter]: Uncaught platform error","time":"08-29 10:53:52","target":"dart_ffi"}
Version 0.7.0 still has the issue.
And it comes with more detailed errors!
2024-10-04 12:15:48 ERROR dart_ffi: [Flutter]: Uncaught platform error
StackTrace:
#0 isExecutableOnPath (package:file_picker/src/utils.dart:60)
<asynchronous suspension>
#1 FilePickerLinux._getPathToExecutable (package:file_picker/src/linux/file_picker_linux.dart:127)
<asynchronous suspension>
#2 FilePickerLinux.pickFiles (package:file_picker/src/linux/file_picker_linux.dart:29)
<asynchronous suspension>
#3 FilePicker.pickFiles (package:flowy_infra/file_picker/file_picker_impl.dart:25)
<asynchronous suspension>
#4 _ImportPanelState._importFile (package:appflowy/workspace/presentation/home/menu/sidebar/import/import_panel.dart:143)
<asynchronous suspension>
#5 _ImportPanelState.build.<anonymous closure>.<anonymous closure> (package:appflowy/workspace/presentation/home/menu/sidebar/import/import_panel.dart:115)
<asynchronous suspension>
at dart-ffi/src/lib.rs:291
I think I may have found the solution to this, or at the very least the problem. I run KDE on EndeavourOS, based on Arch with very few changes, and specifically I was missing the kdialog package. Took a bit of looking but found this documentation that explains that the dart file_picker library executes shell comands to qarma, zenity, or kdialog to create a file picker.
As a short term solution users can install garma, zenity, or kdialog to get the picker working. As a long term solution it may be better to move to the official Google file_selector as mentioned in the above linked documentation. I will go ahead and mention this in the other closed issue as well in case others end up there first.
This issue should already be fixed. No longer received this bug report over the last few months.
@annieappflowy
The issue with filepicker is still there, actually, on official snap build 0.9.8.
However it is more of a snap problem that yours - very likely caused by this one https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1849753
So you might want to mark snap distribution as having some known problems or remove it completely because in its current state it might produce a wrong impression - it almost made me thinking that export functionality is not available without subscription - until I noticed the stacktrace and decided to dig into it.
Thank you, @podcherklife , for the info and the effort to find the root cause. Since export is not a feature that would make the Snap application unusable, it seems more beneficial to make snap available than removing it completely. We'll see how to notify the snap users about this filepicker issue.