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.

Upgraded to Xcode 10 and now the app is stuck on splash screen

See original GitHub issue

Environment

React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
      Memory: 93.31 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.9.0 - ~/.nvm/versions/node/v10.9.0/bin/node
      npm: 6.4.1 - ~/.nvm/versions/node/v10.9.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
      Android SDK:
        Build Tools: 23.0.1, 25.0.0, 26.0.2, 27.0.3
        API Levels: 23, 25, 26, 27
    IDEs:
      Android Studio: 3.0 AI-171.4443003
      Xcode: 10.0/10A255 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.3.1 => 16.5.0
      react-native: ^0.55.0 => 0.57.1
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7

Description

We have a working app in production. I upgraded Xcode locally (from 9.4.1 to 10) and the build broke.

Expected:

Everything to work as before

Result:

The app is stuck on the launch screen and I’m not getting any errors in the build log when I build using node. I have been trying to make it work for a few days now but nothing seems to fix it.

What I tried:

  • Delete the local project and clone a fresh copy from github.
  • Clean all cache/build/node_modules etc.
  • Clean Xcode and simulator cache etc.

Didn’t work.

  • Revert back to Xcode 9.4.1.

This worked for a while but stopped working after I deleted the app from the simulator and run the build command again.

  • Upgrade again to Xcode 10.
  • Opting out of the new Xcode build system.

Still nothing

Every solution combination doesn’t seem to work and i’m lost. I can’t provide a reproducible demo since this is a private app but I can paste relevant snippets if needed.

General info

I’m using CocoaPods with the following Podfile:

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'Fundbox' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for Fundbox
  pod 'Fabric'
  pod 'Crashlytics'
  pod 'Mixpanel'
  pod 'Stripe', '~> 11.2.0'
  pod 'ReactNativeFabric', :path => '../node_modules/react-native-fabric'
  pod 'React', :path => '../node_modules/react-native'
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
  pod 'react-native-appsflyer', :path => '../node_modules/react-native-appsflyer'
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == "React"
      target.remove_from_project
    end
  end
end

When building the app from the command line using this line:

react-native run-ios --simulator="iPhone 8"

I get:

** BUILD SUCCEEDED **

When I build using Xcode I get the following output with errors:

2018-09-27 11:52:27.153996+0300 Fundbox[11467:771327] libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.
2018-09-27 11:52:27.299419+0300 Fundbox[11467:771327] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/eyal/Library/Developer/CoreSimulator/Devices/12F81E70-8ADD-41F2-A446-C0EFAD482BDA/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2018-09-27 11:52:27.299813+0300 Fundbox[11467:771327] [MC] Reading from private effective user settings.
2018-09-27 11:52:27.308946+0300 Fundbox[11467:771327] [Crashlytics] Version 3.10.7 (130)
2018-09-27 11:52:27.322410+0300 Fundbox[11467:771327] 
[CodePush] Loading JS bundle from file:///Users/eyal/Library/Developer/CoreSimulator/Devices/12F81E70-8ADD-41F2-A446-C0EFAD482BDA/data/Containers/Bundle/Application/7210970C-3C48-486C-A826-B2A373C148E9/Fundbox.app/main.jsbundle
2018-09-27 11:52:27.324833+0300 Fundbox[11467:771327] Initializing <RCTCxxBridge: 0x60000107c3c0> (parent: <RCTBridge: 0x6000004764c0>, executor: (null))
2018-09-27 11:52:27.328684+0300 Fundbox[11467:771327] Module RCTImageLoader requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
2018-09-27 11:52:27.332745+0300 Fundbox[11467:771327] Running application Fundbox ({
    initialProps =     {
    };
    rootTag = 1;
})
2018-09-27 11:52:27.499833+0300 Fundbox[11467:771424] Failed to create remote object proxy: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}
2018-09-27 11:52:27.499980+0300 Fundbox[11467:771411] Failed to ping server after delegate was set
2018-09-27 11:52:27.500087+0300 Fundbox[11467:771327] Failed to create synchronous remote object proxy: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}
2018-09-27 11:52:27.500229+0300 Fundbox[11467:771327] [NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}
2018-09-27 11:52:27.500609+0300 Fundbox[11467:771327] Failed to create synchronous remote object proxy: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}
2018-09-27 11:52:27.500723+0300 Fundbox[11467:771327] [NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}
2018-09-27 11:52:27.501063+0300 Fundbox[11467:771327] Failed to create synchronous remote object proxy: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}
2018-09-27 11:52:27.501152+0300 Fundbox[11467:771327] [NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}
2018-09-27 11:52:27.962589+0300 Fundbox[11467:771418] undefined is not a function (near '...window.addEventListener...')
2018-09-27 11:52:27.964839+0300 Fundbox[11467:771413] Unhandled JS Exception: undefined is not a function (near '...window.addEventListener...')
2018-09-27 11:52:27.965640+0300 Fundbox[11467:771418] Module AppRegistry is not a registered callable module (calling runApplication)
2018-09-27 11:52:27.972938+0300 Fundbox[11467:771413] *** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: undefined is not a function (near '...window.addEventListener...')', reason: 'Unhandled JS Exception: undefined is not a function (near '...window.addEve..., stack:
<unknown>@1101:1959
d@2:755
<unknown>@1100:49
d@2:755
<unknown>@1099:65
d@2:755
<unknown>@1098:256
d@2:755
<unknown>@1097:93
<unknown>@1097:233
d@2:755
<unknown>@1096:154
d@2:755
<unknown>@1095:109
d@2:755
<unknown>@1094:81
d@2:755
<unknown>@1093:167
d@2:755
<unknown>@319:314
d@2:755
<unknown>@12:152
d@2:755
n@2:326
global code@1644:8
'
*** First throw call stack:
(
	0   CoreFoundation                      0x000000011516329b __exceptionPreprocess + 331
	1   libobjc.A.dylib                     0x00000001133d8735 objc_exception_throw + 48
	2   Fundbox                             0x000000010f3575a9 RCTFormatError + 0
	3   Fundbox                             0x000000010f354303 -[RCTExceptionsManager reportFatalException:stack:exceptionId:] + 507
	4   CoreFoundation                      0x000000011516a11c __invoking___ + 140
	5   CoreFoundation                      0x00000001151675b5 -[NSInvocation invoke] + 325
	6   CoreFoundation                      0x0000000115167a06 -[NSInvocation invokeWithTarget:] + 54
	7   Fundbox                             0x000000010f36aaee -[RCTModuleMethod invokeWithBridge:module:arguments:] + 612
	8   Fundbox                             0x000000010f3b073f _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 255
	9   Fundbox                             0x000000010f3b04bd ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 78
	10  libdispatch.dylib                   0x00000001163135d1 _dispatch_call_block_and_release + 12
	11  libdispatch.dylib                   0x000000011631463e _dispatch_client_callout + 8
	12  libdispatch.dylib                   0x000000011631bb47 _dispatch_lane_serial_drain + 791
	13  libdispatch.dylib                   0x000000011631c7c0 _dispatch_lane_invoke + 428
	14  libdispatch.dylib                   0x00000001163268b8 _dispatch_workloop_worker_thread + 733
	15  libsystem_pthread.dylib             0x00000001166f1fd2 _pthread_wqthread + 980
	16  libsystem_pthread.dylib             0x00000001166f1be9 start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

Reproducible Demo

None

Any help will be much appreciated! Thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
eyalellacommented, Sep 27, 2018

FYI, for me changing

import { observer, inject } from "mobx-react";

to

import { observer, inject } from "mobx-react/native";

Solved the react-dom issue

2reactions
jdschwartz87commented, Sep 27, 2018

Hi @eyalella My app also crashes on Launch Screen with the same errors/output. Any luck on a solution?! Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Built App in Xcode 10, now stuck on LaunchScreen after ...
In the debug area, it says that the first View Controller in my Main.Storyboard has loaded (prints out all the print statements I...
Read more >
the app stuck in launch screen wit… | Apple Developer Forums
after i pack my app into ipad mini4, i occur to a problem.(my test device is xcode 10.0 and ios12.0(ipad mini4). the app...
Read more >
Fix app stuck on the splash screen on iOS - MacVangelist
Steps to fix app stuck on the splash screen on iOS ; Step 5 – Check for updates. On your iOS device, go...
Read more >
iOS App shows black screen after succesful install on device ...
You probably disabled your Splash screen that is why black screen appears. Go in your LaunchScreen.storyboard file, there you will find a Screen...
Read more >
When your iOS device or simulator stuck on a splash screen.
1. Quit Xcode.2. Open the Mac desktop application Terminal.app.3. Execute command "rm -rf ~/Library/Developer ...
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