Skip to content
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

[Bug]: shell.openExternal not work at ubuntu21.04 #31485

Open
3 tasks done
eeeeeio opened this issue Oct 20, 2021 · 17 comments
Open
3 tasks done

[Bug]: shell.openExternal not work at ubuntu21.04 #31485

eeeeeio opened this issue Oct 20, 2021 · 17 comments

Comments

@eeeeeio
Copy link

eeeeeio commented Oct 20, 2021

Preflight Checklist

Electron Version

13.1.6

What operating system are you using?

Ubuntu

Operating System Version

ubuntu21.04

What arch are you using?

x64

Last Known Working Electron version

15.2.0

Expected Behavior

run shell.openExternal(url)
open a file

Actual Behavior

run shell.openExternal(url)
log
`
xdg-open - opens a file or URL in the user's preferred application

Synopsis

xdg-open { file | URL }

xdg-open { --help | --manual | --version }

Use 'man xdg-open' or 'xdg-open --manual' for additional info.
`

then nothing happen

but its work when I use childProcess.exec('xdg-open ' + url)

url is a file path

Testcase Gist URL

No response

Additional Information

No response

@BlackHole1
Copy link
Member

Please use electron fiddle to provide gist URL

@VerteDinde VerteDinde added blocked/need-repro Needs a test case to reproduce the bug platform/linux labels Oct 20, 2021
@andersk
Copy link
Contributor

andersk commented Nov 5, 2021

This might be #28436?

@LindirQuenya
Copy link

LindirQuenya commented Apr 1, 2022

I am having the same problem with electron v17.3.1. Here's a gist, generated by electron fiddle.

https://gist.github.com/5fb97f76b4a83861673125a921ab88be

It creates the following output when run on Ubuntu 21.10:

Saving files to temp directory...
Saved files to /tmp/tmp-160513-fF6OcW8KbuKe
Electron v17.3.1 started.
Starting inspector on 127.0.0.1:9229 failed: address already in use
xdg-open - opens a file or URL in the user's preferred application

Synopsis

xdg-open { file | URL }

xdg-open { --help | --manual | --version }

Use 'man xdg-open' or 'xdg-open --manual' for additional info.
Done

Changing the argument from "/home" to "file:///home" results in the expected behavior.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2022

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!

@github-actions github-actions bot added the stale label Oct 5, 2022
@LindirQuenya
Copy link

This issue is still present in electron v21.0.1.

@github-actions github-actions bot removed the stale label Oct 6, 2022
@zanzara
Copy link

zanzara commented Dec 14, 2022

This issue is still present in electron v21.1.0

@github-actions github-actions bot removed the blocked/need-repro Needs a test case to reproduce the bug label Jan 10, 2023
@github-actions
Copy link
Contributor

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!

@github-actions
Copy link
Contributor

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!

@github-actions github-actions bot added the stale label Jul 11, 2023
@LindirQuenya
Copy link

This issue is still present in Electron v25.3.0 and v26.0.0-beta5 on Ubuntu 23.04.

@LindirQuenya
Copy link

This might be #28436?

Based on the error message, I would assume that it isn't. It looks like electron is invoking xdg-open incorrectly.

@electron-issue-triage
Copy link

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!

@LindirQuenya
Copy link

Still present in 27.0.2 and 28.0.0-alpha.4 on Ubuntu 23.04. Same behavior - openExternal('/home') fails with an error message, openExternal('file:///home') works fine. Is this expected behavior? Are we not supposed to be able to put file paths directly into openExternal?

@LindirQuenya
Copy link

After inserting some logging into xdg-open, it looks like electron isn't passing it any arguments in the first case? In the second case it is passed file:///home.

@electron-issue-triage
Copy link

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!

@BlackHole1
Copy link
Member

bump

@electron-issue-triage
Copy link

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!

mnvr added a commit to ente-io/ente that referenced this issue May 17, 2024
mnvr added a commit to ente-io/ente that referenced this issue May 17, 2024
Was able to reproduce the issue in Ubuntu 24.04 LTS

Ref: electron/electron#31485
@mnvr
Copy link

mnvr commented May 17, 2024

Was able to reproduce the issue in Ubuntu 24.04 LTS (using latest Electron 30.0.6)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: 👍 Does Not Block Stable
Development

No branches or pull requests

8 participants