Skip to content

0.19 - Unable to run in simulator using main.jsbundle - Unable to execute JS call: __fbBatchedBridge is undefined #5820

@tdugger

Description

@tdugger

I've recently upgraded to 0.19 and my app runs fine if I am getting the javascript from the react packager using this line in AppDelegate.m:

jsCodeLocation = [NSURL URLWithString:@"http://192.168.1.10:8081/index.ios.bundle?platform=ios&dev=true"];

(note that I have to use my IP address here and have that IP added as an App Transport Security Setting exception, I guess because I use google auth in my app).

But to let others run my app through Xcode, while we are developing the backend, I was creating the main.jsbundle using this command:

curl http://localhost:8081/index.ios.bundle -o main.jsbundle

And this worked fine with 0.18.1, but after upgrading to 0.19, if I run the the simulator or even on the device whith this line in AppDelegate.m:

jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];

I get the error:
Unable to execute JS call: __fbBatchedBride is undefined

I do get this message repeated in the Xcode console.

I've read all stackoverflows and issues that match __fbBatchedBridge is undefined and haven't come up with an answer. I guess dropping back to 0.18.1 and that didn't solve the problem (see comments below).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions