AppFlowy icon indicating copy to clipboard operation
AppFlowy copied to clipboard

[Bug] 0.6.3, 0.6.4, 0.6.5 - Linux - Import Data and Insert Image Cannot Browse Folder

Open gioandtonic opened this issue 1 year ago • 4 comments

Bug Description

When I go to Settings -> Manage Data -> Import Data -> Browse File, it doesn't open the folder selection dialog. Screenshot from 2024-07-22 09-47-33

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

Screenshot from 2024-07-22 09-47-33

Additional Context

No response

gioandtonic avatar Jul 22 '24 14:07 gioandtonic

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"}

gorghino avatar Aug 08 '24 07:08 gorghino

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.

image

  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"}

berkes avatar Aug 29 '24 08:08 berkes

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

berkes avatar Oct 04 '24 10:10 berkes

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.

SirRujak avatar Oct 30 '24 03:10 SirRujak

This issue should already be fixed. No longer received this bug report over the last few months.

annieappflowy avatar Jun 13 '25 03:06 annieappflowy

@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.

podcherklife avatar Sep 05 '25 21:09 podcherklife

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.

annieappflowy avatar Sep 07 '25 09:09 annieappflowy