Running Debug runs a previous cached version of code
See original GitHub issueUsing a simulator or physical device on “Debug” mode, the app is running a previous cached version of the code being ran. If i was to change
<Text style={styles.buttonTitle}>Monthly</Text>
to
<Text style={styles.buttonTitle}>Yearly</Text>
The app shows “Monthly” rather then the updated version of “Yearly”.
After clicking “Stop Debugging” the app then shows the “Yearly” version, but when i go back to Debug the app will once again show “Monthly”
React Native version: System: OS: macOS 10.15.1 CPU: (8) x64 Intel® Core™ i7-3770 CPU @ 3.40GHz Memory: 1.95 GB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 8.15.1 - /usr/local/bin/node npm: 6.9.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1 IDEs: Android Studio: 3.5 AI-191.8026.42.35.5900203 Xcode: 11.2/11B52 - /usr/bin/xcodebuild npmPackages: react: 16.9.0 => 16.9.0 react-native: ^0.61.4 => 0.61.4 npmGlobalPackages: react-native-cli: 2.0.1
Steps To Reproduce
- Run app on Debug, and change values / actions etc.
- App values won’t change
- Turn off Debug, and the values will have changed
- Turn on Debug, values will go back to previous values
Describe what you expected to happen:
I expect that when i change the values in my code, while in Debug mode, the app updates along with the code.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5
Top GitHub Comments
Got same issue a couple of times on simulator. Tried restarting Metro Bundler, run on different simulators. Still keep running cached code when Debug enabled. It gets fixed after some time, don’t know how.
Using react-native: 0.61.1
yeah same issue here too,
even with this clean script, clean ios build and rebuild.