Debug Remote JS immediately crashes server from EAS build?

I have an app that works fine in Expo Go. I’m able to shake the device and Debug Remote JS.
Soon it will need to be transitioned to an EAS build so I decided to try it as is.

To my surprise when turning on Debug Remote JS the metro server immediately crashes.

RuntimeError: abort(FetchError: invalid json response body at http://[::ffff:c0a8:15d]:19000/json/list reason: Unexpected token < in JSON at position 0). Build with -s ASSERTIONS=1 for more info.
    at process.abort (/node_modules/metro-hermes-compiler/src/emhermesc.js:402:15)

It seems like a Hermes issue but I’m not sure how to troubleshoot.

Thanks for any pointers in the right direction to troubleshoot!

it’s useful to share a bit more info about your project, and whether you can reproduce this on a new project. eg: npx expo-env-info dumps a bunch of details

Thanks Brent,
I just built this app from a fresh expo-router build. Waiting 15-20 minutes for each build to run when debugging a build specific issue really crushes my moral. For that reason, I always try asking in case someone already knows the issue. :upside_down_face:

I will go back and start from scratch after trying a couple other things with the existing bundle.

Here’s the env-info

expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 13.0.1
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 16.14.0 - /usr/local/bin/node
      Yarn: 3.3.0 - /opt/homebrew/bin/yarn
      npm: 8.5.1 - /opt/homebrew/bin/npm
      Watchman: 2022.11.28.00 - /opt/homebrew/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
    IDEs:
      Android Studio: 2021.3 AI-213.7172.25.2113.9123335
      Xcode: 14.1/14B47b - /usr/bin/xcodebuild
    npmPackages:
      babel-preset-expo: ~9.2.1 => 9.2.2 
      expo: ~47.0.3 => 47.0.8 
      react: 18.1.0 => 18.1.0 
      react-dom: 18.1.0 => 18.1.0 
      react-native: 0.70.5 => 0.70.5 
      react-native-web: ~0.18.7 => 0.18.10 
    npmGlobalPackages:
      eas-cli: 2.8.0
      expo-cli: 6.0.8
    Expo Workflow: managed

It’s unclear how it decides if this is a managed workflow. Maybe that’s the issue?

do you mean you created a project with npx create-react-native-app -t with-router and then ran eas build --profile development immediately after?

It works something like this:

If you have a directory in your project called android containing a file called build.gradle then expo-env-info says it’s bare.
If you have a directory in your project called ios containing a subdirectory called something.xcodeproj then expo-env-info says it’s bare.
Otherwise it says managed.

$ cd /tmp
$ mkdir blah
$ cd blah
$ touch package.json
$ npx expo-env-info

  expo-env-info 1.0.5 environment info:
    System:
      OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
      Shell: 5.1.16 - /bin/bash
    Binaries:
      Node: 16.13.2 - ~/bin/node
      Yarn: 1.22.19 - ~/.npm-global/bin/yarn
      npm: 9.1.2 - ~/.npm-global/bin/npm
    npmGlobalPackages:
      eas-cli: 2.7.1
      expo-cli: 6.0.8
    Expo Workflow: managed

$ mkdir android
$ touch android/build.gradle
$ npx expo-env-info

  expo-env-info 1.0.5 environment info:
    System:
      OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
      Shell: 5.1.16 - /bin/bash
    Binaries:
      Node: 16.13.2 - ~/bin/node
      Yarn: 1.22.19 - ~/.npm-global/bin/yarn
      npm: 9.1.2 - ~/.npm-global/bin/npm
    npmGlobalPackages:
      eas-cli: 2.7.1
      expo-cli: 6.0.8
    Expo Workflow: bare

$ rm -r android
$ mkdir -p ios/blah.xcodeproj
$ npx expo-env-info

  expo-env-info 1.0.5 environment info:
    System:
      OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
      Shell: 5.1.16 - /bin/bash
    Binaries:
      Node: 16.13.2 - ~/bin/node
      Yarn: 1.22.19 - ~/.npm-global/bin/yarn
      npm: 9.1.2 - ~/.npm-global/bin/npm
    npmGlobalPackages:
      eas-cli: 2.7.1
      expo-cli: 6.0.8
    Expo Workflow: bare

What do you get if you fetch that?

Interesting… it’s an unmatched route.

:thinking: What do you get if you click on the Sitemap?