-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Hot Reload Fails, DOM adds an additional iframe containing entire contents of the html DOM element #11880
Comments
I recently had this issue aswell.
Note: After doing the above steps i had to run npm install react-error-overlay@6.0.9 again to fix this issue. Hope this helps!! |
Worked for me! Thanks a bunch |
This worked for me as well. The last note step is finally what did it. Thanks |
It's working for me, but I need to reinstall react-error-overlay again... It's really boring |
If you are using Yarn 2, Yarn 3, or Yarn berry, you need to manually patch your |
Worked for me , thanks a bunch. |
Also worked for me! |
@kirannambiar12 Also worked for me! |
Didn't work the below steps. Still there is iframe inside the dom.
|
This worked for me as well as I tried to resolve the same issue in my 3 colleagues system. |
@EvaGarzonBeltran @aldipee If nothing works out, I guess the one thing you can do is override the css and call it out as display none. But am not sure if this is the right thing to do. |
Works for me as well as |
not working for me =( |
For 2-3 days this solution worked. But now it is not working. I even didn't installed any new package !! |
I can confirm that it worked for me. I added the |
this does not work for me |
@EvaGarzonBeltran and whoever else is having "process not defined error". If the steps outlined previously did not work for you (as it didn't work for me), and you are using NPM, then you need to use "overrides" instead of "resolutions" within your package.json. Also, my npm version was below 8.3 and therefore the "overrides" field was not being read. So you'll need to upgrade your npm to at least 8.3. Then go ahead and follow the steps again outlined earlier in this thread (restart your docker container as well if applicable). I was able to figure this out from following this stackoverflow question. If this still doesn't fix it and you've completely reinstalled all your modules and package lock, then I would suggest upgrading to react scripts 5 since that also seems to solve the issue. |
For them who did not got this fixed with @kirannambiar12 solution, make sure the "resolutions" in package.json did it's job.
Now do step 1 again. This time all matches for |
Please check first if there are any errors on importing modules or images. You may find it on console. After fixing that, hopefully it will fixed. I found fixed on me. |
At the end I was able to fix it by updating react-script. The error was in another library (ramdonstring) that was incompatible with the new version and made it impossible to start the app. |
I tried all of these and it didn't work, but then I tried installing with yarn and that worked. npm doesn't support resolutions so the instructions to |
Adding |
@jake-engel this issue shouldn't have been closed. This has to be fixed internally and not by some workarounds |
Hi, for anyone still encountering the issue, updating react-scripts to the latest version, 5.0.1, as of now, fixed it for me.
|
iframe was being injected randomly b/c of react-scripts see facebook/create-react-app#11880
Installed react-error-overlay 6.0.9 version Reference: facebook/create-react-app#11880 (comment)
Installed react-error-overlay 6.0.9 version Reference: facebook/create-react-app#11880 (comment)
Since early last year, when CRA does a hot reload, its error overlay drops an iframe over the entire document, forcing a manual reload. The kludge of forcing an old version of the overlay seems to make it less stupid (facebook/create-react-app#11880). Switch to using CRA's eslint stuff, which was sorta equivalent-ish, after adding our existing config to package.json. Still required a bunch of no-op twiddles to get clean again, as well as disabling linting for LoadObject and friends. They're vendored, Flow (not JS), and on their way out. Next, upgrade react-showdown, as the version we were using doesn't work with Webpack 5, which react-scripts switched to (from 4). Finally, MaterialUI got an unrequested update, which deprecated the theme builder function. That's spiffed up. I didn't go digging as to where/why it changed, or if there are other things. MUI seems to be pretty good with semver, which is a refreshing change. Some of the above glergage would be simplified with Yarn's PnP, as it offers more control over the transitive stuff, but part of it is due to CRA itself. And Node itself is at the root of the blame tree.
Works like a charm. |
Describe the bug
Everytime I save my code and hot reload happens, I am then unable to interact with the application (every component becomes unclickable). Upon further inspection of the DOM, I noticed that there was an iframe added within the document body which contains the entire HTML root, as well some various JS (see image below). If I remove this added iframe I am then able to interact with the application again (and hot reloads will work as normal following the removal).
There are no console errors, or warnings corresponding to this issue
Did you try recovering your dependencies?
Yes, I have tried removing all my dependency files multiple times, but still run into this issue. I am running yarn version 1.22.15 and this is within a project using yarn workspaces.
Which terms did you search for in User Guide?
Hot reload, iframe
Environment
Steps to reproduce
(Write your steps here:)
yarn start
and wait for application to loadExpected behavior
Hot reload should work as expected and no iframe should be added, I should be able to interact with the application immediately
Actual behavior
Application becomes non-interactive, iframe is added to DOM
The text was updated successfully, but these errors were encountered: