-
Notifications
You must be signed in to change notification settings - Fork 636
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 Module Reloading doesn't work after restarting the app #165
Comments
Thanks for the report! I'm looking into it |
Any chance of a status update on this? @rafeca |
@rafeca any update ? |
Hi @rafeca , actually we had similar discussion in the react native repo and people find @cihadturhan 's solution to be working as expected. Hopefully it can help to solve this issue faster |
@cihadturhan Any reason you didn't send a PR with your solution? |
@gaearon Ideally a metro should connect more than one client e.g one iPhone simulator, one android emulator and one android phone. My fix removes all the clients and connects just the latest one. So, it’s not a fix. It’s a hack. Besides, I think it doesn’t work anymore. |
Do repro instructions still work? I can try to figure out a right fix. I don’t know the codebase either but I can try to dig into it if I understand the problem and the workflow you’re trying to achieve better. |
@gaearon no they don’t. It was RN 55.4. There have been many updates and metro code changed a lot. I’m on mobile now so I’m not even sure same websocket library is still in use. |
So if it doesn’t repro with original instructions then we can consider this fixed? |
I think yes. I haven’t developed RN app for a few months so I’m not sure but last time I tried I couldn’t reproduce. |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
See detail on facebook/react-native#18899
If the current behavior is a bug, please provide the steps to reproduce and a minimal repository on GitHub that we can
yarn install
andyarn test
.See detail on facebook/react-native#18899
What is the expected behavior?
Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system.
Environment:
Packages: (wanted => installed)
More technical details
I made a detailed debugging on how this happens, but I don't know how to solve. This issue happens as a result of two flaws:
Debugging steps
react-native init ...
modules.length ===1
in hmrJSBundle@40modules.length === 1
for first websocket (the old one) andmodules.length === 0
for the second websocket.modules
, 2 of which has emptymodules
.How to solve
ws libary doesn't have a built-in connection close callback. I tried this one as also suggested in this issue
I'm not familiar with the package. I hope this info help you figure the issue out.
The text was updated successfully, but these errors were encountered: