facebook / create-react-app

Set up a modern web app by running one command.
https://create-react-app.dev
MIT License
102.76k stars 26.87k forks source link

Multiple [HMR] Waiting for update signal from WDS... after reload before it settles. #10633

Open LukaszGrela opened 3 years ago

LukaszGrela commented 3 years ago

I'm not sure if it is me or a bug, but during development when I need to refresh the page then multiple [HMR] Waiting for update signal from WDS... messages along other logs like the app would reload itself many times before it settles.

image

Is it normal behaviour, or my fault here?

package.json dependencies

  "dependencies": {
    "@reduxjs/toolkit": "^1.5.0",
    "@testing-library/jest-dom": "^5.11.4",
    "@testing-library/react": "^11.1.0",
    "@testing-library/user-event": "^12.1.10",
    "@types/jest": "^26.0.15",
    "@types/node": "^12.0.0",
    "@types/react": "^17.0.0",
    "@types/react-dom": "^17.0.0",
    "axios": "^0.21.1",
    "connected-react-router": "^6.9.1",
    "history": "^4.10.1",
    "oidc-client": "^1.11.5",
    "react": "^17.0.1",
    "react-dom": "^17.0.1",
    "react-redux": "^7.2.2",
    "react-router-dom": "^5.2.0",
    "react-scripts": "4.0.3",
    "redux": "^4.0.5",
    "redux-devtools-extension": "^2.13.8",
    "redux-thunk": "^2.3.0",
    "typescript": "^4.1.2",
    "web-vitals": "^1.0.1"
  },
LukaszGrela commented 3 years ago

Adding the console.log to the index.tsx main entry point file, it shows that it is reloaded many times, what could trigger this reload in HMR?

LukaszGrela commented 3 years ago

It is somehow connected to the OIDC UserManager When fresh user is logged in all is good, but when the user (not expired) is old e.g. a day then reload is causing this multiple HMR content reloads.