React-instantsearch: `react-hot-loader` and `connectSearchBox` results in 100% CPU core usage and browser tab freezing

Created on 11 Dec 2019  路  2Comments  路  Source: algolia/react-instantsearch

Describe the bug 馃悰

When using connectSearchBox with an application that uses react-hot-loader, HMR updated changes result in the following error being repeated over and over again, to infinity:

React-Hot-Loader: some components were updated out-of-bound. Updating your app to reconcile the changes.

This results in a 100% CPU core usage and freezes the browser tab completely. (Resulting in not being able to close the tab without using task manager).

(Note, it's possible to prevent the freeze if you reload the page 'in time' before whatever limit (memory?)is reached by the browser which causes the freeze).

To Reproduce 馃攳

Steps to reproduce the behavior:

  1. Use a React application with react-hot-loader HMR.
  2. Change code.
  3. Switch to browser.
  4. Observe error in console and CPU usage spike.
  5. Wait and page freezes completely.

Expected behavior 馃挱

Normal HMR behaviour.

Environment:

  • OS: Any (Testing on MacOS and Win10)
  • Browser: Tested on Chrome
  • Version: 78.0.3904.108

Most helpful comment

Hey @francoischalifour, thanks for the speedy response. The behaviour is no longer being expressed, so I need to delve deeper into our history to pinpoint what change we made fixed the issue. Unfortunately we are due for release on Monday, so time is tight, but I will try to get a minimum repro' together when I can.

All 2 comments

Thanks for opening the issue, we'll investigate this. As a reminder for the team, here's another issue about HRM: #2396.

Do you have a sandbox where we can see this behavior? Is this the only component that you've seen break HMR compatibility?

Hey @francoischalifour, thanks for the speedy response. The behaviour is no longer being expressed, so I need to delve deeper into our history to pinpoint what change we made fixed the issue. Unfortunately we are due for release on Monday, so time is tight, but I will try to get a minimum repro' together when I can.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

noclat picture noclat  路  3Comments

flouc001 picture flouc001  路  5Comments

itsmichaeldiego picture itsmichaeldiego  路  4Comments

mxmzb picture mxmzb  路  4Comments

denkristoffer picture denkristoffer  路  4Comments