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

HMR WebSocket "Invalid frame header" error causing continuous page reloads after setting app.baseURL #26396

Closed
Wulawa opened this issue Mar 20, 2024 · 7 comments

Comments

@Wulawa
Copy link

Wulawa commented Mar 20, 2024

Environment

  • Operating System: Darwin
  • Node Version: v21.5.0
  • Nuxt Version: 3.11.1
  • CLI Version: 3.11.0
  • Nitro Version: 2.9.4
  • Package Manager: [email protected]
  • Builder: -
  • User Config: app, devtools
  • Runtime Modules: -
  • Build Modules: -

Reproduction

Steps to reproduce the behavior:

  1. Set app.baseURL in nuxt.config.js.
  2. Run the application in development mode.
  3. Visit the service address.
  4. See error in the console and the page continuously reloads.

Describe the bug

In Nuxt 3, after setting the baseURL, the Hot Module Replacement (HMR) WebSocket throws an "Invalid frame header" error, causing the page to continuously reload in development mode.

Additional context

No response

Logs

No response

@szadave
Copy link

szadave commented Mar 20, 2024

I think, this is related: #23832 (comment)

@danielroe
Copy link
Member

I believe this has been resolved in nuxt v3.11.1 via nuxt/cli#370.

@cdwmhcc
Copy link

cdwmhcc commented Mar 30, 2024

I believe this has been resolved in nuxt v3.11.1 via nuxt/cli#370.

Not resolved

@Wulawa
Copy link
Author

Wulawa commented Mar 30, 2024

I believe this has been resolved in nuxt v3.11.1 via nuxt/cli#370.

Not resolved

This is fine. You’ll need to manually install Nuxi because Nuxt’s dependency hasn’t been updated.

@cdwmhcc
Copy link

cdwmhcc commented Mar 30, 2024

manually install Nuxi

"devDependencies": {
    "@nuxt/image": "^1.4.0",
    "@nuxtjs/i18n": "^8.2.0",
    "nuxi": "^3.11.1",
    "nuxt": "^3.11.1",
    "prettier": "^3.2.5",
    "vue": "^3.4.21",
    "vue-router": "^4.3.0"
  },
 ERROR  [unhandledRejection] read ECONNRESET                                                                  11:03:41

  at TCP.onStreamRead (node:internal/stream_base_commons:217:20)


 ERROR  [unhandledRejection] read ECONNRESET                                                                  11:03:43

  at TCP.onStreamRead (node:internal/stream_base_commons:217:20)

@abarke
Copy link
Sponsor

abarke commented May 4, 2024

I'm still having issues with this after upgrading. Really frustrating. First npx nuxi@latest upgrade did not want to upgrade to [email protected] so I manually upgraded using pnpm up nuxt --latest and now this issue 😓

Electron
image

CLI
image

pnpm nuxi info

------------------------------
- Operating System: Windows_NT
- Node Version:     v18.15.0
- Nuxt Version:     3.11.2
- CLI Version:      3.11.1
- Nitro Version:    2.9.6
- Package Manager:  [email protected]
- Builder:          -
- User Config:      ssr, css, modules, ionic, vite, nitro
- Runtime Modules:  @nuxtjs/[email protected], [email protected]
- Build Modules:    -
------------------------------

@qyd159
Copy link

qyd159 commented May 14, 2024

this problem is not solved,i am also stucking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants