Can't fetch the source map while using the experimental debugger #46283
Description
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
andcurl
, but I got this when I open it in Chrome:
- 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.