stackblitz / webcontainer-core

Dev environments. In your web app.
https://webcontainers.io
MIT License
3.78k stars 144 forks source link

Hot reload not working properly #1490

Open darklight9811 opened 1 month ago

darklight9811 commented 1 month ago

Describe the bug

Making change to some of the files don't trigger a hot reload, so I have to restart the terminal to get the changes on the file.

Link to the blitz that caused the error

https://stackblitz.com/edit/vitejs-vite-4xawxo?file=package.json,src%2Fmodules%2FApp%2Findex.tsx,src%2Flib%2Fquery.ts,src%2Fmodules%2Fscenes%2Factions.ts,src%2Fmodules%2FApp%2Fcomponents%2Fheader.tsx,src%2Fmodules%2FApp%2Fcomponents%2Fscenario.tsx

Steps to reproduce

  1. go to a react file
  2. make a change
  3. go to a non react file
  4. make a change

Expected behavior

For the changes to be visible on the browser

Parity with Local

Screenshots

No response

Platform

Browser name  = Firefox
Full version  = 128.0
Major version = 128
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0
performance.memory = undefined
Hash = 41692973

Additional context

No response

DrJKL commented 1 month ago

I'm getting the same issue with an Angular blitz, also Firefox 128.0

DrJKL commented 1 month ago

Works in Chrome. (I suspect it's the firebase CORS issue)

kirjavascript commented 1 month ago

hi! :wave: thanks for reporting this issue

this appears to work when I test it, could you take a look at the browser console and see if there are any errors that might be relevant and paste them here?

darklight9811 commented 1 month ago

@kirjavascript

image

The resource in “https://stackblitz.firebaseio.com/.lp?start=t&ser=75114529&cb=21&v=5” was blocked due it's header Cross-Origin-Resource-Policy (or lack of it). Consult https://developer.mozilla.org/docs/Web/HTTP/Cross-Origin_Resource_Policy_(CORP)#
DrJKL commented 1 month ago

Same error here:

The resource at “https://stackblitz.firebaseio.com/.lp?start=t&ser=REDACTED&cb=36&v=5” was blocked due to its Cross-Origin-Resource-Policy header (or lack thereof). See https://developer.mozilla.org/docs/Web/HTTP/Cross-Origin_Resource_Policy_(CORP)# stackblitz-starters-swcvax
Loading failed for the <script> with source “https://stackblitz.firebaseio.com/.lp?start=t&ser=REDACTED&cb=36&v=5”.
kirjavascript commented 1 month ago

I tested in Firefox 128 and it works here.

I get the same errors about not finding the source file, so I don't think it's related to that.

I don't get any of the firebase errors though. Could this be due to some firewall rules blocking it? Could you try from another net connection?

BojanKogoj commented 2 weeks ago

This is same as https://github.com/stackblitz/webcontainer-core/issues/1317

kirjavascript commented 2 weeks ago

This is same as #1317

Thanks, I've associated the ticket.