iosflutterxcodecrashtestflight

Flutter app crash after deploying on TestFlight


I have tested my app on various devices (iOS and Android) and have never encountered this issue before. However, yesterday when I deployed my app on TestFlight, it appeared to crash at the splash screen.

Here are the logs:

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Codes: 0x0000000000000001, 0x0000000000000000
VM Region Info: 0 is not in any region.  Bytes before following region: 4307746816
      REGION TYPE                 START - END      [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                   100c30000-100c40000 [   64K] r-x/r-x SM=COW  ...er.app/Runner
Termination Reason: SIGNAL 11 Segmentation fault: 11
Terminating Process: exc handler [637]

Triggered by Thread:  0


Thread 0 name:
Thread 0 Crashed:
0   libswiftCore.dylib              0x000000019e05a330 swift_getObjectType + 40 (SwiftObject.mm:131)
1   connectivity_plus               0x000000010180eba4 static SwiftConnectivityPlusPlugin.register(with:) + 116 (SwiftConnectivityPlusPlugin.swift:19)
2   connectivity_plus               0x000000010180ef1c @objc static SwiftConnectivityPlusPlugin.register(with:) + 56 (<compiler-generated>:0)
3   connectivity_plus               0x000000010180c048 +[ConnectivityPlusPlugin registerWithRegistrar:] + 72 (ConnectivityPlusPlugin.m:13)
4   Runner                          0x0000000100c380b8 0x100c30000 + 32952
5   Runner                          0x0000000100c3f588 0x100c30000 + 62856
6   Runner                          0x0000000100c403c0 0x100c30000 + 66496
7   UIKitCore                       0x00000001a6c9e3b8 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 320 (UIApplication.m:2401)
8   UIKitCore                       0x00000001a6c9d520 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 2856 (UIApplication.m:2835)
9   UIKitCore                       0x00000001a6c9c504 -[UIApplication _runWithMainScene:transitionContext:completion:] + 856 (UIApplication.m:4679)
10  UIKitCore                       0x00000001a6c9c150 -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 132 (_UISceneLifecycleMultiplexer.m:450)
11  UIKitCore                       0x00000001a6c18c78 _UIScenePerformActionsWithLifecycleActionMask + 112 (_UISceneLifecycleState.m:109)
12  UIKitCore                       0x00000001a6ca014c __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 216 (_UISceneLifecycleMultiplexer.m:566)
13  UIKitCore                       0x00000001a6bc7be0 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 220 (_UISceneLifecycleMultiplexer.m:515)
14  UIKitCore                       0x00000001a6bc6658 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 608 (_UISceneLifecycleMultiplexer.m:565)
15  UIKitCore                       0x00000001a6bc5fc0 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 248 (_UISceneLifecycleMultiplexer.m:468)
16  UIKitCore                       0x00000001a6bc5e90 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block... + 148 (_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction.m:73)
17  UIKitCore                       0x00000001a6bc5d98 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:fromCurrentState:actions:completion:] + 736 (BSAnimationSettings+UIKit.m:54)
18  UIKitCore                       0x00000001a6bc5620 _UISceneSettingsDiffActionPerformChangesWithTransitionContextAndCompletion + 224 (_UISceneSettingsDiffAction.m:27)
19  UIKitCore                       0x00000001a6bc52d0 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 316 (_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction.m:58)
20  UIKitCore                       0x00000001a6f490a8 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.225 + 612 (UIScene.m:2053)
21  UIKitCore                       0x00000001a6bc4454 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 216 (UIScene.m:1722)
22  UIKitCore                       0x00000001a6bc42c4 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 244 (UIScene.m:2012)
23  UIKitCore                       0x00000001a6cdca48 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 508 (UIApplication.m:4124)
24  UIKitCore                       0x00000001a6cdc7e0 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 288 (UIApplicationSceneClientAgent.m:47)
25  FrontBoardServices              0x00000001bccf56d4 -[FBSScene _callOutQueue_didCreateWithTransitionContext:completion:] + 324 (FBSScene.m:549)
26  FrontBoardServices              0x00000001bccf5570 __92-[FBSWorkspaceScenesClient createSceneWithIdentity:parameters:transitionContext:completion:]_block_invoke.108 + 280 (FBSWorkspaceScenesClient.m:480)
27  FrontBoardServices              0x00000001bccf419c -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 168 (FBSWorkspace.m:411)
28  FrontBoardServices              0x00000001bccfff8c __92-[FBSWorkspaceScenesClient createSceneWithIdentity:parameters:transitionContext:completion:]_block_invoke + 352 (FBSWorkspaceScenesClient.m:468)
29  libdispatch.dylib               0x00000001ac855300 _dispatch_client_callout + 20 (object.m:561)
30  libdispatch.dylib               0x00000001ac858d48 _dispatch_block_invoke_direct + 284 (queue.c:496)
31  FrontBoardServices              0x00000001bccf0520 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 52 (FBSSerialQueue.m:285)
32  FrontBoardServices              0x00000001bccf04a0 -[FBSMainRunLoopSerialQueue _targetQueue_performNextIfPossible] + 240 (FBSSerialQueue.m:309)
33  FrontBoardServices              0x00000001bccf0378 -[FBSMainRunLoopSerialQueue _performNextFromRunLoopSource] + 28 (FBSSerialQueue.m:322)
34  CoreFoundation                  0x00000001a489912c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1957)
35  CoreFoundation                  0x00000001a48983a8 __CFRunLoopDoSource0 + 176 (CFRunLoop.c:2001)
36  CoreFoundation                  0x00000001a4896b5c __CFRunLoopDoSources0 + 244 (CFRunLoop.c:2038)
37  CoreFoundation                  0x00000001a4895898 __CFRunLoopRun + 828 (CFRunLoop.c:2955)
38  CoreFoundation                  0x00000001a4895478 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
39  GraphicsServices                0x00000001e7dee4f8 GSEventRunModal + 164 (GSEvent.c:2196)
40  UIKitCore                       0x00000001a6cb962c -[UIApplication _run] + 888 (UIApplication.m:3685)
41  UIKitCore                       0x00000001a6cb8c68 UIApplicationMain + 340 (UIApplication.m:5270)
42  Runner                          0x0000000100c4131c 0x100c30000 + 70428
43  dyld                            0x00000001c75badcc start + 2240 (dyldMain.cpp:1269)

My flutter pub:

environment:
  sdk: ">=3.0.0 <4.0.0"

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  intl: ^0.18.0
  bloc: ^8.1.2
  flutter_bloc: ^8.1.3
  flutter_local_notifications: ^16.3.0
  dotted_border: ^2.1.0

  flutter_hooks: ^0.20.4

  json_annotation: ^4.8.1

  equatable: ^2.0.5

  vibration: ^1.8.4

  get_it: ^7.6.7

  loggy: ^2.0.3

  connectivity_plus: ^5.0.2

  flutter_svg: ^2.0.9

  reorderables: ^0.6.0

  chopper: ^7.1.0+1

  flutter_spinkit: ^5.2.0

  cupertino_icons: ^1.0.6

  xml: ^6.5.0
  url_launcher: ^6.2.3

  retrofit: ^4.0.3
  dio: ^5.4.0
  http: ^1.2.0


  flutter_map: ^6.1.0
  latlong2: ^0.9.0

  flutter_map_marker_cluster: ^1.3.4
  flutter_map_location_marker: ^8.0.4

  permission_handler: ^11.2.0

  geolocator: ^10.1.0
  flutter_map_cache : ^1.3.1
  dio_cache_interceptor_file_store : ^1.2.3

  stream_transform: ^2.1.0
  background_fetch: ^1.2.2

  marquee: ^2.2.3

  shared_preferences: ^2.2.2

  snapping_sheet: ^3.1.0

  fluttertoast: ^8.2.4

  uuid: ^4.3.3
  package_info_plus: ^5.0.1
  firebase_core: ^2.24.2
  firebase_messaging: ^14.7.10
  device_info_plus: ^9.1.1
  flutter_html: ^3.0.0-beta.2

  flutter_open_app_settings: ^0.1.4

  webview_flutter: ^4.4.4
  objectbox: ^2.4.0
  objectbox_flutter_libs: ^2.4.0

  screen_brightness: ^0.2.2+1

  auto_size_text: ^3.0.0
  flutter_map_tile_caching: ^9.0.0-dev.5

  flutter_native_splash: ^2.3.9

dev_dependencies:
  flutter_test:
    sdk: flutter
  bloc_test: ^9.1.5

  flutter_inappwebview: ^6.0.0

  pigeon: ^16.0.3

  build_runner: ^2.4.8
  json_serializable: ^6.7.1
  retrofit_generator: ^8.0.6
  objectbox_generator: ^2.4.0
  flutter_gen_runner: ^5.4.0

  mockito: ^5.4.4

  open_file: ^3.3.2

  flutter_lints: ^3.0.1

  swagger_dart_code_generator: ^2.14.2
  chopper_generator: ^7.1.0
  dependency_validator: ^3.0.0

Similar to others, the first time it crashed, I fixed the package in question. However, upon the next deployment, it crashed at the subsequent package, which utilizes a .swift source file rather than just .m and .h files. It could potentially be a Firebase issue, although my configuration appears to be correct.


Solution

  • Thank you for your feedback! I attempted to deploy the app without Firebase and encountered the same problem. It turned out that the issue stemmed from deploying the app from Xcode instead of using the Flutter shell command. After I pushed the IPA to TestFlight, it worked! I hope this information proves helpful to others !