react-native-debugger icon indicating copy to clipboard operation
react-native-debugger copied to clipboard

ENOENT: no such file or directory, open RNDebuggerWorker.js

Open ksielyov opened this issue 4 years ago • 11 comments

Error: ENOENT: no such file or directory, open 'file:///Applications/React%20Native%20Debugger.app/Contents/Resources/app.asar/js/RNDebuggerWorker.js' at Object.openSync (fs.js:498:3) at Object.readFileSync (fs.js:394:35) at getCodeFrame (/Users/mikhailkiselyov/WebstormProjects/languagenow2clone/node_modules/metro/src/Server.js:995:18) at /Users/mikhailkiselyov/WebstormProjects/languagenow2clone/node_modules/metro/src/Server.js:1054:24 at Generator.next () at asyncGeneratorStep (/Users/mikhailkiselyov/WebstormProjects/languagenow2clone/node_modules/metro/src/Server.js:99:24) at _next (/Users/mikhailkiselyov/WebstormProjects/languagenow2clone/node_modules/metro/src/Server.js:119:9) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:95:5)

React Native Debugger app version: [0.11] React Native version: [0.63.3] Platform: [IOS and Android.] Is real device of platform: [No] Operating System: [macOS - Apple Silicon]

ksielyov avatar Dec 15 '21 18:12 ksielyov

same issue

kvlknctk avatar Apr 03 '22 16:04 kvlknctk

same for me

alanltr avatar Apr 12 '22 09:04 alanltr

trying to open the file in the browser confirms that it does not exist, at least not at that path.

s0rta avatar Apr 14 '22 17:04 s0rta

Same here. The issue occurred after upgrading to newer Expo, React/React Native versions.

Versions:

  • Expo 45 SDK
  • React Native: 0.68.2
  • React: 17.0.2
  • React Native Debugger App: 0.12.1
  • Yarn resolution:
"resolutions": {
    "react-devtools-core": "4.14.0"
  },

Environment:

  • Expo Managed project
  • iOS Simulator
  • MacOS Monterey

Trace:

Error: ENOENT: no such file or directory, open '/****/file:/Applications/React%20Native%20Debugger.app/Contents/Resources/app.asar/js/RNDebuggerWorker.js'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at getCodeFrame (/****/node_modules/metro/src/Server.js:949:18)
    at Server._symbolicate (/****/node_modules/metro/src/Server.js:1022:22)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Server._processRequest (/****/node_modules/metro/src/Server.js:429:7) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/****/file:/Applications/React%20Native%20Debugger.app/Contents/Resources/app.asar/js/RNDebuggerWorker.js'
}

I have attempted several fixes with low confidence, however, as there is not much community knowledge around this issue:

  • Remove/Reinstall dependencies.
  • Attempt different versions of react-devtools-core & the yarn resolution.
  • Update to latest react-native-debugger version.
  • Clear Expo cache: expo start --clear.
  • Reinstall Expo app within the iOS simulator.

I hope this issue gains more popularity and gets resolved. I consider using alternative tools because of it, even though I have mostly used RND successfully in the last 2 years.

Solution

Turned out I had an entrypoint problem as I forgot to update app.json and "expo": { "entryPoint": "./index.js", ...} to point to the new entrypoint file I added. This was part of the configuration of migrating to the new Expo build system.

In general, this was the cause of the error, however, it was not reported by RND, making it seem the problem (as described above) was the root cause. Whoever it may help, ensure your app entrypoint before trying to solve this problem.

FrogBattle avatar Jun 12 '22 10:06 FrogBattle

Getting the same issue React native (CLI). Not able to connect to debuggger

anujraghuvanshi avatar Aug 24 '22 10:08 anujraghuvanshi

Same issues I'm facing

jobayer977 avatar Sep 23 '22 01:09 jobayer977

Any updates on this issue?

KAMRONBEK avatar Nov 29 '22 12:11 KAMRONBEK

Just FYI I found myself here because I had just upgraded to RN0.70.6. What I didn't think about was that the upgrade uses Hermes as a default. RNDebugger requires the use of the V8 engine to run, which obviously means Hermes breaks RNDebugger. If you're here for the same reason, here are two solutions:

  1. you can disable hermes (and all the benefits that come along with it)
  2. you can use a different debugging tool. There has been a feature request for Hermes support, but I'm not sure the owner has the overhead for this.

If you choose to stick with Hermes, in order to clear the above on ios, you'll need to clear your device settings. Device -> Erase all content and settings.

alexzobi avatar Dec 22 '22 17:12 alexzobi

same issue, any update?

SliverYuki avatar Apr 27 '23 07:04 SliverYuki

same issue +

coldSeattle avatar Sep 24 '23 11:09 coldSeattle