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

Can't fetch the source map while using the experimental debugger #46283

Open
PRESIDENT810 opened this issue Aug 30, 2024 · 6 comments
Open

Can't fetch the source map while using the experimental debugger #46283

PRESIDENT810 opened this issue Aug 30, 2024 · 6 comments
Labels
Debugger Issues related to React Native DevTools or legacy JavaScript/Hermes debugging 🌐Networking Related to a networking API. Newer Patch Available Resolution: Answered When the issue is resolved with a simple answer

Comments

@PRESIDENT810
Copy link

Description

I'm trying to use the new experimental debugger in our RN project, but in the DevTool window it says this:

Failed to fetch source map http://10.39.25.45:8081/index.map?platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.teslamotors.enterpriseapp: remote fetches not permitted

and can't fetch the source map, thus no source code is shown.

Here're some interesting I've found:

  • I can access this URL in Safari and in CLI using wget and curl, but I got this when I open it in Chrome:
image
  • I noticed this using Chrome's dev tools:
Screen.Recording.2024-08-30.at.11.55.01.AM.mov

The "content download" always gets killed after around 3.5s, and then it becomes "Aw Snap!"

  • I tried to use the experimental debugger on the Expo tutorial's starter app, which works fine (I think it's using the experimental debugger, instead of the old one?)
  • Our source map has ~200MB size

My assumption is that because our source map is so big, Chrome isn't able to download it within a time limit (so the download is always canceled after 3.5s) but I have no idea of how to verify that. Not sure if this is a Chrome bug or RN bug but I'll post it here anyway.

Steps to reproduce

Just launch the experimental debugger on some huge app with ~200MB source map, I guess?

React Native Version

0.73.6

Affected Platforms

Build - MacOS

Output of npx react-native info

npx react-native info

  WARNING: You should run npx react-native@latest to ensure you're always using the most current version of the CLI. NPX has cached version (0.73.6) != current release (0.75.2)

info Fetching system and libraries information...
System:
  OS: macOS 14.5
  CPU: (12) arm64 Apple M3 Pro
  Memory: 807.53 MB / 36.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.12.0
    path: /usr/local/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 8.19.2
    path: ~/.nvm/versions/node/v18.12.0/bin/npm
  Watchman:
    version: 2024.07.15.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/kainzhong/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.15989.150.2411.11948838
  Xcode:
    version: 15.1/15C65
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.11
    path: /usr/bin/javac
  Ruby:
    version: 2.7.5
    path: /Users/kainzhong/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.6
    wanted: 0.73.6
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

info React Native v0.75.2 is now available (your project is running on v0.73.6).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.75.2
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.75.2
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".

Stacktrace or Logs

> Failed to fetch source map http://10.39.25.45:8081/index.map?platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.teslamotors.enterpriseapp: remote fetches not permitted

Reproducer

I really don't know how to reproduce this on smaller projects

Screenshots and Videos

Included some in the description.

@react-native-bot
Copy link
Collaborator

⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - 0.73.9. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot react-native-bot added Newer Patch Available 🌐Networking Related to a networking API. Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Aug 30, 2024
@react-native-bot
Copy link
Collaborator

⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

@react-native-bot
Copy link
Collaborator

⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:

@react-native-bot
Copy link
Collaborator

⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@cortinico cortinico added the Debugger Issues related to React Native DevTools or legacy JavaScript/Hermes debugging label Sep 12, 2024
@cortinico
Copy link
Contributor

I'm trying to use the new experimental debugger in our RN project, but in the DevTool window it says this:

Please update to 0.76.x and try React Native DevTools over there. We don't offer support for the experimental debugger for previous versions of React Native.

@cortinico cortinico added Resolution: Answered When the issue is resolved with a simple answer and removed Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Sep 12, 2024
@PRESIDENT810
Copy link
Author

PRESIDENT810 commented Sep 12, 2024

I'm trying to use the new experimental debugger in our RN project, but in the DevTool window it says this:

Please update to 0.76.x and try React Native DevTools over there. We don't offer support for the experimental debugger for previous versions of React Native.

OK let me try that (it might take some time to upgrade RN because it's a huge project but I'll try to get back to you ASAP)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Debugger Issues related to React Native DevTools or legacy JavaScript/Hermes debugging 🌐Networking Related to a networking API. Newer Patch Available Resolution: Answered When the issue is resolved with a simple answer
Projects
None yet
Development

No branches or pull requests

3 participants