i am Roger Li

在WSL執行npx cypress open出現"Failed to connect to the bus" error

執行npx cypress open後,出現"Failed to connect to the bus" error如下:


[email protected]:/mnt/c/Users/Roger Li/Documents/git/xxx/server-app$ npx cypress open
[3520:0117/152352.775341:ERROR:bus.cc(392)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[3520:0117/152352.782297:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples 
of valid types are "tcp" and on UNIX "unix")
[3520:0117/152352.782477:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples 
of valid types are "tcp" and on UNIX "unix")
[3708:0117/152352.824473:ERROR:gpu_init.cc(441)] Passthrough is not supported, GL is swiftshader
[3520:0117/152353.158731:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples 
of valid types are "tcp" and on UNIX "unix")
[3520:0117/152353.199344:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples 
of valid types are "tcp" and on UNIX "unix")


Google到Cypress的官方網站
跟據 https://docs.cypress.io/ 所說

Note: verbose Electron logging might show warnings that still allow Cypress to work normally. For example, the Cypress Test Runner opens normally despite the scary output below:

ELECTRON_ENABLE_LOGGING=true DISPLAY=10.130.4.201:0 /root/.cache/Cypress/3.3.1/Cypress/Cypress
[475:0617/150421.326986:ERROR:bus.cc(395)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[475:0617/150425.061526:ERROR:bus.cc(395)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[475:0617/150425.079819:ERROR:bus.cc(395)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[475:0617/150425.371013:INFO:CONSOLE(73292)] "%cDownload the React DevTools for a better development experience: https://fb.me/react-devtools
You might need to use a local HTTP server (instead of file://): https://fb.me/react-devtools-faq", source: file:///root/.cache/Cypress/3.3.1/Cypress/resources/app/packages/desktop-gui/dist/app.js (73292)

source: (https://docs.cypress.io/guides/references/troubleshooting#Run-the-Cypress-app-by-itself)

發佈回覆

你的電郵地址並不會被公開。 必要欄位標記為 *