-
Notifications
You must be signed in to change notification settings - Fork 672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File Picker not spawning on Linux (Ubuntu 20.04.3 LTS) #903
Comments
Thank you for providing a screen recording, @jlnrrg . I followed your steps, created a fresh copy of the GitHub repository, and ran the example app. On my laptop, everything works as expected 🤔 Frankly, I'm a little stumped here... My environment is exactly the same as yours (even the same Ubuntu distribution):
Which version of this Internally, the Linux implementation of # zenity should be available on Ubuntu
zenity --file-selection --title "Select a file:"
# alternatively:
qarma --file-selection --title "Select a file:" |
The screenrecording is a given 😄 The example project uses: file_picker:
path: ../ and the upper folder is version 4.2.6
This is indeed a peculiar problem. |
I enabled to debug all Exceptions and uncaught Exceptions and the filePicker throws the error: |
Thank you for providing all the details, @jlnrrg.
Also, thanks for checking with flutter_file_picker/lib/src/file_picker_linux.dart Lines 91 to 97 in 9b75f40
Thanks for offering a screen sharing. I might contact you for a screen sharing but honestly I'm too busy writing my master thesis. |
A totally reasonable excuse 😄. Is |
@jlnrrg , thank you for your understanding. There is no particular reason why we check |
I debugged a little further and it does not seem to be an issue with the executable selection, but more with the if I manually type runExecutableWithArguments(
"/usr/bin/zenity",
[
"--file-selection"
"--title",
"File Picker",
]
); I'll investigate further Edit: -rwxr-xr-x 1 root root 135960 Feb 27 2020 /usr/bin/zenity Edit 2: |
Thank you for investigating, @jlnrrg.
I agree with you, this shouldn't be a problem as long as zenity has the executable-flag. On my computer, the zenity binary has the same permissions. I would have one more idea: I always wondered how runExecutableWithArguments(
"/usr/bin/zenity",
[
"--file-selection"
"--title",
"Dialog",
]
); If a single-word title doesn't work either, could you please play around with flutter_file_picker/lib/src/utils.dart Line 49 in 32094fd
Btw, Google provides its own Dart package for picking files on Linux, macOS, and Windows. Maybe you will have more luck with their professional C++ implementation (our script-based approach has many weaknesses): |
This issue is stale because it has been open for 14 days with no activity. |
I decided to deinstall the qarma as it had the above mentioned permission issues and rather focus on the zenity issue as this comes preinstalled with ubuntu. I will now play around with
Edit:
So now I will rather research how dart Process.run can get the needed rights 🙏 Edit 2: |
Good news first: So the issue seems to lay in the flutter debugger not getting the same rights as to the real app. Edit 1: launch.json{
"version": "0.2.0",
"configurations": [
{
"name": "start",
"request": "launch",
"type": "dart"
},
]
} |
The issue was most likely the usage of the snap vscode, bc when I installed the non-snap vscode everything worked as intended. |
@jlnrrg thank you keeping us up to date on your investigations and for posting the solution 👍 |
I was having the same problem here. Great lib btw 😄 Thanks guys |
Describe the bug
At first I thought it was just my problem, so I cloned your repo and tried the example folder with linux support enabled:
The picker is not showing up. Attached video for demonstration
Platform
Platform OS version
How are you picking?
I did not modify your example folder, so however it is handled there.
Details to reproduce the issue
flutter config --enable-linux-desktop
flutter create . --org com.mr.flutter.plugin
Error Log
No errors were found in the debug console
Screenshots and/or video
Peek.2021-12-01.14-31.mp4
Flutter Version details
The text was updated successfully, but these errors were encountered: