Repository navigation
No script URL provided. Make sure the packager is running or you have embedded a JS bundle in your application bundle. #49173
Copy link
Copy link
Closed
Labels
Needs: AttentionIssues where the author has responded to feedback.Issues where the author has responded to feedback.Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.This issue could be improved with a clear list of steps to reproduce the issue.📦Bundler
Description
Description
i upgrade my react native app from 0.76.6 to 0.77.0. The build has successfully but i have the following error
No script URL provided. Make sure the packager is running or you have embedded a JS bundle in your application bundle.
unsanitizedScriptURLString = (null)
Steps to reproduce
i applied all the step mention
https://react-native-community.github.io/upgrade-helper/?from=0.76.6&to=0.77.0&package=com.idp.com&name=IDPMobile
- npm install
- cd ios
- pod deintegrate pod install --repo-update
- cd ios && xcodebuild clean
- npx react-native run-ios
React Native Version
0.77.0
Affected Platforms
Runtime - iOS
Output of npx react-native info
System:
OS: macOS 14.5
CPU: (8) arm64 Apple M1
Memory: 111.05 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.18.1
path: ~/.nvm/versions/node/v20.18.1/bin/node
Yarn: Not Found
npm:
version: 10.9.2
path: ~/Documents/AccuV-Team/IDP.Mobile/node_modules/.bin/npm
Watchman:
version: 2024.01.22.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.4
- iOS 17.4
- macOS 14.4
- tvOS 17.4
- visionOS 1.1
- watchOS 10.4
Android SDK:
API Levels:
- "28"
- "29"
- "31"
- "33"
- "34"
- "35"
Build Tools:
- 29.0.2
- 30.0.2
- 30.0.3
- 31.0.0
- 33.0.0
- 33.0.2
- 33.0.3
- 34.0.0
- 35.0.0
System Images:
- android-31 | Google APIs ARM 64 v8a
- android-33 | Google APIs ARM 64 v8a
- android-34 | Google APIs ARM 64 v8a
- android-34 | Google Play ARM 64 v8a
- android-35 | Google APIs ARM 64 v8a
- android-35 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2024.2 AI-242.23339.11.2421.12700392
Xcode:
version: 15.3/15E204a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.11
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 15.0.1
wanted: 15.0.1
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.77.0
wanted: ^0.77.0
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Stacktrace or Logs
No script URL provided. Make sure the packager is running or you have embedded a JS bundle in your application bundle.
unsanitizedScriptURLString = (null)
Reproducer
https://github.com/TonyFTannous-Byd/repo
open the terminal and run the following:
1- npm run start:clean
2- npm run android:local (it work no problem)
3- npm run ios:local (ios platform did not work, and i have the error in the Screenshots bellow)
...
Screenshots and Videos
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Needs: AttentionIssues where the author has responded to feedback.Issues where the author has responded to feedback.Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.This issue could be improved with a clear list of steps to reproduce the issue.📦Bundler

Activity
jeroenburgers commentedon Feb 17, 2025
You are a hero @OTitaev!
TonyFTannous-Byd commentedon Feb 17, 2025
good job @OTitaev 👍
TonyFTannous-Byd commentedon Feb 21, 2025
@OTitaev
our Cocoapods scripts should inject that flag for you: https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L422
the react_native_post_install function called in your post_install hook as shown here: https://github.com/react-native-community/template/blob/main/template/ios/Podfile#L28-L33
why SWIFT_ACTIVE_COMPILATION_CONDITIONS not injected????
wuduwawawei commentedon Feb 27, 2025
#49245 (comment)
Try this and I hope it can help you.
ouyangzhigang commentedon Apr 2, 2025
Facing same problem
ashishAmz commentedon Apr 3, 2025
I am also facing same issue,
rym903 commentedon Apr 4, 2025
I'm also facing same issue
rym903 commentedon Apr 4, 2025
I tried this but
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";is already inside my project.pbxproj..matinzd commentedon Apr 16, 2025
SWIFT_ACTIVE_COMPILATION_CONDITIONS is not being set for the main project. It's being set for pods project. You'll also need to add it for the main project:
jsSteud commentedon Apr 17, 2025
For me the problem was solved, when I had both (computer and iPhone) in the same WIFI. Only connected with a cable didn't work, but within the same WIFI worked.
gfgafn commentedon Apr 22, 2025
Check your network proxy settings, you will get this error when the following three conditions are met at the same time
This causes the request from your react native APP to http://localhost:8081 not be forwarded to the Metro Dev Server by the proxy server.
The simplest solution
Turn off the network proxy in Mac OS System Settings, completely exit your react native APP and reopen itadd
localhostto Bypass proxy settings for these hosts & domains:redbluenat commentedon Apr 23, 2025
I had the same problem, and I already had the SWIFT_ACTIVE_COMPILATION_CONDITIONS flag set. Here's what helped me:
Remove Pods
Remove node_modules
Do a fresh install
After installing the app, go to Settings and enable Local Network access
daraxdray commentedon May 13, 2025
Fresh install of all the node modules and pod?
ANd where in the settings are we going to enable Local Network access?
ascebiswajit commentedon May 14, 2025
if u facing this issue , and tries everything then tried it once
if u have that doubt Why U uncheck It read below
When running the app from Xcode to a real device:
By default, Metro runs at localhost:8081 on your Mac, but the device cannot resolve localhost to your Mac IP.
Additionally, in Xcode Build Phases → "Bundle React Native code and images", the option "For install builds only" is often checked by default.
This causes the bundling script to only run for install builds, not for normal debug builds.
Resulting in the device trying to connect to Metro but failing because the app doesn't know the correct Metro server IP.
Imran0511 commentedon Jun 2, 2025
Do one thing
If you are building the app via XCode leave that and build it using terminal
like for example do yarn ios --device(if you are using yarn) , you can select your iphone there
It will make a new build and hopefully it'll run
Also you can check if your metro was running earlier. Close that and build again.
Chwajid007 commentedon Jun 23, 2025
Delete the node modules and pods then reinstall it.
Works for me.
build(expo): upgrade expo sdk to version 53
build(expo): upgrade expo sdk to version 53
build(expo): upgrade expo sdk to version 53
build(expo): upgrade expo sdk to version 53
build(expo): upgrade expo sdk to version 53
build(expo): upgrade expo sdk to version 53
build(expo): upgrade expo sdk to version 53
genesisbell commentedon Jul 24, 2025
My problem was that I had scheme names other than DEBUG. What I needed to do was to Add -DDEBUG to all my Debug-Like Schemes. Steps:
Open Xcode → Project Navigator → Select your app target
Go to Build Settings
Swift Compiler – Custom Flags > Other Swift Flags
For example:
✅ After Adding:
npx react-native start --reset-cachesandy-garrido commentedon Aug 27, 2025
For me the issue was simply that the testing device and the developer mac were on restricted networks (the need to be able to talk to each other via the network). I set up a hotspot for both devices (Dev Mac & test iPhone) and now it works.
Super1Windcloud commentedon Sep 14, 2025
It's so easy ,
First method , xcode config
Allow access to the local networkSecond method , iphone open settings to set app permission for allow access to local network
ShadyElsharnoby commentedon Sep 15, 2025
getsentry/sentry-react-native#5168
ShadyElsharnoby commentedon Sep 15, 2025
Steps to Reproduce
upgrade react native to latest 0.81.4
and add new scripts like Sentry DOC
`set -e
WITH_ENVIRONMENT="../node_modules/react-native/scripts/xcode/with-environment.sh"
REACT_NATIVE_XCODE="../node_modules/react-native/scripts/react-native-xcode.sh"
SENTRY_XCODE="../node_modules/@sentry/react-native/scripts/sentry-xcode.sh"
BUNDLE_REACT_NATIVE="/bin/sh $SENTRY_XCODE $REACT_NATIVE_XCODE"
Expected Result
when run on real device this should work normal like simulator but i faced this error
No script URL provided. Make sure the packager is running or you have embedded a JS bundle in your application bundle. unsanitizedScriptURLString = (null)
in case i revert the script every thing work good without sentry
Actual Result
No script URL provided. Make sure the packager is running or you have embedded a JS bundle in your application bundle. unsanitizedScriptURLString = (null)
antinucleus commentedon Sep 17, 2025
If a local server (e.g., Express or Fastify) is started on the same port as Expo (8081), this error will occur. In my case, the issue was resolved by stopping the local server or configuring it to use a different port.
Donybro commentedon Sep 24, 2025
I did prev steps SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; then deleted ios,android,expo, node-modules folders then do npm install, npx expo prebuild --clean and npx expo run:ios --device but still see issue, then I changed my backend base url in .env file from http://localhost:8080 to http://172.16.13.4:8080 (you can get your own with ipconfig getifaddr en0) and it is worked for me
UlasRenasOrdu commentedon Oct 15, 2025
npm install --> npx expo run:ios
worked for me.
Fix build
feat: upgrade react-native@0.77.3 (#83)
justsomeofl commentedon Jan 25, 2026
Add this to AppDelegate.swift before startReactNative
ericTrayt commentedon Apr 15, 2026
Why is this closed, still seems to be an issue for many people and none of the above answers have worked for me.
joartola commentedon Apr 21, 2026
Hitting this on RN 0.83.4 + New Architecture + Expo 55 + Objective-C AppDelegate. Both simulator and physical device affected.
Diagnosis
Added logging inside
bundleURLto trace the resolution chain:Result:
Metro is reachable at
localhost:8081(200 OK),isPackagerRunning(localhost)returns YES, butpackagerServerHostPortreturns nil. This meansguessPackagerHostinsidepackagerServerHostPortreturns nil despite its individual pieces working correctly.After calling
setJsLocation:@"localhost"explicitly,packagerServerHostPortreturns"localhost"andbundleURLreturns a valid URL.Workaround
Two things were needed together:
1. Add
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"to the app target's Debug build config (as @TonyFTannous-Byd suggested — it was set project-level but missing on the target itself)2. Pre-set
jsLocationbeforestartReactNativein AppDelegate:For us, the SWIFT flag alone wasn't sufficient — possibly because we have an Objective-C AppDelegate (not Swift). The
setJsLocationbypass ensurespackagerServerHostPorttakes thejsLocationpath and never hits the brokenguessPackagerHostbranch.Also required for physical devices:
runOnlyForDeploymentPostprocessing = 0on the "Bundle React Native code and images" build phase soip.txtis generated in Debug builds (was set to 1, meaning it only ran during Archive).Environment
RCT_NEW_ARCH_ENABLED=1)wubaibin commentedon Sep 9, 2026
First, run "yarn start", and then run "yarn ios".