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

Metro Bundle Does not start automatically when run the ios build #48554

Closed
huzaifahazelGit opened this issue Jan 9, 2025 · 13 comments
Closed
Labels
📦Bundler Newer Patch Available Platform: iOS iOS applications. Resolution: Answered When the issue is resolved with a simple answer Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)

Comments

@huzaifahazelGit
Copy link

Description

No script URL provided. Make sure the packager is running or you have embedded a JS bundle in your application bundle.

Steps to reproduce

1.yarn
2.cd ios / pod install
3.xed i

React Native Version

0.76.3

Affected Platforms

Runtime - iOS

Areas

Fabric - The New Renderer

Output of npx react-native info

System:
  OS: macOS 15.2
  CPU: (12) arm64 Apple M2 Pro
  Memory: 115.92 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.19.0
    path: ~/.nvm/versions/node/v18.19.0/bin/node
  Yarn:
    version: 3.6.4
    path: ~/.nvm/versions/node/v18.19.0/bin/yarn
  npm:
    version: 10.9.2
    path: ~/ReactNative/Ans/manifesting-bliss-mobile-app/node_modules/.bin/npm
  Watchman:
    version: 2024.11.11.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/muhammadhuzaifajunaid/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.1
      - iOS 18.1
      - macOS 15.1
      - tvOS 18.1
      - visionOS 2.1
      - watchOS 11.1
  Android SDK:
    API Levels:
      - "28"
      - "29"
      - "31"
      - "32"
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 28.0.3
      - 29.0.2
      - 30.0.2
      - 30.0.3
      - 31.0.0
      - 32.0.0
      - 33.0.0
      - 33.0.1
      - 34.0.0
      - 35.0.0
    System Images:
      - android-33 | Google APIs ARM 64 v8a
      - android-33 | Google Play ARM 64 v8a
      - android-34 | Google APIs ARM 64 v8a
      - android-UpsideDownCakePrivacySandbox | Google Play ARM 64 v8a
      - android-UpsideDownCakePrivacySandbox | Google Play Intel x86_64 Atom
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23339.11.2421.12550806
  Xcode:
    version: 16.1/16B40
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.11
    path: /Users/muhammadhuzaifajunaid/.jenv/shims/javac
  Ruby:
    version: 2.7.6
    path: /Users/muhammadhuzaifajunaid/.rbenv/shims/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.76.3
    wanted: 0.76.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

unsanitizedScriptURLString = (null)
W0109 12:25:12.093255 1808986112 UIManagerBinding.cpp:61] UIManagerBinding::~UIManagerBinding() was called (address: 0x600003b08718).
W0109 12:25:12.093323 1808986112 UIManager.cpp:64] UIManager::~UIManager() was called (address: 0x105427be8).

Reproducer

https://github.com/huzaifahazelGit/AwesomeProject.git

Screenshots and Videos

Simulator Screenshot - iPhone 16 Plus - 2025-01-09 at 12 26 26
Simulator Screenshot - iPhone 16 Plus - 2025-01-09 at 12 26 26

@huzaifahazelGit huzaifahazelGit added Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) labels Jan 9, 2025
@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - 0.76.5. 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
Copy link
Collaborator

Tip

Newer version 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
Copy link
Contributor

3.xed i

What is xed i? You should run yarn ios instead

@huzaifahazelGit
Copy link
Author

huzaifahazelGit commented Jan 9, 2025 via email

@cortinico
Copy link
Contributor

Have you tried yarn ios? Is it working for you?

@riteshshukla04
Copy link
Contributor

riteshshukla04 commented Jan 9, 2025

react-native-community/discussions-and-proposals#681

I think run metro hook has been removed in RN 0.73 which used to launch metro when running from Xcode. You should try yarn iOS or launch metro manually

@cipolleschi
Copy link
Contributor

Correct @riteshshukla04 , when building from Xcode, you have to start Metro manually.
Running yarn ios, instead, will start Metro for you.

@cortinico cortinico added Resolution: Answered When the issue is resolved with a simple answer and removed Needs: Triage 🔍 labels Jan 13, 2025
@TonyFTannous-Byd
Copy link

i have the same issue when i upgrade my app from 0.76.6 to 0.77.0 (ios platform only)

@cipolleschi
Copy link
Contributor

@TonyFTannous-Byd
react-native-community/discussions-and-proposals#681
Metro does not start automatically anymore. You need to start it manually with yarn start

@TonyFTannous-Byd
Copy link

TonyFTannous-Byd commented Feb 7, 2025

@cipolleschi
i already launched it, but same error
you can try this example: https://github.com/TonyFTannous-Byd/repo

@cipolleschi
Copy link
Contributor

@TonyFTannous-Byd I tried the reproducer, and effectively, it does not work.
However, I don't think that it is a React native project.

Metro is running fine and you can go to localhost:8081 to check that.
I see that the reproducer uses some other tool, like Reactatron. I think that the problem lies there, as a new app with 0.77 runs fine and connects to metro.

Please, open an issue on those repository, as they can provide better support than us.

@TonyFTannous-Byd
Copy link

TonyFTannous-Byd commented Feb 7, 2025

@cipolleschi

  1. install the repo
  2. npm install
  3. cd ios && pod install
  4. npm run start:clean
  5. npm run android:local (it work no problem)
  6. npm run ios:local (it build successfuly but doesn't launch with the error mention above)

but if i remove AppDelegate.swift and restore the objective C files AppDelegate.mm (with integration of RCTAppDependencyProvider) and AppDelegate.h and main.m IOS work again properly

@TonyFTannous-Byd
Copy link

@cipolleschi
a new issue opened.
#49245

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦Bundler Newer Patch Available Platform: iOS iOS applications. Resolution: Answered When the issue is resolved with a simple answer Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)
Projects
None yet
Development

No branches or pull requests

6 participants