react-native: [0.54] Live Reload is broken on DeltaPatcher.js error
Environment
Environment:
OS: macOS Sierra 10.12.6
Node: 9.7.1
Yarn: 1.5.1
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: Not Found
Packages: (wanted => installed)
react: ^16.3.0-alpha.1 => 16.3.0-alpha.1
react-native: 0.54.0 => 0.54.0
Expected Behavior
In debug mode with Live Reload on, code changes should trigger reloading of my RN app.
Actual Behavior
Doesn’t trigger code changes since RN 0.54, it did before. Instead, code change stall on Chrome console error:
DeltaPatcher.js:58 Uncaught (in promise) Error: DeltaPatcher should receive a fresh Delta when being initialized
at DeltaPatcher.applyDelta (DeltaPatcher.js:58)
at deltaUrlToBlobUrl (deltaUrlToBlobUrl.js:34)
at <anonymous>
Steps to Reproduce
Any RN 0.54 app should reproduce this. For reference, these are dependencies in my app package.json:
"dependencies": {
"babel-plugin-idx": "^2",
"he": "^1.1.0",
"lodash": "^4.17.2",
"moment": "^2.19.0",
"moment-timezone": "^0.5.10",
"node-summary": "../node-summary",
"react": "^16.3.0-alpha.1",
"react-native": "0.54.0",
"react-native-blur": "^3.2.0",
"react-native-code-push": "^5.2.1",
"react-native-easy-toast": "^1.0.9",
"react-native-firebase": "^3.0",
"react-native-fit-image": "^1.4.8",
"react-native-highlight-words": "^1.0.1",
"react-native-keep-awake": "^3.0.1",
"react-native-linear-gradient": "^2.0.0",
"react-native-modalbox": "^1.3.8",
"react-native-orientation": "^3.1.3",
"react-native-parallax-scroll-view": "../react-native-parallax-scroll-view",
"react-native-safari-view": "^2.0.0",
"react-native-sentry": "^0.34",
"react-native-sha256": "^1.1.1",
"react-native-status-bar-size": "^0.3.2",
"react-native-swiper": "^1.5.10",
"react-native-tooltip": "^5.2.0",
"react-native-tts": "../react-native-tts",
"react-native-vector-icons": "^4.1.1",
"react-native-webview-bridge": "../react-native-webview-bridge-RN0.51",
"react-redux": "^5.0.1",
"redux": "^3.6.0",
"redux-thunk": "^2.1.0"
},
"devDependencies": {
"redux-logger": "^3.0.6"
}
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 85
- Comments: 93 (15 by maintainers)
Same issue. On every other refresh, this error message will appear. Using IOS simulator
Got the same problem…
Edit: Got it working, I had to reload the debugging page in google chrome
@crisppY and others you can just download and replace the two files in the commit provided by rafeca 7be3d1cbafa4434b05b8ae5b3ec2ba08a5edac9c in node_modules\react-native\local-cli\server\util\debugger-ui I only tried it in my project with RN 0.54.0, metro 0.28.0
I got the same issue, hitting “Reload” several times seems to solve the problem (temporarly). An other solution I found is to use React-Native-Debugger (https://github.com/jhen0409/react-native-debugger)
For an unknown reason, it seems to be working well
Good luck
Ok, there’s good and bad news:
bad news: metro v0.29.0 won’t work with RN 0.54-0.55 because it introduced a new config param that RN is not handling yet (we’re working on improving configuration compatibility between RN and metro).
good news: the actual fix needed to solve this issue is in the RN repo (https://github.com/facebook/react-native/commit/7be3d1cbafa4434b05b8ae5b3ec2ba08a5edac9c), so cherry-picking it into the 0.54 and 0.55 branches and releasing a RN minor version will fix this. (cc @hramos, @grabbou ).
Same problem here with RN 0.54.0 on MacOS
Don’t want to fork RN.
Thanks for the info! I think reloading the remote debugger tab in google chrome should be enough
Ditto but also without live reload, just pressing ‘Reload’ from the dev menu triggers the error about 70% of the time. Running
Ubuntu 16.04, using a real deviceLG/Google Nexus 5XEDIT: Even running
react-native run-androidagain is giving the error unless I close the app each time 😞@TheNuclearCat wasted 15 minutes just to figure this out.
[Update 01 -July-2018 ] i got the same error again today, what i did was
all good now.
“react”: “^16.3.1”, “react-native”: “^0.55.4”,
Same issue. React 16.3.1, React Native 0.55.0
Same problem here with RN 0.54.0 on Windows
I had the same Issue - even on react-native 0.55.2 and Metor 0.30.2. I’ve removed all node_modules and install it again… once with yarn, once with npm. Same result.
I solved it now by manually remove the App from the Emulator (uninstall android-app via emulator-gui) and run the Packager again. Now it works. Cost me several hours to figure out this. Hope this help someone too.
Experiencing this issue. React Native 0.55.1, React 16.3.1.
ugh 😞 let me look into that
Sorry for the issue folks, this issue is fixed in metro v0.29.0
Seems that both RN 0.54 and 0.55 depend on metro v0.28.0, I think it should be safe to update them to use metro v0.29.0
In the meantim you can try forcing yarn to install metro v0.29.0 in your apps by using selective dependency resolutions.
I have downgrade to RN 0.52, I feel like 0.54 has lots of bugs, it’s totally block our daily developing.
Catching up on notifications just now. Surprised to see this thread on a closed + fixed issue. In the future, please do go ahead and open a new issue - that provides a higher signal (to me, at least) versus comments on issues that I’ve tagged as Fixed.
Tried
rm -rf node_modules,watchman watch-del-all,yarn cache clean,yarn. But only thing that seemed to consistently cause this error was enabling remoteJS debugging.I managed to trigger this error in 0.54.2 and fixed it with:
watchman watch-del-all && yarn start --reset-cachenpm uninstall react-native -S npm install react-native@0.53.0 -S
Seems that after a
npm cache clean --forceand relaunching all the console the error disappeared for me.@rafeca thanks. I’m upgrading and testing it now. 👍
@rafeca after
yarn clean && rm -rf node_modules && yarn, killing packager, restarting google chrome it started to work flawlessly!@rafeca same problem RN 0.55.2, metro 0.30.2
Hi @rafeca , I am facing this issue in RN 0.55.1 and metro version is 0.30.2.
I agree and that’s what I have requested in the issue I linked to. 0.55 has not been cut yet, there is no release to cherry-pick into.
@rafeca Yeah I get the same as @fungilation
My CMD & R keys are rapidly wearing out, would love to see this fixed. Annoying. But I love me some devs, thanks for all you do ❤️
I’ve been meaning to try React-Native-Debugger, but that doesn’t resolve this issue.