electron / electron

:electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS
https://electronjs.org
MIT License
114.44k stars 15.45k forks source link

[Bug]:`showItemInFolder` does not open correct item location when run as Electron snap #33804

Open craxal opened 2 years ago

craxal commented 2 years ago

Preflight Checklist

Electron Version

16.*

What operating system are you using?

Ubuntu

Operating System Version

Ubuntu 20.04

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

showItemInFolder should do as advertised and open the folder location of an item. For example:

shell.openItemInFolder("/home/username/Downloads/file.txt");

This should open the file browser to the user's Download folder and select "file.txt".

Actual Behavior

When using Electron Fiddle or running from an uncompressed .tar.gz distribution, this works as expected.

However, when running from a standard (vs. classic) snap, the file browser opens to the user's home directory and no deeper. This happens even when the snap is connected to the :home slot, and should have permissions to open user directories.

Testcase Gist URL

No response

Additional Information

No response

ckerr commented 2 years ago

Hey Craig, is this still an issue in newer versions of Electron, e.g. 19-x-y?

craxal commented 2 years ago

@ckerr I am not currently able to verify whether it reproduces in v19. We get our Electron builds from an internal source for validation/security reasons, not from the public release.

craxal commented 2 years ago

@ckerr We recently upgraded to Electron 19. I just tried running our application from a snap on Ubuntu 20, but I still see this problem. In fact, I am now seeing "ENOSYS: function not implemented, write" errors when trying to write files to the same location.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

craxal commented 2 years ago

@ckerr Bump! This is still affecting my app. Please let me know if you need more information.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

craxal commented 1 year ago

BUMP

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

craxal commented 1 year ago

BUMP

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

craxal commented 1 year ago

BUMP

electron-issue-triage[bot] commented 1 year ago

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

craxal commented 1 year ago

bump (again)

electron-issue-triage[bot] commented 10 months ago

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

craxal commented 10 months ago

bump (again, again)

electron-issue-triage[bot] commented 7 months ago

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

craxal commented 7 months ago

bump x4

electron-issue-triage[bot] commented 4 months ago

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

craxal commented 4 months ago

bump x5

electron-issue-triage[bot] commented 1 month ago

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

craxal commented 1 month ago

bump x6

Actually, I don't think this is a problem for snaps only. This also happens with our "raw" distribution, too, after the app is built/packaged.

microsoft/AzureStorageExplorer#8232