-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages. - I have tried creating a repro with https://new.docusaurus.io.
- I have read the console error message carefully (if applicable).
Description
When running npm start, seeing many of these errors on the command line as files are prepared:
Failed to open browser Arc with AppleScript Error: Command failed: osascript openChrome.applescript "http://localhost:3000/" "Arc"
openChrome.applescript:576:594: execution error: Arc got an error: Can’t get every window. (-1728)
The Arc web browser is a Chromium variation. It has some novel page organisation ideas, including workspaces and "Little Arc" windows.
A Little Arc window is a minimally chromed window that opens when a link is clicked externally e.g. from an email. The user can then choose which space to place the new window in using a drop down at the top right of the Little Arc window.
As shown a "Little Arc" window is opened and the dev site loads eventually, though the command line errors indicate something isn't working smoothly. There's some anecdotal evidence Arc may not support all applescript interactions like those used by openChrome.applescript when trying to locate an already open tab. count every window is the command pointed to by the error message (openChrome.applescript:576:594).
Have prepared a workaround that falls back to opening a link using whatever default the browser offers. Seems to work ok for me for Arc, Edge, Chrome and Safari on Mac, and functions without spurious error messages.
Alternatively, I could contribute an Arc specific fix that leans into Arc concepts specifically (spaces, etc). However, seeking some guidance first as to what would be the preference.
Reproducible demo
n/a? Problem is particular to the site generation runtime in my environment and not with any docusaurus produced content. No modifications are made to the site after it is freshly initialised below.
Steps to reproduce
Prerequisites: macOS with default browser set to Arc (https://arc.net/)
- Create a new project with
npm init docusaurus@latest- sitename: mysite
- template: classic
- language: typescript
- cd mysite/
- npm start
- Observe command line errors during dev site preparation
Expected behavior
No command line errors when the test site is launched in the default browser. Dev site url opens in a new window, or refreshes an existing tab as with other browsers - don't mind personally.
Actual behavior
Page does open in a new window, though multiple errors are shown on the command line during preparation of the dev site.
Failed to open browser Arc with AppleScript Error: Command failed: osascript openChrome.applescript "http://localhost:3000/" "Arc"
openChrome.applescript:576:594: execution error: Arc got an error: Can’t get every window. (-1728)
at genericNodeError (node:internal/errors:998:15)
at wrappedFn (node:internal/errors:543:14)
at ChildProcess.exithandler (node:child_process:417:12)
at ChildProcess.emit (node:events:508:28)
at maybeClose (node:internal/child_process:1085:16)
at Socket.<anonymous> (node:internal/child_process:456:11)
at Socket.emit (node:events:508:28)
at Pipe.<anonymous> (node:net:346:12) {
code: 1,
killed: false,
signal: null,
cmd: 'osascript openChrome.applescript "http://localhost:3000/" "Arc"',
stdout: '',
stderr: 'openChrome.applescript:576:594: execution error: Arc got an error: Can’t get every window. (-1728)\n'
}
Your environment
- Public source code: n/a
- Public site URL: n/a
- Docusaurus version used: 3.9.2
- Environment name and version:
- Arc: 142.0.7444.176 (Official Build) (x86_64)
- node: 25.1.0
- npm: 11.6.2
- zsh: 5.9
- Operating system and version: macOS Sequoia, Version 15.7.2 (24G325)
Self-service
- I'd be willing to fix this bug myself.