Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expo debug: waiting for bundler on 127.0.0.1 getting 404 for http://127.0.0.1/json/list #235

Open
stefan-schweiger opened this issue Oct 27, 2023 · 10 comments
Labels
bug Something isn't working Need repro Issue needs a reproducible repository

Comments

@stefan-schweiger
Copy link

Description of the bug

When I start the debugger via "Expo: Debug Expo app on a device or simulator, using Hermes" I get an popup which tells me Expo debug: waiting for bundler on 127.0.0.1 but nothing happens. From monitoring the network traffic I see that requests are made to http://127.0.0.1/json/list which just error out with 404.

The weird thing is that the debugger was working for me a few weeks ago and also just accessing http://127.0.0.1 returns a valid response:

{
   "id":"b130f910-19af-4ad5-aa28-a59ceff4fea0",
   "createdAt":"2023-10-27T12:24:17.378Z",
   "runtimeVersion":"exposdk:49.0.0",
   "launchAsset":{
      "key":"bundle",
      "contentType":"application/javascript",
      "url":"http://127.0.0.1:8081/index.bundle?platform=ios&dev=true&hot=false&lazy=true"
   },
   "assets":[
      
   ],
   "metadata":{
      
   },
   "extra":{
      "eas":{
         
      },
      "expoClient":{
         "name":"<MY_APP_NAME>",
         "slug":"<MY_SLUG>",
         "owner":"<MY_ORG>",
         "version":"1.0.6",
         "orientation":"portrait",
         "icon":"./assets/images/icon_dev.png",
         "backgroundColor":"#FFFFFF",
         "scheme":"<MY_SCHEME>",
         "userInterfaceStyle":"light",
         "jsEngine":"hermes",
         "splash":{
            "image":"./assets/images/splashscreen.png",
            "resizeMode":"contain",
            "backgroundColor":"#FFFFFF",
            "imageUrl":"http://127.0.0.1:8081/assets/./assets/images/splashscreen.png"
         },
         "assetBundlePatterns":[
            "**/*"
         ],
         "ios":{
            "supportsTablet":true,
            "bundleIdentifier":"<MY_SCHEME>",
            "config":{
               "usesNonExemptEncryption":false
            },
            "infoPlist":{
               "NSCameraUsageDescription":"Allow $(PRODUCT_NAME) to access your camera"
            }
         },
         "android":{
            "adaptiveIcon":{
               "foregroundImage":"./assets/images/adaptive-icon_dev.png",
               "backgroundColor":"#4b4b64",
               "foregroundImageUrl":"http://127.0.0.1:8081/assets/./assets/images/adaptive-icon_dev.png"
            },
            "package":"<MY_SCHEME>",
            "permissions":[
               "android.permission.READ_EXTERNAL_STORAGE",
               "android.permission.WRITE_EXTERNAL_STORAGE",
               "android.permission.DOWNLOAD_WITHOUT_NOTIFICATION",
               "android.permission.ACCESS_NETWORK_STATE",
               "android.permission.CAMERA"
            ]
         },
         "extra":{
            "appEnvironment":"localdevk8s"
         },
         "runtimeVersion":{
            "policy":"sdkVersion"
         },
         "plugins":[
            [
               "expo-build-properties",
               {
                  "ios":{
                     "flipper":true,
                     "newArchEnabled":false
                  },
                  "android":{
                     "newArchEnabled":false,
                     "enableProguardInReleaseBuilds":true
                  }
               }
            ],
            "@config-plugins/react-native-blob-util",
            "@config-plugins/react-native-pdf",
            [
               "react-native-vision-camera",
               {
                  "enableCodeScanner":true
               }
            ]
         ],
         "_internal":{
            "isDebug":false,
            "projectRoot":"<MY_SOURCE_PATH>",
            "dynamicConfigPath":"<MY_SOURCE_PATH>/app.config.js",
            "staticConfigPath":{
               
            },
            "packageJsonPath":"<MY_SOURCE_PATH>/package.json",
            "pluginHistory":{
               "react-native-blob-util":{
                  "name":"react-native-blob-util",
                  "version":"0.19.2"
               },
               "react-native-pdf":{
                  "name":"react-native-pdf",
                  "version":"6.7.1"
               },
               "react-native-vision-camera":{
                  "name":"react-native-vision-camera",
                  "version":"3.5.1"
               }
            }
         },
         "sdkVersion":"49.0.0",
         "platforms":[
            "ios",
            "android",
            "web"
         ],
         "iconUrl":"http://127.0.0.1:8081/assets/./assets/images/icon_dev.png",
         "hostUri":"127.0.0.1:8081"
      },
      "expoGo":{
         "debuggerHost":"127.0.0.1:8081",
         "logUrl":"http://127.0.0.1:8081/logs",
         "developer":{
            "tool":"expo-cli",
            "projectRoot":"<MY_SOURCE_PATH>"
         },
         "packagerOpts":{
            "dev":true
         },
         "mainModuleName":"index",
         "__flipperHack":"React Native packager is running"
      },
      "scopeKey":"@anonymous/<MY_SLUG>-681e8f93-4be3-495e-9a56-ebf8d50c2ef5"
   }
}

Expected behavior

Debugger should start correctly

Actual behavior

image

Additional context

Extension version 1.0.7 (but I have also tried the current pre-release)

expo-env-info 1.0.5 environment info:
  System:
    OS: macOS 14.0
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.1.0 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.0 - /opt/homebrew/bin/npm
    Watchman: 2023.10.23.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.14.2 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 23.0, iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0
  IDEs:
    Android Studio: 2021.2 AI-212.5712.43.2112.8609683
    Xcode: 15.0/15A240d - /usr/bin/xcodebuild
  npmPackages:
    expo: ^49.0.11 => 49.0.16 
    react: 18.2.0 => 18.2.0 
    react-dom: 18.2.0 => 18.2.0 
    react-native: 0.72.6 => 0.72.6 
    react-native-web: ~0.19.8 => 0.19.9 
  Expo Workflow: managed
@rezio-gary
Copy link

same here

@byCedric
Copy link
Member

byCedric commented Nov 8, 2023

Hi all! Can either one of you create a repository for me to test a few things? I suspect it might be related to the dev server responding to <bundlerUrl>/json/list as being a page or screen of your app, instead of returning the correct CDP response.

CDP response from the protocol specification:
image

@byCedric byCedric added bug Something isn't working Need repro Issue needs a reproducible repository labels Nov 8, 2023
@stefan-schweiger
Copy link
Author

@byCedric https://github.com/stefan-schweiger/expo-debugger-bug maybe there is a bit more to trim, but I can simulate the behavior with this (in expo go as well as in my own devclient)

@stefan-schweiger
Copy link
Author

@byCedric if you find the time can you let me know if the repro behaves the same for you?

@stefan-schweiger
Copy link
Author

@byCedric any update on this?

@Akuma-U1
Copy link

Hi, I'm having the same issue as well. Would love updates.

@ctrlx-altf4
Copy link

I got the same issue too.

@nwazuo
Copy link

nwazuo commented Jun 19, 2024

I got this issue too.

@jar145
Copy link

jar145 commented Jul 4, 2024

I'm having the same issues as well

@Stumblor
Copy link

Stumblor commented Jul 13, 2024

Just worked it out, at least for me.

  1. Run in terminal tab npx expo start
  2. In terminal tab start android debugging (or another) by pressing a
  3. In VSCode debugger, start Debug Expo app

Voilà

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Need repro Issue needs a reproducible repository
Projects
None yet
Development

No branches or pull requests

8 participants