-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: React Native
-
2 - S (<= 1 week)
-
6066
How frequently does the bug occur?
Always
Description
The app crashes after 1 or 2 hot reloads with the error Access to invalidated Results objects, even though the code changes had nothing to do with Realm, like only changing styles and components
Stacktrace & log output
Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
ERROR Error: Exception in HostFunction: Access to invalidated Results objects, js engine: hermes Error: ENOENT: no such file or directory, open 'D:\Code\Projects\RealmHotReloadCrash\JavaScript' at Object.openSync (node:fs:585:3) at Object.readFileSync (node:fs:453:35) at getCodeFrame (D:\Code\Projects\RealmHotReloadCrash\node_modules\metro\src\Server.js:879:18) at Server._symbolicate (D:\Code\Projects\RealmHotReloadCrash\node_modules\metro\src\Server.js:962:22) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Server._processRequest (D:\Code\Projects\RealmHotReloadCrash\node_modules\metro\src\Server.js:418:7) { errno: -4058, syscall: 'open', code: 'ENOENT', path: 'D:\\Code\\Projects\\RealmHotReloadCrash\\JavaScript' }
Can you reproduce the bug?
Always
Reproduction Steps
- Pull my repo
- Start the development environment with yarn start and yarn android
- Open the app on your phone
- Open the project in any editor
- Now make any changes to the code, for example changing some values in the styles, like 'black' to 'red'
- Hit save, the hot reload will occur
- The app will crash and the error will appear in the terminal
- If it doesn't crash, then just make some more changes and save again, it will eventually happen, most of the time it took me 1 save to crash but sometimes it takes 2 saves
Version
^11.9.0
What services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
Android 13.0.3
Build environment
I built the app in Windows 10, connected to physical phone through USB debugging to install and debug the app
Cocoapods version
No response