-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Vite trigger MacOS system dialog to locate 'undefined' application when Google Chrome is not running #11205
Closed
7 tasks done
Comments
I just narrowed down this issue to Vite as well, in my SvelteKit project. Firefox is my browser of choice and is always running when I start my application, so this issue title should remove everything after "application." |
This has been happening for months btw. |
ArnaudBarre
added a commit
that referenced
this issue
Dec 17, 2022
patak-dev
pushed a commit
that referenced
this issue
Dec 17, 2022
futurGH
pushed a commit
to futurGH/vite
that referenced
this issue
Feb 26, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
Vite feature to open running instance of Chrome browsers doesn't fail immediately when Chrome is not running (openedBrowser is undefined), instead MacOS system dialog
"Choose Application" - "Where is undefined?"
is displayed. Only after closing this dialog, exception is thrown and catched in script and continue to opening new Google Chrome instance.Please don't execute osascript with undefined openedBrowser or use value from preferredOSXBrowser when openedBrowser is undefined.
https://github.com/vitejs/vite/blob/main/packages/vite/src/node/server/openBrowser.ts#L93
Reproduction
https://stackblitz.com/edit/vitejs-vite-hntcyg?file=package.json
Steps to reproduce
vite 3.2.5
be sure there is no running process 'Google Chrome'
execute command:
BROWSER="Google Chrome" vite
MacOS system dialog
"Choose Application" - "Where is undefined?"
is displayed because vite execute:osascript openChrome.applescript http:https://127.0.0.1:8080/index.html undefined
https://github.com/vitejs/vite/blob/main/packages/vite/src/node/server/openBrowser.ts#L93
System Info
System: OS: macOS 12.6 Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.14.2 npm: 8.5.0 Browsers: Chrome: 107.0.5304.121 Firefox: 106.0.2 Safari: 16.0 npmPackages: vite: ^3.2.5 => 3.2.5
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: