question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

create a new react App with react-native init tool makes impossible to run App in iOS Simulator

See original GitHub issue

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

  1. react-native -v: react-native-cli: 2.0.1 react-native: 0.48.0
  2. node -v: v8.4.0
  3. npm -v: 5.3.0
  4. yarn --version: 0.27.5 Then, specify:
  • Target Platform: iOS
  • Development Operating System: macOS 10.12.6 (16G29)
  • Build tools: No i’m using the default tool to build but i have XCode installed

Steps to Reproduce

(Write your steps here:)

  1. run react-native init coms
  2. cd coms
  3. react-native run-ios
  4. react-native log-ios

Expected Behavior

runs react native Application in iOS simulator. with the default code generated by react-native-cli

(Write what you thought would happen.)

Actual Behavior

it build fine, and installs the App into the iOS simulator but when tries to run the app the app exists without any visible message or error and refuses to run.

in stderr screen running react-native log-ios this appears:

coms[7364] <Error>: assertion failed: 16G29 14E8301: libxpc.dylib + 64131 [624BAF4F-2E03-34F8-ACBA-970B04637786]: 0x7d
Unknown[7364] <Error>: 
coms[7364] <Notice>: Initializing <RCTCxxBridge: 0x6000001a2d80> (parent: <RCTBridge: 0x6000000a1ce0>, executor: (null))
coms[7364] <Warning>: Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
coms[7364] <Notice>: Running application coms ({
        initialProps =     {
        };
        rootTag = 1;
    })
coms[7364] <Error>: -[NSTaggedPointerString unsignedIntValue]: unrecognized selector sent to instance 0xa313537323930327
coms[7364] <Error>: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString unsignedIntValue]: unrecognized selector sent to instance 0xa313537323930327'
    *** First throw call stack:
    (
        0   CoreFoundation                      0x000000010d419b0b __exceptionPreprocess + 171
        1   libobjc.A.dylib                     0x000000010c2cf141 objc_exception_throw + 48
        2   CoreFoundation                      0x000000010d489134 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
        3   CoreFoundation                      0x000000010d3a0840 ___forwarding___ + 1024
        4   CoreFoundation                      0x000000010d3a03b8 _CF_forwarding_prep_0 + 120
        5   coms                                0x000000010b6a70d4 -[RCTMultipartStreamReader emitProgress:contentLength:final:callback:] + 244
        6   coms                                0x000000010b6a78ca -[RCTMultipartStreamReader readAllPartsWithCompletionCallback:progressCallback:] + 1610
        7   coms                                0x000000010b6f71fc -[RCTMultipartDataTask URLSession:streamTask:didBecomeInputStream:outputStream:] + 444
        8   CFNetwork                           0x000000010ce79c51 __88-[NSURLSession delegate_streamTask:didBecomeInputStream:outputStream:completionHandler:]_block_invoke + 51
        9   Foundation                          0x000000010bdd93b7 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
        10  Foundation                          0x000000010bdd90bb -[NSBlockOperation main] + 101
        11  Foundation                          0x000000010bdd7877 -[__NSOperationInternal _start:] + 627
        12  Foundation                          0x000000010bdd35fc __NSOQSchedule_f + 198
        13  libdispatch.dylib                   0x00000001110f4792 _dispatch_client_callout + 8
        14  libdispatch.dylib                   0x00000001110da237 _dispatch_queue_serial_drain + 1022
        15  libdispatch.dylib                   0x00000001110da98f _dispatch_queue_invoke + 1053
        16  libdispatch.dylib                   0x00000001110dc899 _dispatch_root_queue_drain + 813
        17  libdispatch.dylib                   0x00000001110dc50d _dispatch_worker_thread3 + 113
        18  libsystem_pthread.dylib             0x00000001114885a2 _pthread_wqthread + 1299
        19  libsystem_pthread.dylib             0x000000011148807d start_wqthread + 13
    )
SpringBoard[3413] <Error>: [KeyboardArbiter] HW kbd: Failed to set (null) as keyboard focus
com.apple.CoreSimulator.SimDevice.E2457C7B-7E39-4B0A-B1C4-0FF23CDB1193.launchd_sim[3395] (UIKitApplication:org.reactjs.native.example.coms[0xeff5][3418][7364]) <Notice>: Service exited due to Abort trap: 6
backboardd[3414] <Error>: [Common] Unable to get short BSD proc info for 7364: No such process
backboardd[3414] <Error>: [Common] Unable to get proc info for 7364: Undefined error: 0
assertiond[3418] <Warning>: Deleted job with label: UIKitApplication:org.reactjs.native.example.coms[0xeff5][3418]

Reproducible Demo

Theres is not a reproducible demo, due to the that the problem is into iOS Simulator

Detected work around

creating an app with create-react-native-app tool and executing yarn eject or npm eject, creates a app structure that has no problems into the iOS emulator

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:21 (2 by maintainers)

github_iconTop GitHub Comments

21reactions
krystofcelbacommented, Sep 3, 2017

Hi, here is quick fix for this error: "postinstall": "sed -i '' 's/\\[headers\\[@\"Content-Length\"\\] unsignedIntValue\\]/\\[headers\\[@\"Content-Length\"\\] intValue\\]/' ./node_modules/react-native/React/Base/RCTMultipartStreamReader.m" Add it to “scripts” in package.json in your project.

Also fixed in this PR GH-15755.

7reactions
dabit3commented, Sep 4, 2017

This issue has been fixed in version 0.48.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to build iOS apps using React Native
React Native enables you to use React to build mobile apps that work on iOS, and this tutorial will demonstrate how to do...
Read more >
Cannot launch or install app on ios Simulator , even after ...
I create a new project using react-native init AwesomeProject and it was successfully created , but when i run react-native run-ios it ...
Read more >
How to Run Your React Native App on iOS | Waldo Blog
To create a new app through React Native CLI, go to any terminal and run the command npx react-native init <project-name>. Here's an...
Read more >
How to make an iOS app on Windows with React Native & ...
It is possible to build an iOS app on Windows with React Native. With efficient tools, you don't need to own a MacBook...
Read more >
Creating Apps in React Native with an iOS Simulator
React Native is a framework based on React made for front-end mobile development. Unlike Swift or Java, apps written in React Native can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found