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 does not work in Brave browser #13243

Open
daniel-kozma opened this issue Dec 26, 2024 · 1 comment
Open

HMR does not work in Brave browser #13243

daniel-kozma opened this issue Dec 26, 2024 · 1 comment

Comments

@daniel-kozma
Copy link

Describe the bug

Hot Module Reloading does not work in the Brave browser normal tabs. However, it does work in Chrome and in Brave in private tabs. Not really a big issue, just a bit annoying.
The issue is probably caused by trying to construct a websocket on ws://localhost:undefined/ (see logs), which should have probably been localhost:5173.

Reproduction

cleared browser cache on localhost:5173
$pnpx sv create
$pnpm dev --open
open localhost:5173 in private tab too
edit +page.svelte and save
result: page in private tab changes instantly, in the normal tab it doesn't. (it does after refreshing)

Logs

--- VS Code console: ---
2:35:13 PM [vite] hmr update /src/routes/+page.svelte, /src/app.css (x12)

--- Brave normal tab console: ---
client:535 WebSocket connection to 'ws://localhost:5173/' failed: 
setupWebSocket	@	client:535
client:535 Uncaught (in promise) SyntaxError: Failed to construct 'WebSocket': The URL 'ws://localhost:undefined/' is invalid.
    at setupWebSocket (client:535:19)
    at fallback (client:508:16)
    at WebSocket.<anonymous> (client:551:7)
client.js?v=fc83df29:2348
[svelte] binding_property_non_reactive
`bind:this={components[0]}` (.svelte-kit/generated/root.svelte:44:42) is binding to a non-reactive property
warn	@	client.js?v=fc83df29:2348
client.js?v=fc83df29:2348
[svelte] binding_property_non_reactive
`bind:this={components[1]}` (.svelte-kit/generated/root.svelte:45:43) is binding to a non-reactive property
warn	@	client.js?v=fc83df29:2348

--- Brave private tab console: ---
[svelte] binding_property_non_reactive`bind:this={components[0]}` (.svelte-kit/generated/root.svelte:44:42) is binding to a non-reactive property
warn @ client.js?v=fc83df29:2348
client.js?v=fc83df29:2348
[svelte] binding_property_non_reactive`bind:this={components[1]}` (.svelte-kit/generated/root.svelte:45:43) is binding to a non-reactive property
warn @ client.js?v=fc83df29:2348

System Info

--- Output of `npx envinfo --system --npmPackages svelte,rollup,webpack --binaries --browsers`: ---

System:
    OS: Windows 11 10.0.22631
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-11320H @ 3.20GHz
    Memory: 2.50 GB / 15.74 GB
Binaries:
    Node: 20.12.2 - C:\Program Files\nodejs\node.EXE
    npm: 10.5.2 - ~\node_modules\.bin\npm.CMD
    pnpm: 8.3.1 - ~\AppData\Roaming\npm\pnpm.CMD
Browsers:
    Edge: Chromium (129.0.2792.65)
    Internet Explorer: 11.0.22621.3527
npmPackages:
    svelte: ^5.0.0 => 5.0.0

--- Additional data ---
$vite -v
vite/4.0.3 win32-x64 node-v20.12.2

brave://version
Brave	1.73.104 Chromium: 131.0.6778.204 (Official Build) (64-bit) 
Revision	215b794a7c1f3e28151d0f7712e32c71be48775c
OS	Windows 11 Version 23H2 (Build 22631.4602)
JavaScript	V8 13.1.201.19

Severity

annoyance

@Conduitry Conduitry transferred this issue from sveltejs/svelte Dec 26, 2024
@eltigerchino
Copy link
Member

I can't reproduce this with a new project and a fresh install of Brave on Windows 11. Do you have any extensions installed that could be causing this? It could by why it works in private mode where most extensions are disabled.

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

2 participants