AppFlowy icon indicating copy to clipboard operation
AppFlowy copied to clipboard

[Bug] CSV and Markdown importer does not show up in ArchLinux

Open samarlyka opened this issue 1 year ago • 3 comments

Bug Description

Whenever the CSV and "Text & Markdown" importer options are selected, no file picker shows up. If AppFlowy was ran through terminal, however, an error message gets logged, indicating error at dart-ffi/src/lib.rs:291.

How to Reproduce

  1. Open AppFlowy via terminal
  2. Click on the "plus" button in any note
  3. Select "Import" menu. The importer window will appear
  4. Click "CSV" or "Text & Markdown"
  5. The error message will be logged in the terminal, and the file picker does not show up

GIF demonstration to reproduce the error (may be slow to load, click here if the GIF file does not load):

app_flowy_bug-archlinux_v6 10 8-arch1-1

Expected Behavior

The CSV/Markdown file picker should show up when the importer buttons are pressed, allowing the user to import CSV/Markdown files from the local storage.

Operating System

ArchLinux v6.10.8-arch1-1

AppFlowy Version(s)

v0.7.0

Screenshots

No screenshot in the form of a picture file. But there is a "screenshot" of the error message copied from the terminal.

2024-09-27 10:24:35 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

{"msg":"[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>
","time":"09-27 10:24:35","target":"dart_ffi"}

Additional Context

Tested on AppImage variant of AppFlowy v0.7.0.

I also did the CSV import in the AppImage and .deb variants of v0.6.9. The Error at dart-ffi/src/lib.rs:291 was also raised and the CSV/Markdown file picker did not show up.

samarlyka avatar Sep 27 '24 03:09 samarlyka

Have you tried installing it through AUR? I'm using this AUR package which just extracts the deb file into a directory.

Also do you have all the dependencies? If this is a freshly built system from ground up, you're likely missing something.

I'm using EndeavourOS and it's all working.

emmggi avatar Sep 27 '24 06:09 emmggi

Have you tried installing it through AUR? I'm using this AUR package which just extracts the deb file into a directory.

I have, but there's still no chance of success. I even installed dart using pacman, but the CSV/Markdown importer still does work.

There's one more thing: the same error keeps showing up whenever I'm trying to export any note (e.g., as CSV or to HTML). No file picker is opened whenever the Share > Export as > CSV button is clicked, and the [Flutter]: Uncaught platform error debug log is shown again. I cannot export notes.

I'm using EndeavourOS and it's all working.

It's weird knowing the fact that EndeavourOS is also Arch-based. But I'm not comfortable with the idea of switching distro. My current vanilla ArchLinux setup is more than 3 years old.

Also do you have all the dependencies?

I thought AppImage does not necessitate the user to install any dependency (source), other than fuse (source).

I'm guessing that:

  1. A class in dart_ffi used in the file picker detects the user's operating system;
  2. Vanilla ArchLinux is not in the class' list of supported operating systems;
  3. There is no catch-all for not-yet-supported-os, so the class just simply raises error

samarlyka avatar Sep 28 '24 16:09 samarlyka

See also #5784. It seems related.

berkes avatar Oct 04 '24 10:10 berkes

For no clear reason, the v0.7.1 update makes the CSV importer/exporter file picker dialog appear! (See: 8c956afabdf88f96d490caf4b5575b7c8f1bee16.) I'm marking this issue as closed because the bug no longer bothers me with v0.7.1 in my i3-gaps window manager.

Thank you for your support, everyone!

samarlyka avatar Oct 15 '24 19:10 samarlyka

For no clear reason, the v0.7.1 update makes the CSV importer/exporter file picker dialog appear! (See: 8c956af.) I'm marking this issue as closed because the bug no longer bothers me with v0.7.1 in my i3-gaps window manager.

Thank you for your support, everyone!

Is that with snap? Because the problem only occurs there! Neither the .deb nor the AppImage show this problem.

berkes avatar Oct 17 '24 12:10 berkes

I don't use snap, but the problem magically disappeared when I upgraded from v0.7.0 to v0.7.1. Both .deb and AppImage did not work in v0.7.0 (whether by building the AUR package or manually unpacking the .deb file using ar x command), but somehow they now do in v0.7.1. I guess I changed my ArchLinux's system-wide configuration and/or installed additional packages that I was not aware of between v0.7.0 and v0.7.1.

Still and all, thanks again for the update!

samarlyka avatar Oct 20 '24 15:10 samarlyka

I think I have the solution at least for Arch based systems. Installing the qarma, zenity, or kdialog packages should fix it. More information can be found at #5784

SirRujak avatar Oct 30 '24 03:10 SirRujak

Installing the qarma, zenity, or kdialog packages should fix it.

Thanks, @SirRujak!

I ran pacman -S zenity in my operating system, and then tried launching v0.7.0 again (the version name I initially reported having file dialog not showing up). It works as charm! Now the file picker dialog shows up and I can import files into AppFlowy again.

samarlyka avatar Nov 07 '24 05:11 samarlyka

In popOs (Pop!_OS 22.04 LTS) i have this issue in the latest version (0.83).

I tried to install zenity and qarma but it didn't work, any other suggestions?

gianpaolodn avatar Feb 06 '25 08:02 gianpaolodn

Sorry it has taken me a bit, I haven't had any direct luck in finding the issue so far. Can I ask what your desktop environment is? For finding the original issue I found running AppFlowy from a terminal gave decent errors to start from. If you are using Cosmic desktop I would suspect some quirk in how the desktop environment handles things. Just to note, AppFlowy will try the libraries in the order of qarma -> kdialog -> zenity. So if it detects qarma on your system it will select it first even if it ends up erroring out. So possibly if you tried qarma first and didn't uninstall before trying zenity it may have never actually attempted to use zenity. I should have time to try spooling up a vm in the next couple of days if you don't have any luck, so just let me know if you find any more information before then!

SirRujak avatar Feb 10 '25 17:02 SirRujak