-
-
Notifications
You must be signed in to change notification settings - Fork 809
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
react-native-debugger causes app to load stale JS code #423
Comments
I can confirm that this issue occurs and stays there even if you kill the app and restart it as the debugging option stays enabled, so this is definitely not an issue with the new react-native fast-reload feature. |
Live reload still updates code (with the debugger turned on). |
@mtnt In my case, nothing works as soon as |
@bockc 0.61.1 |
How can you choose to use live-reload specifically instead of the new fast-refresh feature ? |
same problem here ! I need to uninstall completely the app to make it work again, but this problem can reappear at any time... |
@jhen0409 any idea what could becausing this? Maybe Fast Refresh? I love this tool but now it's useless :/ |
Also facing this issue, In addition, upon saving files for fast refresh, I get the following error:
(only with React Native Debugger) |
This is happening to me as well. As soon as I start debugging, it reverts back to a previous version. With debugging off, it works fine. Fast refresh works with debugging off. react-native: 0.61.2 |
Happening for me too, stale code served with debugger connected. react-native: 0.61.3 |
I am having the same issue with v0.10.4. It took me nearly 2 hours to figure out what is causing it - I thought I was going mad! Does anyone have any work arounds? I already downgraded this tool once recently because it was freezing and I was forced to restart it about 5 times a day. Decided to upgrade hoping my previous issue was fixed, but it looks like there is an even more serious bug now, so for now it back to v0.9.14... RN: 0.61.2 |
@dquessenberry this is not an issue with |
@bockc hmmm, I don't seem to be encountering the issue via Chrome console. What is especially odd is if RND is connected it loads stale js, if disconnected it shows the latest code, however if I completely uninstall RND and then reinstall it, it still shows stale code. So with that said, I suppose you're correct, it must be something outside of RND, such as RN itself. Thanks. EDIT: I just downgraded RND to v0.9.14 and I no longer experience this issue. I'm not saying that the bug is entirely RND, but perhaps there is some issue with a combination of RND v0.10.4 and RN's fast refresh feature. For those interested in downgrading RND to the last major release, v0.9.14, run the following commands:
|
Well, that's nice to hear for you, glad that you could find a way out of this. I don't think the issue comes from a combination of RND and RN either, as I tried with both Chrome and RND, this issue is exactly the same. The only common thing I see between all I have tested is... RN itself haha, but of course I could be missing something |
Today was the first time I ran into this problem, coincidentally right after doing a self-update of React Native Debugger to 0.10.5. I'm not certain which version of RND I upgraded from, but it was at least 0.10.2 and likely 0.10.4. This is a RN 0.61.4 app. @dyancat 's suggestion of disabling the network cache worked for me, which leads me to assume that the development build of my app was fetching a cached version of the bundle. This seems reinforced by the fact that the only network fetch in the log window is for I had previously tried deleting the watchman cache, upgrading watchman, resetting the metro cache (multiple times), deleting my entire repo and reinstalling it, rebuilding the app, etc. The only consistent behavior was that each time I turned on debugging, the old version of the app loaded. After turning on debugging again, disabling network cache in React Native Debugger, and hitting reload on the app, the latest version of my app code loaded. Re-enabling the cache after that and reloading again still showed the latest version. |
I confirm that disabling the network cache prevents the issue from occurring. It didn't work for me because I didn't restart react-native-debugger after disabling the network cache. |
i suggest pin this issue before it is resolved. i have spend hours before come here |
Alright, I think we can close this issue. Thanks @dyancat! |
@rikur What do you mean close it? That's not a solution, that's a workaround! Can you make changes in the debugger so that it never loads stale Javascript code? This bug has caused me multiple hours TWICE! And I'm sure I'm not the only one. The problem described in this ticket is not resolved. |
Thanks for re-opening it. Is it possible that this https://stackoverflow.com/a/55026131 is the solution for this problem? |
the app runs old code since the evening I don't know why this is happening? |
Disable the cache like mentioned above. |
This is so fucking dumb. Yesterday no problem, today I had the issue. Wtf. Thanks for the fix @dyancat |
Fixed in 0.11.1 indeed :D |
The react native debugger must set that checkbox by default! Thank you @dyancat !! |
It does. Make sure to not use outdated versions. |
I'm on RN 0.62.2 |
RN version doesn't matter, it's the RN Debugger that you have to upgrade. |
I spent hours on this before i ended up here. Thanks @dyancat |
Ah this explains why I was only encountering this in the native debugger - on the web I commonly use the Disable Cache feature to test website page reloads, so that was already checked.. Thanks! |
The disabling cache feature does not work for me |
i met this problem after a git.lock generated, delete it, and every thing is ok |
Thank you! This worked for me. |
|
@jhen0409 Why is this still closed? Do we need to open another issue? |
React Native Debugger app version: 0.10.2
React Native version: 0.61.2
Platform: iOS
Is real device of platform: No
Operating System: macOS 10.14.6
When I enable Debug from the developer menu and connect through react-native-debugger, my app is stuck on an old, stale version of the JS code and editing files and reloading doesn't pick up any changes either. Debugging via the usual debugging tab in Chrome doesn't have this issue.
The text was updated successfully, but these errors were encountered: