webcontainer-core icon indicating copy to clipboard operation
webcontainer-core copied to clipboard

Hot reload not working properly

Open darklight9811 opened this issue 1 year ago • 8 comments

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

darklight9811 avatar Jul 30 '24 05:07 darklight9811

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

DrJKL avatar Jul 31 '24 19:07 DrJKL

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

DrJKL avatar Jul 31 '24 19:07 DrJKL

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?

kirjavascript avatar Aug 01 '24 10:08 kirjavascript

@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)#

darklight9811 avatar Aug 01 '24 17:08 darklight9811

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”.

DrJKL avatar Aug 01 '24 17:08 DrJKL

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?

kirjavascript avatar Aug 01 '24 19:08 kirjavascript

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

BojanKogoj avatar Sep 02 '24 11:09 BojanKogoj

This is same as #1317

Thanks, I've associated the ticket.

kirjavascript avatar Sep 02 '24 13:09 kirjavascript