ios - React Native 应用程序仅在一部 iPhone 上启动失败,引导失败
问题描述
我们遇到了一种不寻常的情况,即我们的应用程序的临时构建在一个特定用户的 iPhone ( iPhone 12 Pro Max ) 上崩溃。使用相同设备的其他用户没有问题。该设备运行的是iOS 15 Beta(我相信是 8),但其他运行的设备也是如此。
行为是应用程序启动,启动画面短暂显示,然后应用程序消失。该事件没有崩溃日志,但我确实在日志中看到指示bootstrapping
失败的条目。错误消息有点难以理解,所以我不知道该看什么。
这一切都因为它不是一个真正的原生应用程序而变得复杂,因为它是使用 React Native 编写的。所以调试是有问题的。
查看下面的日志(见11:33:43.698190-0400
行),有人对我应该寻找什么有建议吗?在 60 名测试人员中,这是唯一有问题的手机。
default 11:33:43.608231-0400 Spotlight [FBSSystemService][0xe7c9] Sending request to open "com.foo.mobile.thisapp"
default 11:33:43.608625-0400 SpringBoard [FBSystemService][0xe7c9] Received request to open "com.foo.mobile.thisapp" from Spotlight:406.
default 11:33:43.608738-0400 SpringBoard Received trusted open application request for "com.foo.mobile.thisapp" from <FBApplicationProcess: 0x1084c37e0; application<com.apple.Spotlight>:406(v468)>.
default 11:33:43.635600-0400 SpringBoard Executing request: <SBMainWorkspaceTransitionRequest: 0x28344de60; eventLabel: OpenApplication(sceneID:com.foo.mobile.thisapp-default)ForRequester(Spotlight.406); display: Main; source: Spotlight>
default 11:33:43.647737-0400 SpringBoard [FBWorkspaceEvent] Executing: <FBWorkspaceEvent: 0x284665a00; OpenApplication(sceneID:com.foo.mobile.thisapp-default)ForRequester(Spotlight.406)>
default 11:33:43.649306-0400 SpringBoard Asked to bootstrap a new process with identity: application<com.foo.mobile.thisapp>
default 11:33:43.649338-0400 SpringBoard Creating process (sync=true) with identity: application<com.foo.mobile.thisapp>
default 11:33:43.649426-0400 SpringBoard Created <FBWorkspace: 0x283194210; application<com.foo.mobile.thisapp>>
default 11:33:43.649518-0400 SpringBoard Bootstrapping application<com.foo.mobile.thisapp> with intent foreground-interactive
default 11:33:43.650264-0400 SpringBoard [Main] dispatch event:
<SBSceneReadySwitcherModifierEvent: 0x284698320; type: SceneReady; appLayout: <SBAppLayout: 0x281e6c080; primary: com.foo.mobile.thisapp:default; environment: main> {
configuration = full;
environment = main;
layoutItems = {
primary = <SBDisplayItem: 0x2849d13b0> {
type = App;
bundleIdentifier = com.foo.mobile.thisapp;
uniqueIdentifier = sceneID:com.foo.mobile.thisapp-default;
};
}
}>
default 11:33:43.654268-0400 runningboardd Acquiring assertion targeting application<com.foo.mobile.thisapp> from originator [daemon<com.apple.SpringBoard>:67] with description <RBSAssertionDescriptor| "FBApplicationProcess" ID:34-67-63886 target:application<com.foo.mobile.thisapp> attributes:[
<RBSDomainAttribute| domain:"com.apple.frontboard" name:"Bootstrap-Foreground" sourceEnvironment:"(null)">,
<RBSDomainAttribute| domain:"com.apple.frontboard" name:"Visibility" sourceEnvironment:"(null)">
]>
default 11:33:43.654411-0400 runningboardd Assertion 34-67-63886 (target:application<com.foo.mobile.thisapp>) will be created as active
default 11:33:43.654645-0400 runningboardd Executing launch request for application<com.foo.mobile.thisapp> (FBApplicationProcess)
default 11:33:43.654810-0400 runningboardd Creating and launching job for: application<com.foo.mobile.thisapp>
default 11:33:43.654988-0400 runningboardd _mutateContextIfNeeded called for com.foo.mobile.thisapp
default 11:33:43.671674-0400 mediaserverd <<<< FigCaptureDisplayLayoutMonitor >>>> -[FigCaptureDisplayLayoutMonitor _updateCurrentLayout:]: <FBSDisplayLayout: 0x1392c2630; displayIdentity: Main> { bounds = {{0, 0}, {428, 926}}; interfaceOrientation = "portrait (1)"; backlightLevel = 100; elements = { <SBSDisplayLayoutElement: 0x13922f140; com.apple.springboard.spotlight; frame: {{0, 0}, {428, 926}}; level: 0; role: embedded>; <SBSDisplayLayoutElement: 0x139270130; sceneID:com.foo.mobile.thisapp-default; bundleID: com.foo.mobile.thisapp; frame: {{0, 0}, {428, 926}}; level: 1; role: primary>; } timestamp = September 2, 2021 at 11:33:43 AM EDT;}
default 11:33:43.673667-0400 SpringBoard [Main] dispatch event:
<SBTransitionSwitcherModifierEvent: 0x283a3df00; type: MainTransition; transitionID: B611A8E7-B802-4298-8FB7-A9E960141B96; phase: Prepare; animated: YES; fromAppLayout: 0x0; toAppLayout: <SBAppLayout: 0x281e6c080; primary: com.foo.mobile.thisapp:default; environment: main>; fromEnvironmentMode: home-screen; toEnvironmentMode: application; pendingTermination: {(
)}; isSpotlightTransition: YES; dosidoTransitionDirection: 0>
default 11:33:43.697614-0400 runningboardd Invalidating assertion 34-67-63886 (target:application<com.foo.mobile.thisapp>) from originator [daemon<com.apple.SpringBoard>:67]
error 11:33:43.698190-0400 SpringBoard Bootstrapping failed for <FBApplicationProcess: 0x1084e9b50; application<com.foo.mobile.thisapp>:<invalid>> with error: <NSError: 0x28498d350; domain: RBSRequestErrorDomain; code: 5; reason: "Launch failed."> {
NSUnderlyingError = <NSError: 0x28498e2e0; domain: NSPOSIXErrorDomain; code: 85>;
}
default 11:33:43.698318-0400 SpringBoard [application<com.foo.mobile.thisapp>:-1] Now flagged as pending exit for reason: Bootstrap failed
default 11:33:43.698349-0400 SpringBoard [application<com.foo.mobile.thisapp>:-1] Connection to remote process was not established.
解决方案
有趣的是,这似乎是使用 Fastlane 编译然后使用 Fastlane 上传工件的一些副作用。如果我手动存档项目并将其上传到 Firebase,则该应用程序在相关 iPhone 上运行良好。
推荐阅读
- flutter - 如何返回未来
作为小部件 - javascript - 在react中访问和更改reducer内的全局状态属性
- c# - 从 CosmosDB 获取最大数量的有效方法
- qt - 向进度条添加负值
- python - Authlib 与 Azure AD - “iss”声明的声明验证错误
- r - 使用 data.table 比较两个数据集
- php - 在下拉列表中显示 WooCommerce 变量订阅及其变体
- linux - 如何在 debain 64 位系统的 Linux 上安装 wine?
- javascript - 如何将变量从javascript传递到rails中查看?
- twilio - 显示来自 Twilio REST API 的 date_created 值