-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Reloading App not updating for the latest modified code RN 0.61x #27029
Comments
Thanks for submitting your issue. Can you take another look at your description and make sure the issue template has been filled in its entirety? 👉 Click here if you want to take another look at the Bug Report issue template. |
I have the exact same issue. The only state reloaded by RN is the state right after installing the app, any further change won't be executed after a reload. Even by killing the app and starting it again, code modifications don't apply... EDIT: @hugoh59 I just noticed that this occurs only when I enable debugging AND that I use react-native-debugger. Works fine without debugger or if you use the Chrome console. Looks like this is more related to react-native-debugger than react-native itself. |
Live reload still updates code (with the debugger turned on). UPD: I use Chrome devtools and this happens again... |
I don't use react-native-debugger but still has this issue since updating to RN 0.61x, what works for me is completely restarting my computer but that's very time consuming. |
@hugoh59 I started new project with RN 0.61.1 and It worked ok including debugging via Chrome console.log and debugger... until this morning - and I did not do anything too (just open my laptop and refresh the simulator) |
Are you guys connecting to the Chrome debugger via |
And I don`t really see how good code that already worked ok and protected by package-lock and Podfile.lock could be broken without any updates... |
@mtnt I get the exact same issue. It's incomprehensible. It happened to me during the day as well now. It's like ghost code continue to live on even tho the code no longer exists, it still consol log things that I have erased and my code isn't updated. It's super frustrating I'm wasting hours on looking where this could come from with not result so far. Any help from the team would be appreciated. |
I still get the issue but it goes away and comes back for no reason. It also happens when I disable fast refresh. |
I've tried a lot of things including |
Well I just ran across this same issue right now using the chrome debugger this time. Had to kill the app and the debugger to actually reload my code. This is definitely an issue with the new react-native reload feature as no matter which debugger I use, this seems to occur randomly. I'd also like some feedback from the team, just to know if they could quickly take a look at it. @hugoh59 I don't have any .git/index.lock nor .hg/index.lock :/ EDIT: I confirm that as soon as I disable |
@bockc Yes I did not have one either yesterday and this morning I had one, I'm really lost into what's going on I'm sorry I can't help any further... What I would do is kill everything and restart my computer but even that only works some of the times. |
@hugoh59 I still don't have any of these files, so I guess the issue is deeper than a simple lock-file hidden in my project. I thought it could be some sort of cache, but I cleared every single cache related to my development environment and this has not changed anything. Also, my watchman is up to date (v 4.9.0_3). I literally have no clue where this could come from. |
It`s here again! =) And I don`t have the .git/index.lock |
@mtnt try disabling |
I did - no results... It starts working ok while debug is disabled, and returns just on enabling debug |
Same here... |
Having the same issue. This is extremely frustrating. |
My app in react native, i lost every time my states, i'm using hooks of react, useStates but, every time i update my app i lose my data, please help! |
Has anyone found a workaround so debugging can be enabled? As soon as I enable debugging old code is being loaded. I've tried all of the suggestions above. Disabling debugging 'fixes' it but I need debugging enabled for some of the modules I use to work correctly. Such a frustrating issue! |
@brien-crean Usually what I do when this occurs is I disable |
@bockc that unfortunately doesn't work for me. This happens on android and ios for me. I ended up having to clone my project repo to a new location and that resolved it for now |
Any help from the team would be appreciated. Not sure who to mention here. |
I'm not really sure if this really is what is causing the issue, but I noticed that when I got an exception in my code, I have the famous red screen and if I reload by saving my code after that, I will never be able to get the new code state, only the one that was before the exception crash. Once more, I'm not sure if that's exactly what's causing the issue. |
I'm forced to use XCode's console window and attaching to the process. It's kind of a workaround. |
For me changing Debug server host & port for device in Dev settings to |
This is also happening for me using react-native 0.62.1, only restarting the packager allows to get changes reloaded. |
solved when i tried
|
What solved it for me After that when i save the in vsCode i can see fast refresh blue banner again |
On Mac: Run react-native for ios then, Go to
Then go to Vscode,
This made hot reload working for me. |
In my case I try to close React Native Debuger from my chrome and I re run my project and its work for me thanks |
so it's basically clearing the cache of the debugger tab..... who would ever expect this to be the bug lol |
I've tried every solution mentioned above and nothing worked for me. Also did a nuke (deleting pods, deleting node_modules, yarn run cache clean, etc...). Disabling debug and fast refresh didn't work either. The code is still stale and I have to rebuild to get my code changes. I recently upgraded react-native on 0.61. UPDATE: UPDATE 2: |
Thanks,
|
That will cause major issues to your project if you don't know what you are doing. Force updating all your module versions has major impacts. As far as the issue, I have tried everything else mention. I am getting an has already been declared from me saving a reducer file with a statement I accidentally used twice. After removing I can't get rid of the error no matter how many times I use clean, rebuild, removing and reinstalling app, etc... I haven't touched the app for about 2 months, but had no issues 2 months abgo. |
|
Closing - Opening back the Node server worked for me. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
This Worked |
I was facing this issue few minutes ago, I managed to get it work by following the instructions below
Also, I tried |
In case it helps someone - I've noticed if I have any javascript syntax errors, the app will launch the last working version (no new code) which can be very confusing. The errors are logged in the metro terminal session so I now watch for that when running new code. |
I got the same issue, and it was so annoying. Once I disable Debug module, it works perfect for me. Just disable the debug module in the developer menu, and it will be fast reloading when you save the file. |
Having the same problem on 0.63.3. Tried all the above changes |
Does someone know why |
If you made it this far, it's worth noting that hot reloading only works in the render method of a class component. This gave me a run for my money trying to figure out why my StackHavigator Header wasn't updating: |
To see your updated changes, |
still having the same issue with react-native: 0.63.4. |
Same for me |
Same for me except only for externally defined functions. Workaround: Update logic or UI on a functional component. Metro for some reason rebuilds external functions then which is faster than rebuilding the entire project every time. |
it solved to me |
Any new solutions on this? These ones didnt work for me |
Since this morning, after not doing anything new to my project, the code suddenly stopped updating the view in my Xcode project. I have tried everything reseting the cache, reinstalling watchman, disabling fast refresh but nothing works. It seems as the project is no longer linked to the current version of my code somehow but keeps referring back to previous version.
The text was updated successfully, but these errors were encountered: