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

dev websocket connection failed #1362

Open
5 tasks done
aianddeng opened this issue Jan 21, 2025 · 6 comments
Open
5 tasks done

dev websocket connection failed #1362

aianddeng opened this issue Jan 21, 2025 · 6 comments
Labels
pending-triage Someone (usually a maintainer) needs to look into this to see if it's a bug

Comments

@aianddeng
Copy link

aianddeng commented Jan 21, 2025

Describe the bug

Image

After executing "run dev", the websocket reported an error, and the content script did not execute successfully, but no error message was reported.

Reproduction

bunx wxt@latest init

The default template already has this issue.

Steps to reproduce

No response

System Info

System:
    OS: macOS 15.3
    CPU: (8) arm64 Apple M1 Pro
    Memory: 515.16 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.9.0 - ~/Library/Caches/fnm_multishells/19945_1737477607928/bin/node
    Yarn: 1.22.22 - ~/Library/Caches/fnm_multishells/19945_1737477607928/bin/yarn
    npm: 10.8.3 - ~/Library/Caches/fnm_multishells/19945_1737477607928/bin/npm
    pnpm: 9.11.0 - ~/Library/Caches/fnm_multishells/19945_1737477607928/bin/pnpm
    bun: 1.1.43 - ~/.bun/bin/bun
  Browsers:
    Chrome: 132.0.6834.83
    Safari: 18.3
  npmPackages:
    wxt: ^0.19.13 => 0.19.24

Used Package Manager

bun

Validations

@aianddeng aianddeng added the pending-triage Someone (usually a maintainer) needs to look into this to see if it's a bug label Jan 21, 2025
@appsplash99
Copy link

appsplash99 commented Jan 21, 2025

  • Similar error for me on chrome. (attached screenshot)
  • Also, the content.ts script does not load as well in the dev server.
    export default defineContentScript({
      matches: ['*://*.google.com/*'],
      main() {
        console.log('Hello content.');
      },
    });
Image

@ericlin11354
Copy link

Bump, I have this issue as well

@aklinker1
Copy link
Collaborator

aklinker1 commented Jan 21, 2025

Duplicate of #1360, they're caused by the same thing. For now, downgrade vite to 6.0.8:

Or to use the latest version of Vite, set legacy.skipWebSocketTokenCheck to true in your vite config:

https://github.com/vitejs/vite/blob/9654348258eaa0883171533a2b74b4e2825f5fb6/packages/vite/src/node/config.ts#L535C3-L535C26

@alizainaslam
Copy link

YES: Vite 6.0.8 is working fine i test it.

@aklinker1
Copy link
Collaborator

Fix is in progress, see #1361. Will try and get it out later today.

@appsplash99
Copy link

Thank You 🙏 ❤

Duplicate of #1360, they're caused by the same thing. For now, downgrade vite to 6.0.8:

pnpm i [email protected]

Or to use the latest version of Vite, set legacy.skipWebSocketTokenCheck to true in your vite config:

https://github.com/vitejs/vite/blob/9654348258eaa0883171533a2b74b4e2825f5fb6/packages/vite/src/node/config.ts#L535C3-L535C26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-triage Someone (usually a maintainer) needs to look into this to see if it's a bug
Projects
None yet
Development

No branches or pull requests

5 participants