EISDIR: illegal operation on a directory when enable Remote Debug in Managed workflow

Hey @igor4505, please run expo diagnostics and share what’s printed out here.

Cheers,
Adam

1 Like

Thanks

1 Like

Hi igor4505-
I am having this problem now. When I run in remote debug I get : EISDIR: illegal operation on a directory, read
Were you able to figure this out?

Thanks!
p.s. my diagnostics:
Expo CLI 4.7.2 environment info:
System:
OS: macOS 10.15.7
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 14.17.1 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.13 - /usr/local/bin/npm
Watchman: 2021.06.07.00 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.7199119
Xcode: 12.4/12D4e - /usr/bin/xcodebuild
npmPackages:
expo: ~41.0.1 => 41.0.1
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz => 0.63.2
react-native-web: ~0.13.12 => 0.13.18
Expo Workflow: managed

1 Like

i have this problem too

Any update here?

The issue started for me after I updated the expo cli

I recently set up my environment, and I am also experiencing this error. Running the app works, but the issue arises whenever I enable Debug remote JS.

By running expo diagnostics, here’s my result:

EDIT: This is a bug in react-native and is unrelated to source maps. See Brent’s message at the end of the thread.

Hi @akinwalehabib, @shubhangh, @bombillazo, @eiire, @ldwight, @igor4505

I found a post about this here:

https://www.gitmemory.com/issue/facebook/metro/658/821060046

This person says that the problem went away when they disabled source maps in Chrome. Could you see if you get errors in Chrome about source maps at the same time as you get the EISDIR error?

If so, as a test, could you try disabling the source maps in chrome? If that gets past the problem then it seems like there might be something wrong with Metro wrt. source maps.

@shubhangh if this happened after an expo-cli upgrade, can you see which version of expo-cli worked for you and which version fails? I see expo-cli versions 4.7.0, 4.7.2 and 4.9.1 mentioned in the expo diagnostics output above.

1 Like

Hey @wodin, let me quickly give this a try and circle back.

Another thing you might try:

Clear your metro cache with: expo start -c

Let us know how it goes

I diabled the source maps in Google Chrome browser, and the issue persiss:

About to clear the expo cache to see if that works. Another thing is I just set up my environment on Mac, so this is a fresh install. This happened from create_react_native

Hey @shubhangh what cli version were you using before?

Hi @bycedric , thanks for helping out. Simply install create-react-app afresh using macOS catalina. That’s what I am experiencing. I scaffolded a new project using create-react-app, and I am unable to view logs, which results in the reported error.

What OS do you use @bycedric ?

Hi all, to investigate this further we would need a reproducible project. If any of you can send me a Github project, which has this issue, I’d be happy to take a look!

You can share the link here, or ping me on our Discord chat (Cedric).

2 Likes

I gave up on debugging after days of metro-messing and just did console logging, but now I really need to debug and this is still happening.
upgraded to SDK 42 (exercising magical thinking) but did not fix it.
Disabling the source maps means I can’t debug, so that’s not helpful, but also doesn’t seem to fix it.
will try to make a new project tomorrow to share.

Sure. I was just trying to narrow down the problem based on someone claiming that disabling sourcemaps got rid of the errors. It’s obviously not an actual solution.

sorry if that came across snarky - didn’t mean it to.

after typing that, all hell broke loose on my machine- the cursor started moving on its own, the simulator froze, and my language became quite foul.

I am wondering if something is getting trampled when in debug? I ran my app fine on the simulator until I tried to go into debug.

can try shrinking my app to get a reproducible problem tomorrow if no on else has yet.

That’s OK, I didn’t take it that way.

:astonished:

That would be great, thanks.

ok. Spent a couple hours peeling code away from my app, only to find out that I can make this happen with a brand new project created with expo init!

here’s how:
expo init demo
expo start -c
i (for ios simulator. opens SE 14.4 on my device)
m (for menu on simulator)
enable remote debugging
it opens a tab in my Brave browser
when i right click/ inspect to get into debug, this appears in my terminal:

Running application on Valle Phone (SE).
Error: EISDIR: illegal operation on a directory, read
at Object.readSync (fs.js:614:3)
at tryReadSync (fs.js:383:20)
at Object.readFileSync (fs.js:420:19)
at UnableToResolveError.buildCodeFrameMessage (/Users/lili/GalacticSmarties/Dev/demo/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:304:17)
at new UnableToResolveError (/Users/lili/GalacticSmarties/Dev/demo/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:290:35)
at ModuleResolver.resolveDependency (/Users/lili/GalacticSmarties/Dev/demo/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:168:15)
at DependencyGraph.resolveDependency (/Users/lili/GalacticSmarties/Dev/demo/node_modules/metro/src/node-haste/DependencyGraph.js:353:43)
at /Users/lili/GalacticSmarties/Dev/demo/node_modules/metro/src/lib/transformHelpers.js:271:42
at Server. (/Users/lili/GalacticSmarties/Dev/demo/node_modules/metro/src/Server.js:842:41)
at Generator.next ()
Error: EISDIR: illegal operation on a directory, read
at Object.readSync (fs.js:614:3)
at tryReadSync (fs.js:383:20)
at Object.readFileSync (fs.js:420:19)
at UnableToResolveError.buildCodeFrameMessage (/Users/lili/GalacticSmarties/Dev/demo/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:304:17)
at new UnableToResolveError (/Users/lili/GalacticSmarties/Dev/demo/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:290:35)
at ModuleResolver.resolveDependency (/Users/lili/GalacticSmarties/Dev/demo/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:168:15)
at DependencyGraph.resolveDependency (/Users/lili/GalacticSmarties/Dev/demo/node_modules/metro/src/node-haste/DependencyGraph.js:353:43)
at /Users/lili/GalacticSmarties/Dev/demo/node_modules/metro/src/lib/transformHelpers.js:271:42
at Server. (/Users/lili/GalacticSmarties/Dev/demo/node_modules/metro/src/Server.js:842:41)
at Generator.next ()
Error: EISDIR: illegal operation on a directory, read
at Object.readSync (fs.js:614:3)
at tryReadSync (fs.js:383:20)
at Object.readFileSync (fs.js:420:19)
at UnableToResolveError.buildCodeFrameMessage (/Users/lili/GalacticSmarties/Dev/demo/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:304:17)
at new UnableToResolveError (/Users/lili/GalacticSmarties/Dev/demo/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:290:35)
at ModuleResolver.resolveDependency (/Users/lili/GalacticSmarties/Dev/demo/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:168:15)
at DependencyGraph.resolveDependency (/Users/lili/GalacticSmarties/Dev/demo/node_modules/metro/src/node-haste/DependencyGraph.js:353:43)
at /Users/lili/GalacticSmarties/Dev/demo/node_modules/metro/src/lib/transformHelpers.js:271:42
at Server. (/Users/lili/GalacticSmarties/Dev/demo/node_modules/metro/src/Server.js:842:41)
at Generator.next ()

Also, although the source displays in the debugger, there is no green dot next to App.js to indicate that it is reachable, and setting a breakpoint confirms that it is not.

I hope this helps

Hi- I am able to consistently recreate this - please see my reply to Wodin below.