1

I am running React Native project using npx react-native run-ios in terminal but its showing the following error:

Make sure you're running a packager server or have
included a .jsbundle file in your application bundle.

RCTFatal 
28—[RCTCxxBridge handleError:]_block_invok e 
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_callback_4CF 
_CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_Q UEUE 
_CFRunLoopRun 
CFRunLoopRunSpecific 
GSEventRunModal 
—[UlApplication _run]
UIApplicationMain 
main 
start

Solutions I have already tried

  • Changing port
  • Downgrading node module
  • Downgrading both React Native and project
  • Upgrading Firebase to the latest version and reinstalling it
  • Killing port if there is any script running

I have tried almost everything online and am looking for a solution.

donatJ
  • 3,105
  • 3
  • 32
  • 51
Rashid Ali
  • 155
  • 2
  • 9
  • So [none of these answers](https://www.google.com/search?q=RCTFatal+RCTCxxBridge+handleError+site:stackoverflow.com) helped? – mplungjan Aug 31 '21 at 11:07
  • Did you not miss the title of the error, like "No bundle URL present" - then you may have a dupe [here](https://stackoverflow.com/questions/43949607/no-bundle-url-present-react-native) – mplungjan Aug 31 '21 at 11:09
  • @mplungjan i have tried this but it did not resolve my issue – Rashid Ali Aug 31 '21 at 11:26
  • open dev tools (ctrl + m for ios simulator or shake device if its not simulator), then there in settings some where you can edit ip address, add your computers local ip with port, – Nikhil bhatia Aug 31 '21 at 12:11

2 Answers2

0

Adding this:

"build:ios": "react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios'"

to my package.json "scripts" worked form me.

Brandon Stewart
  • 600
  • 1
  • 8
  • 12
0

In 2022, I faced this issue with "react-native": "0.70.6". I renamed my "index.tsx" file to "index.js" file now it's ok.

and also in app level build.gradle file:

project.ext.react = [
    enableHermes: true,    //clean and rebuild if changing
    entryFile: "index.js", // "index.tsx",
]
ArefinDe
  • 678
  • 7
  • 13