ninjaboy
ninjaboy

Reputation: 300

React Native ejected expo app is crashing in simulator

I have an app that started failing recently when I am trying to start it in XCode. Initially I thought it’s some of my recent changes that caused this, but neither rolling back the repository, nor re-ejecting it helped.

Finally, I managed to minimally reproduce it:

expo init myawsomeapp
cd myawesomeapp
yarn start (runs in simulator well)
expo eject (choose eject to expokit)
cd ios; pod install
open ios/myawesomeapp.xcworkspace in XCode
start the app in simulator

enter image description here

Crash:

libsystem_kernel.dylib`__pthread_kill:
    0x7fff523bc7f0 <+0>:  movl   $0x2000148, %eax          ; imm = 0x2000148 
    0x7fff523bc7f5 <+5>:  movq   %rcx, %r10
    0x7fff523bc7f8 <+8>:  syscall 
->  0x7fff523bc7fa <+10>: jae    0x7fff523bc804            ; <+20>
    0x7fff523bc7fc <+12>: movq   %rax, %rdi
    0x7fff523bc7ff <+15>: jmp    0x7fff523b6a89            ; cerror_nocancel
    0x7fff523bc804 <+20>: retq   
    0x7fff523bc805 <+21>: nop    
    0x7fff523bc806 <+22>: nop    
    0x7fff523bc807 <+23>: nop    

Is anyone else facing it too? Any advice on troubleshooting this would be really appreciated!

Upvotes: 0

Views: 1268

Answers (3)

chendu
chendu

Reputation: 829

This is what helped me. Just incase somebody comes here with the same issue.

I had to do expo publish and then when i run react-native run-ios from the folder containing the ios/ things started to work. My expo version is 4.2.1 ; npm version is 7.0.2 ;

Upvotes: 0

Karli Ots
Karli Ots

Reputation: 779

after you run it in xcode, you need to run expo start in project root, because it will search for the development url to download the bundle code, if it does not work, you can run expo start before pod install and keep it running

Upvotes: 1

meowww
meowww

Reputation: 153

If your code is still simple, manually clone to CLI. Because if you use Eject, later there will be quite a lot of errors related to Podfile and Packages. I have been a victim of this. Happy code. ..

Upvotes: 0

Related Questions