sentry-capacitor icon indicating copy to clipboard operation
sentry-capacitor copied to clipboard

UI API called on a background thread

Open arcdigital opened this issue 2 years ago • 1 comments

Environment

Which SDK and version? Capacitor 0.9.0 Vue 7.8.1 Tracing 7.8.1

Steps to Reproduce

Create a Capacitor 4 + Vue 3 project and include

    "@sentry/capacitor": "0.9.0",
    "@sentry/integrations": "7.8.1",
    "@sentry/tracing": "7.8.1",
    "@sentry/vue": "7.8.1",

Enable tracing with tracesSampleRate: 1.0,

Actual Result

The console shows a ton of Main Thread Checker: UI API called on a background thread warnings. They don't appear if the SDK is initialized, but tracing isn't enabled.

Main Thread Checker: UI API called on a background thread: -[UIApplication delegate]
PID: 89405, TID: 6154204, Thread name: (none), Queue name: bridge, QoS: 0
Backtrace:
4   Sentry                              0x0000000101e9ce18 -[SentryUIViewControllerSwizzling swizzleRootViewControllerFromUIApplication:] + 56
5   Sentry                              0x0000000101e9c3bc -[SentryUIViewControllerSwizzling start] + 80
6   Sentry                              0x0000000101e7fd70 -[SentryPerformanceTrackingIntegration installWithOptions:] + 516
7   Sentry                              0x0000000101e88ed8 +[SentrySDK installIntegrations] + 892
8   Sentry                              0x0000000101e875dc +[SentrySDK startWithOptionsObject:] + 416
9   SentryCapacitor                     0x000000010198a86c $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCF + 636
10  SentryCapacitor                     0x000000010198b17c $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCFTo + 52
11  Capacitor                           0x00000001011e0b38 $s9Capacitor0A6BridgeC12handleJSCall4callyAA0D0V_tFyycfU_ + 816
12  Capacitor                           0x00000001011d639c $sIeg_IeyB_TR + 52
13  libdispatch.dylib                   0x0000000101fb033c _dispatch_call_block_and_release + 24
14  libdispatch.dylib                   0x0000000101fb1b94 _dispatch_client_callout + 16
15  libdispatch.dylib                   0x0000000101fb8cc4 _dispatch_lane_serial_drain + 764
16  libdispatch.dylib                   0x0000000101fb9978 _dispatch_lane_invoke + 436
17  libdispatch.dylib                   0x0000000101fc5a00 _dispatch_workloop_worker_thread + 812
18  libsystem_pthread.dylib             0x00000001cc0adb40 _pthread_wqthread + 284
19  libsystem_pthread.dylib             0x00000001cc0ac904 start_wqthread + 8
2022-08-08 12:18:11.445545-0700 AppName[89405:6154204] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication delegate]
PID: 89405, TID: 6154204, Thread name: (none), Queue name: bridge, QoS: 0
Backtrace:
4   Sentry                              0x0000000101e9ce18 -[SentryUIViewControllerSwizzling swizzleRootViewControllerFromUIApplication:] + 56
5   Sentry                              0x0000000101e9c3bc -[SentryUIViewControllerSwizzling start] + 80
6   Sentry                              0x0000000101e7fd70 -[SentryPerformanceTrackingIntegration installWithOptions:] + 516
7   Sentry                              0x0000000101e88ed8 +[SentrySDK installIntegrations] + 892
8   Sentry                              0x0000000101e875dc +[SentrySDK startWithOptionsObject:] + 416
9   SentryCapacitor                     0x000000010198a86c $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCF + 636
10  SentryCapacitor                     0x000000010198b17c $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCFTo + 52
11  Capacitor                           0x00000001011e0b38 $s9Capacitor0A6BridgeC12handleJSCall4callyAA0D0V_tFyycfU_ + 816
12  Capacitor                           0x00000001011d639c $sIeg_IeyB_TR + 52
13  libdispatch.dylib                   0x0000000101fb033c _dispatch_call_block_and_release + 24
14  libdispatch.dylib                   0x0000000101fb1b94 _dispatch_client_callout + 16
15  libdispatch.dylib                   0x0000000101fb8cc4 _dispatch_lane_serial_drain + 764
16  libdispatch.dylib                   0x0000000101fb9978 _dispatch_lane_invoke + 436
17  libdispatch.dylib                   0x0000000101fc5a00 _dispatch_workloop_worker_thread + 812
18  libsystem_pthread.dylib             0x00000001cc0adb40 _pthread_wqthread + 284
19  libsystem_pthread.dylib             0x00000001cc0ac904 start_wqthread + 8
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIWindow rootViewController]
PID: 89405, TID: 6154204, Thread name: (none), Queue name: bridge, QoS: 0
Backtrace:
4   Sentry                              0x0000000101e9d018 -[SentryUIViewControllerSwizzling swizzleRootViewControllerFromUIApplication:] + 568
5   Sentry                              0x0000000101e9c3bc -[SentryUIViewControllerSwizzling start] + 80
6   Sentry                              0x0000000101e7fd70 -[SentryPerformanceTrackingIntegration installWithOptions:] + 516
7   Sentry                              0x0000000101e88ed8 +[SentrySDK installIntegrations] + 892
8   Sentry                              0x0000000101e875dc +[SentrySDK startWithOptionsObject:] + 416
9   SentryCapacitor                     0x000000010198a86c $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCF + 636
10  SentryCapacitor                     0x000000010198b17c $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCFTo + 52
11  Capacitor                           0x00000001011e0b38 $s9Capacitor0A6BridgeC12handleJSCall4callyAA0D0V_tFyycfU_ + 816
12  Capacitor                           0x00000001011d639c $sIeg_IeyB_TR + 52
13  libdispatch.dylib                   0x0000000101fb033c _dispatch_call_block_and_release + 24
14  libdispatch.dylib                   0x0000000101fb1b94 _dispatch_client_callout + 16
15  libdispatch.dylib                   0x0000000101fb8cc4 _dispatch_lane_serial_drain + 764
16  libdispatch.dylib                   0x0000000101fb9978 _dispatch_lane_invoke + 436
17  libdispatch.dylib                   0x0000000101fc5a00 _dispatch_workloop_worker_thread + 812
18  libsystem_pthread.dylib             0x00000001cc0adb40 _pthread_wqthread + 284
19  libsystem_pthread.dylib             0x00000001cc0ac904 start_wqthread + 8
2022-08-08 12:18:11.553943-0700 AppName[89405:6154204] [reports] Main Thread Checker: UI API called on a background thread: -[UIWindow rootViewController]
PID: 89405, TID: 6154204, Thread name: (none), Queue name: bridge, QoS: 0
Backtrace:
4   Sentry                              0x0000000101e9d018 -[SentryUIViewControllerSwizzling swizzleRootViewControllerFromUIApplication:] + 568
5   Sentry                              0x0000000101e9c3bc -[SentryUIViewControllerSwizzling start] + 80
6   Sentry                              0x0000000101e7fd70 -[SentryPerformanceTrackingIntegration installWithOptions:] + 516
7   Sentry                              0x0000000101e88ed8 +[SentrySDK installIntegrations] + 892
8   Sentry                              0x0000000101e875dc +[SentrySDK startWithOptionsObject:] + 416
9   SentryCapacitor                     0x000000010198a86c $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCF + 636
10  SentryCapacitor                     0x000000010198b17c $s15SentryCapacitorAAC13i⚡️  To Native ->  nitNativeSdkyySo13CAPPluginCallCFTo + 52
11  Capacitor                           0x00000001011e0b38 $s9Capacitor0A6BridgeC12handleJSCall4callyAA0D0V_tFyycfU_ + 816
12  Capacitor                           0x00000001011d639c $sIeg_IeyB_TR + 52
13  libdispatch.dylib                   0x0000000101fb033c _dispatch_call_block_and_release + 24
14  libdispatch.dylib                   0x0000000101fb1b94 _dispatch_client_callout + 16
15  libdispatch.dylib                   0x0000000101fb8cc4 _dispatch_lane_serial_drain + 764
16  libdispatch.dylib                   0x0000000101fb9978 _dispatch_lane_invoke + 436
17  libdispatch.dylib                   0x0000000101fc5a00 _dispatch_workloop_worker_thread + 812
18  libsystem_pthread.dylib             0x00000001cc0adb40 _pthread_wqthread + 284
19  libsystem_pthread.dylib             0x00000001cc0ac904 start_wqthread + 8
SentryCapacitor addBreadcrumb 77663865
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIViewController childViewControllers]
PID: 89405, TID: 6154204, Thread name: (none), Queue name: bridge, QoS: 0
Backtrace:
4   Sentry                              0x0000000101ea0470 -[UIViewController(Sentry) descendantViewControllers] + 88
5   Sentry                              0x0000000101e9d14c -[SentryUIViewControllerSwizzling swizzleRootViewControllerAndDescendant:] + 76
6   Sentry                              0x0000000101e9d0b4 -[SentryUIViewControllerSwizzling swizzleRootViewControllerFromUIApplication:] + 724
7   Sentry                              0x0000000101e9c3bc -[SentryUIViewControllerSwizzling start] + 80
8   Sentry                              0x0000000101e7fd70 -[SentryPerformanceTrackingIntegration installWithOptions:] + 516
9   Sentry                              0x0000000101e88ed8 +[SentrySDK installIntegrations] + 892
10  Sentry                              0x0000000101e875dc +[SentrySDK startWithOptionsObject:] + 416
11  SentryCapacitor                     0x000000010198a86c $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCF + 636
12  SentryCapacitor                     0x000000010198b17c $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCFTo + 52
13  Capacitor                           0x00000001011e0b38 $s9Capacitor0A6BridgeC12handleJSCall4callyAA0D0V_tFyycfU_ + 816
14  Capacitor                           0x00000001011d639c $sIeg_IeyB_TR + 52
15  libdispatch.dylib                   0x0000000101fb033c _dispatch_call_block_and_release + 24
16  libdispatch.dylib                   0x0000000101fb1b94 _dispatch_client_callout + 16
17  libdispatch.dylib                   0x0000000101fb8cc4 _dispatch_lane_serial_drain + 764
18  libdispatch.dylib                   0x0000000101fb9978 _dispatch_lane_invoke + 436
19  libdispatch.dylib                   0x0000000101fc5a00 _dispatch_workloop_worker_thread + 812
20  libsystem_pthread.dylib             0x00000001cc0adb40 _pthread_wqthread + 284
21  libsystem_pthread.dylib             0x00000001cc0ac904 start_wqthread + 8
2022-08-08 12:18:11.576602-0700 AppName[89405:6154204] [reports] Main Thread Checker: UI API called on a background thread: -[UIViewController childViewControllers]
PID: 89405, TID: 6154204, Thread name: (none), Queue name: bridge, QoS: 0
Backtrace:
4   Sentry                              0x0000000101ea0470 -[UIViewController(Sentry) descendantViewControllers] + 88
5   Sentry                              0x0000000101e9d14c -[SentryUIViewControllerSwizzling swizzleRootViewControllerAndDescendant:] + 76
6   Sentry                              0x0000000101e9d0b4 -[SentryUIViewControllerSwizzling swizzleRootViewControllerFromUIApplication:] + 724
7   Sentry                              0x0000000101e9c3bc -[SentryUIViewControllerSwizzling start] + 80
8   Sentry                              0x0000000101e7fd70 -[SentryPerformanceTrackingIntegration installWithOptions:] + 516
9   Sentry                              0x0000000101e88ed8 +[SentrySDK installIntegrations] + 892
10  Sentry                              0x0000000101e875dc +[SentrySDK startWithOptionsObject:] + 416
11  SentryCapacitor                     0x000000010198a86c $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCF + 636
12  SentryCapacitor                     0x000000010198b17c $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCFTo + 52
13  Capacitor                           0x00000001011e0b38 $s9Capacitor0A6BridgeC12handleJSCall4callyAA0D0V_tFyycfU_ + 816
14  Capacitor                           0x00000001011d639c $sIeg_IeyB_TR + 52
15  libdispatch.dylib                   0x0000000101fb033c _dispatch_call_block_and_release + 24
16  libdispatch.dylib                   0x0000000101fb1b94 _dispatch_client_callout + 16
17  libdispatch.dylib                   0x0000000101fb8cc4 _dispatch_lane_serial_drain + 764
18  libdispatch.dylib                   0x0000000101fb9978 _dispatch_lane_invoke + 436
19  libdispatch.dylib                   0x0000000101fc5a00 _dispatch_workloop_worker_thread + 812
20  libsystem_pthread.dylib             0x00000001cc0adb40 _pthread_wqthread + 284
21  libsystem_pthread.dylib             0x00000001cc0ac904 start_wqthread + 8

arcdigital avatar Aug 08 '22 19:08 arcdigital

Those events didn't happen on Capacitor 3?

lucas-zimerman avatar Aug 12 '22 09:08 lucas-zimerman

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

github-actions[bot] avatar May 30 '23 00:05 github-actions[bot]

This is still happening on:

Capacitor 5.2.3 sentry/capacitor 0.12.2

Most likely what's happening is that users of https://github.com/getsentry/sentry-cocoa normally initialize that on applicationDidFinishLaunch, as per your example in the documentation, which runs on the main thread, so the iOS code is made with that assumption.

Meanwhile sentry-capacitor is just calling those methods from wherever thread they are coming from and in this specific case, callbacks from Capacitor usually happen on a background thread.

So either https://github.com/getsentry/sentry-cocoa makes sure to access the UI only from the main thread, removing the above mentioned assumption, or sentry-capacitor has to wrap the plugin calls in DispatchQueue.main.async.

=================================================================
Main Thread Checker: UI API called on a background thread: -[UIApplication connectedScenes]
PID: 599, TID: 38098, Thread name: (none), Queue name: bridge, QoS: 0
Backtrace:
4   Sentry                              0x0000000105f188b4 -[SentryUIApplication getApplicationConnectedScenes:] + 96
5   Sentry                              0x0000000105f189bc -[SentryUIApplication windows] + 148
6   Sentry                              0x0000000105e745f0 +[SentryCrashIntegration enrichScope:crashWrapper:] + 1632
7   Sentry                              0x0000000105e73df8 __40-[SentryCrashIntegration configureScope]_block_invoke + 120
8   Sentry                              0x0000000105eba8a8 -[SentryHub configureScope:] + 136
9   Sentry                              0x0000000105e73d14 -[SentryCrashIntegration configureScope] + 144
10  Sentry                              0x0000000105e7382c -[SentryCrashIntegration installWithOptions:] + 488
11  Sentry                              0x0000000105ef513c +[SentrySDK installIntegrations] + 1192
12  Sentry                              0x0000000105ef376c +[SentrySDK startWithOptions:] + 792
13  SentryCapacitor                     0x00000001059fc230 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCF + 1044
14  SentryCapacitor                     0x00000001059fcdc0 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCFTo + 52
15  Capacitor                           0x0000000105815528 $s9Capacitor0A6BridgeC12handleJSCall4callyAA0D0V_tFyycfU0_ + 856
16  Capacitor                           0x00000001058099d0 $sIeg_IeyB_TR + 48
17  libdispatch.dylib                   0x0000000105cac520 _dispatch_call_block_and_release + 32
18  libdispatch.dylib                   0x0000000105cae038 _dispatch_client_callout + 20
19  libdispatch.dylib                   0x0000000105cb60b0 _dispatch_lane_serial_drain + 984
20  libdispatch.dylib                   0x0000000105cb6df4 _dispatch_lane_invoke + 412
21  libdispatch.dylib                   0x0000000105cc3c74 _dispatch_workloop_worker_thread + 736
22  libsystem_pthread.dylib             0x00000001fc4c6ddc _pthread_wqthread + 288
23  libsystem_pthread.dylib             0x00000001fc4c6b7c start_wqthread + 8
2023-08-15 11:30:45.944410+0200 App[599:38098] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication connectedScenes]
PID: 599, TID: 38098, Thread name: (none), Queue name: bridge, QoS: 0
Backtrace:
4   Sentry                              0x0000000105f188b4 -[SentryUIApplication getApplicationConnectedScenes:] + 96
5   Sentry                              0x0000000105f189bc -[SentryUIApplication windows] + 148
6   Sentry                              0x0000000105e745f0 +[SentryCrashIntegration enrichScope:crashWrapper:] + 1632
7   Sentry                              0x0000000105e73df8 __40-[SentryCrashIntegration configureScope]_block_invoke + 120
8   Sentry                              0x0000000105eba8a8 -[SentryHub configureScope:] + 136
9   Sentry                              0x0000000105e73d14 -[SentryCrashIntegration configureScope] + 144
10  Sentry                              0x0000000105e7382c -[SentryCrashIntegration installWithOptions:] + 488
11  Sentry                              0x0000000105ef513c +[SentrySDK installIntegrations] + 1192
12  Sentry                              0x0000000105ef376c +[SentrySDK startWithOptions:] + 792
13  SentryCapacitor                     0x00000001059fc230 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCF + 1044
14  SentryCapacitor                     0x00000001059fcdc0 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCFTo + 52
15  Capacitor                           0x0000000105815528 $s9Capacitor0A6BridgeC12handleJSCall4callyAA0D0V_tFyycfU0_ + 856
16  Capacitor                           0x00000001058099d0 $sIeg_IeyB_TR + 48
17  libdispatch.dylib                   0x0000000105cac520 _dispatch_call_block_and_release + 32
18  libdispatch.dylib                   0x0000000105cae038 _dispatch_client_callout + 20
19  libdispatch.dylib                   0x0000000105cb60b0 _dispatch_lane_serial_drain + 984
20  libdispatch.dylib                   0x0000000105cb6df4 _dispatch_lane_invoke + 412
21  libdispatch.dylib                   0x0000000105cc3c74 _dispatch_workloop_worker_thread + 736
22  libsystem_pthread.dylib             0x00000001fc4c6ddc _pthread_wqthread + 288
23  libsystem_pthread.dylib             0x00000001fc4c6b7c start_wqthread + 8
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIScene activationState]
PID: 599, TID: 38098, Thread name: (none), Queue name: bridge, QoS: 0
Backtrace:
4   Sentry                              0x0000000105f18a8c -[SentryUIApplication windows] + 356
5   Sentry                              0x0000000105e745f0 +[SentryCrashIntegration enrichScope:crashWrapper:] + 1632
6   Sentry                              0x0000000105e73df8 __40-[SentryCrashIntegration configureScope]_block_invoke + 120
7   Sentry                              0x0000000105eba8a8 -[SentryHub configureScope:] + 136
8   Sentry                              0x0000000105e73d14 -[SentryCrashIntegration configureScope] + 144
9   Sentry                              0x0000000105e7382c -[SentryCrashIntegration installWithOptions:] + 488
10  Sentry                              0x0000000105ef513c +[SentrySDK installIntegrations] + 1192
11  Sentry                              0x0000000105ef376c +[SentrySDK startWithOptions:] + 792
12  SentryCapacitor                     0x00000001059fc230 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCF + 1044
13  SentryCapacitor                     0x00000001059fcdc0 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCFTo + 52
14  Capacitor                           0x0000000105815528 $s9Capacitor0A6BridgeC12handleJSCall4callyAA0D0V_tFyycfU0_ + 856
15  Capacitor                           0x00000001058099d0 $sIeg_IeyB_TR + 48
16  libdispatch.dylib                   0x0000000105cac520 _dispatch_call_block_and_release + 32
17  libdispatch.dylib                   0x0000000105cae038 _dispatch_client_callout + 20
18  libdispatch.dylib                   0x0000000105cb60b0 _dispatch_lane_serial_drain + 984
19  libdispatch.dylib                   0x0000000105cb6df4 _dispatch_lane_invoke + 412
20  libdispatch.dylib                   0x0000000105cc3c74 _dispatch_workloop_worker_thread + 736
21  libsystem_pthread.dylib             0x00000001fc4c6ddc _pthread_wqthread + 288
22  libsystem_pthread.dylib             0x00000001fc4c6b7c start_wqthread + 8
2023-08-15 11:30:51.515917+0200 App[599:38098] [reports] Main Thread Checker: UI API called on a background thread: -[UIScene activationState]
PID: 599, TID: 38098, Thread name: (none), Queue name: bridge, QoS: 0
Backtrace:
4   Sentry                              0x0000000105f18a8c -[SentryUIApplication windows] + 356
5   Sentry                              0x0000000105e745f0 +[SentryCrashIntegration enrichScope:crashWrapper:] + 1632
6   Sentry                              0x0000000105e73df8 __40-[SentryCrashIntegration configureScope]_block_invoke + 120
7   Sentry                              0x0000000105eba8a8 -[SentryHub configureScope:] + 136
8   Sentry                              0x0000000105e73d14 -[SentryCrashIntegration configureScope] + 144
9   Sentry                              0x0000000105e7382c -[SentryCrashIntegration installWithOptions:] + 488
10  Sentry                              0x0000000105ef513c +[SentrySDK installIntegrations] + 1192
11  Sentry                              0x0000000105ef376c +[SentrySDK startWithOptions:] + 792
12  SentryCapacitor                     0x00000001059fc230 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCF + 1044
13  SentryCapacitor                     0x00000001059fcdc0 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCFTo + 52
14  Capacitor                           0x0000000105815528 $s9Capacitor0A6BridgeC12handleJSCall4callyAA0D0V_tFyycfU0_ + 856
15  Capacitor                           0x00000001058099d0 $sIeg_IeyB_TR + 48
16  libdispatch.dylib                   0x0000000105cac520 _dispatch_call_block_and_release + 32
17  libdispatch.dylib                   0x0000000105cae038 _dispatch_client_callout + 20
18  libdispatch.dylib                   0x0000000105cb60b0 _dispatch_lane_serial_drain + 984
19  libdispatch.dylib                   0x0000000105cb6df4 _dispatch_lane_invoke + 412
20  libdispatch.dylib                   0x0000000105cc3c74 _dispatch_workloop_worker_thread + 736
21  libsystem_pthread.dylib             0x00000001fc4c6ddc _pthread_wqthread + 288
22  libsystem_pthread.dylib             0x00000001fc4c6b7c start_wqthread + 8
SplashScreen.hideSplash: SplashScreen was automatically hidden after default timeout. You should call `SplashScreen.hide()` as soon as your web app is loaded (or increase the timeout). Read more at https://capacitorjs.com/docs/apis/splash-screen#hiding-the-splash-screen
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIScene delegate]
PID: 599, TID: 38098, Thread name: (none), Queue name: bridge, QoS: 0
Backtrace:
4   Sentry                              0x0000000105f18ad0 -[SentryUIApplication windows] + 424
5   Sentry                              0x0000000105e745f0 +[SentryCrashIntegration enrichScope:crashWrapper:] + 1632
6   Sentry                              0x0000000105e73df8 __40-[SentryCrashIntegration configureScope]_block_invoke + 120
7   Sentry                              0x0000000105eba8a8 -[SentryHub configureScope:] + 136
8   Sentry                              0x0000000105e73d14 -[SentryCrashIntegration configureScope] + 144
9   Sentry                              0x0000000105e7382c -[SentryCrashIntegration installWithOptions:] + 488
10  Sentry                              0x0000000105ef513c +[SentrySDK installIntegrations] + 1192
11  Sentry                              0x0000000105ef376c +[SentrySDK startWithOptions:] + 792
12  SentryCapacitor                     0x00000001059fc230 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCF + 1044
13  SentryCapacitor                     0x00000001059fcdc0 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCFTo + 52
14  Capacitor                           0x0000000105815528 $s9Capacitor0A6BridgeC12handleJSCall4callyAA0D0V_tFyycfU0_ + 856
15  Capacitor                           0x00000001058099d0 $sIeg_IeyB_TR + 48
16  libdispatch.dylib                   0x0000000105cac520 _dispatch_call_block_and_release + 32
17  libdispatch.dylib                   0x0000000105cae038 _dispatch_client_callout + 20
18  libdispatch.dylib                   0x0000000105cb60b0 _dispatch_lane_serial_drain + 984
19  libdispatch.dylib                   0x0000000105cb6df4 _dispatch_lane_invoke + 412
20  libdispatch.dylib                   0x0000000105cc3c74 _dispatch_workloop_worker_thread + 736
21  libsystem_pthread.dylib             0x00000001fc4c6ddc _pthread_wqthread + 288
22  libsystem_pthread.dylib             0x00000001fc4c6b7c start_wqthread + 8
2023-08-15 11:30:51.667409+0200 App[599:38098] [reports] Main Thread Checker: UI API called on a background thread: -[UIScene delegate]
PID: 599, TID: 38098, Thread name: (none), Queue name: bridge, QoS: 0
Backtrace:
4   Sentry                              0x0000000105f18ad0 -[SentryUIApplication windows] + 424
5   Sentry                              0x0000000105e745f0 +[SentryCrashIntegration enrichScope:crashWrapper:] + 1632
6   Sentry                              0x0000000105e73df8 __40-[SentryCrashIntegration configureScope]_block_invoke + 120
7   Sentry                              0x0000000105eba8a8 -[SentryHub configureScope:] + 136
8   Sentry                              0x0000000105e73d14 -[SentryCrashIntegration configureScope] + 144
9   Sentry                              0x0000000105e7382c -[SentryCrashIntegration installWithOptions:] + 488
10  Sentry                              0x0000000105ef513c +[SentrySDK installIntegrations] + 1192
11  Sentry                              0x0000000105ef376c +[SentrySDK startWithOptions:] + 792
12  SentryCapacitor                     0x00000001059fc230 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCF + 1044
13  SentryCapacitor                     0x00000001059fcdc0 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCFTo + 52
14  Capacitor                           0x0000000105815528 $s9Capacitor0A6BridgeC12handleJSCall4callyAA0D0V_tFyycfU0_ + 856
15  Capacitor                           0x00000001058099d0 $sIeg_IeyB_TR + 48
16  libdispatch.dylib                   0x0000000105cac520 _dispatch_call_block_and_release + 32
17  libdispatch.dylib                   0x0000000105cae038 _dispatch_client_callout + 20
18  libdispatch.dylib                   0x0000000105cb60b0 _dispatch_lane_serial_drain + 984
19  libdispatch.dylib                   0x0000000105cb6df4 _dispatch_lane_invoke + 412
20  libdispatch.dylib                   0x0000000105cc3c74 _dispatch_workloop_worker_thread + 736
21  libsystem_pthread.dylib             0x00000001fc4c6ddc _pthread_wqthread + 288
22  libsystem_pthread.dylib             0x00000001fc4c6b7c start_wqthread + 8
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIApplication delegate]
PID: 599, TID: 38098, Thread name: (none), Queue name: bridge, QoS: 0
Backtrace:
4   Sentry                              0x0000000105f18828 -[SentryUIApplication getApplicationDelegate:] + 64
5   Sentry                              0x0000000105f18c94 -[SentryUIApplication windows] + 876
6   Sentry                              0x0000000105e745f0 +[SentryCrashIntegration enrichScope:crashWrapper:] + 1632
7   Sentry                              0x0000000105e73df8 __40-[SentryCrashIntegration configureScope]_block_invoke + 120
8   Sentry                              0x0000000105eba8a8 -[SentryHub configureScope:] + 136
9   Sentry                              0x0000000105e73d14 -[SentryCrashIntegration configureScope] + 144
10  Sentry                              0x0000000105e7382c -[SentryCrashIntegration installWithOptions:] + 488
11  Sentry                              0x0000000105ef513c +[SentrySDK installIntegrations] + 1192
12  Sentry                              0x0000000105ef376c +[SentrySDK startWithOptions:] + 792
13  SentryCapacitor                     0x00000001059fc230 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCF + 1044
14  SentryCapacitor                     0x00000001059fcdc0 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCFTo + 52
15  Capacitor                           0x0000000105815528 $s9Capacitor0A6BridgeC12handleJSCall4callyAA0D0V_tFyycfU0_ + 856
16  Capacitor                           0x00000001058099d0 $sIeg_IeyB_TR + 48
17  libdispatch.dylib                   0x0000000105cac520 _dispatch_call_block_and_release + 32
18  libdispatch.dylib                   0x0000000105cae038 _dispatch_client_callout + 20
19  libdispatch.dylib                   0x0000000105cb60b0 _dispatch_lane_serial_drain + 984
20  libdispatch.dylib                   0x0000000105cb6df4 _dispatch_lane_invoke + 412
21  libdispatch.dylib                   0x0000000105cc3c74 _dispatch_workloop_worker_thread + 736
22  libsystem_pthread.dylib             0x00000001fc4c6ddc _pthread_wqthread + 288
23  libsystem_pthread.dylib             0x00000001fc4c6b7c start_wqthread + 8
2023-08-15 11:30:52.260468+0200 App[599:38098] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication delegate]
PID: 599, TID: 38098, Thread name: (none), Queue name: bridge, QoS: 0
Backtrace:
4   Sentry                              0x0000000105f18828 -[SentryUIApplication getApplicationDelegate:] + 64
5   Sentry                              0x0000000105f18c94 -[SentryUIApplication windows] + 876
6   Sentry                              0x0000000105e745f0 +[SentryCrashIntegration enrichScope:crashWrapper:] + 1632
7   Sentry                              0x0000000105e73df8 __40-[SentryCrashIntegration configureScope]_block_invoke + 120
8   Sentry                              0x0000000105eba8a8 -[SentryHub configureScope:] + 136
9   Sentry                              0x0000000105e73d14 -[SentryCrashIntegration configureScope] + 144
10  Sentry                              0x0000000105e7382c -[SentryCrashIntegration installWithOptions:] + 488
11  Sentry                              0x0000000105ef513c +[SentrySDK installIntegrations] + 1192
12  Sentry                              0x0000000105ef376c +[SentrySDK startWithOptions:] + 792
13  SentryCapacitor                     0x00000001059fc230 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCF + 1044
14  SentryCapacitor                     0x00000001059fcdc0 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCFTo + 52
15  Capacitor                           0x0000000105815528 $s9Capacitor0A6BridgeC12handleJSCall4callyAA0D0V_tFyycfU0_ + 856
16  Capacitor                           0x00000001058099d0 $sIeg_IeyB_TR + 48
17  libdispatch.dylib                   0x0000000105cac520 _dispatch_call_block_and_release + 32
18  libdispatch.dylib                   0x0000000105cae038 _dispatch_client_callout + 20
19  libdispatch.dylib                   0x0000000105cb60b0 _dispatch_lane_serial_drain + 984
20  libdispatch.dylib                   0x0000000105cb6df4 _dispatch_lane_invoke + 412
21  libdispatch.dylib                   0x0000000105cc3c74 _dispatch_workloop_worker_thread + 736
22  libsystem_pthread.dylib             0x00000001fc4c6ddc _pthread_wqthread + 288
23  libsystem_pthread.dylib             0x00000001fc4c6b7c start_wqthread + 8
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIWindow screen]
PID: 599, TID: 38098, Thread name: (none), Queue name: bridge, QoS: 0
Backtrace:
4   Sentry                              0x0000000105e7464c +[SentryCrashIntegration enrichScope:crashWrapper:] + 1724
5   Sentry                              0x0000000105e73df8 __40-[SentryCrashIntegration configureScope]_block_invoke + 120
6   Sentry                              0x0000000105eba8a8 -[SentryHub configureScope:] + 136
7   Sentry                              0x0000000105e73d14 -[SentryCrashIntegration configureScope] + 144
8   Sentry                              0x0000000105e7382c -[SentryCrashIntegration installWithOptions:] + 488
9   Sentry                              0x0000000105ef513c +[SentrySDK installIntegrations] + 1192
10  Sentry                              0x0000000105ef376c +[SentrySDK startWithOptions:] + 792
11  SentryCapacitor                     0x00000001059fc230 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCF + 1044
12  SentryCapacitor                     0x00000001059fcdc0 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCFTo + 52
13  Capacitor                           0x0000000105815528 $s9Capacitor0A6BridgeC12handleJSCall4callyAA0D0V_tFyycfU0_ + 856
14  Capacitor                           0x00000001058099d0 $sIeg_IeyB_TR + 48
15  libdispatch.dylib                   0x0000000105cac520 _dispatch_call_block_and_release + 32
16  libdispatch.dylib                   0x0000000105cae038 _dispatch_client_callout + 20
17  libdispatch.dylib                   0x0000000105cb60b0 _dispatch_lane_serial_drain + 984
18  libdispatch.dylib                   0x0000000105cb6df4 _dispatch_lane_invoke + 412
19  libdispatch.dylib                   0x0000000105cc3c74 _dispatch_workloop_worker_thread + 736
20  libsystem_pthread.dylib             0x00000001fc4c6ddc _pthread_wqthread + 288
21  libsystem_pthread.dylib             0x00000001fc4c6b7c start_wqthread + 8
2023-08-15 11:30:52.369919+0200 App[599:38098] [reports] Main Thread Checker: UI API called on a background thread: -[UIWindow screen]
PID: 599, TID: 38098, Thread name: (none), Queue name: bridge, QoS: 0
Backtrace:
4   Sentry                              0x0000000105e7464c +[SentryCrashIntegration enrichScope:crashWrapper:] + 1724
5   Sentry                              0x0000000105e73df8 __40-[SentryCrashIntegration configureScope]_block_invoke + 120
6   Sentry                              0x0000000105eba8a8 -[SentryHub configureScope:] + 136
7   Sentry                              0x0000000105e73d14 -[SentryCrashIntegration configureScope] + 144
8   Sentry                              0x0000000105e7382c -[SentryCrashIntegration installWithOptions:] + 488
9   Sentry                              0x0000000105ef513c +[SentrySDK installIntegrations] + 1192
10  Sentry                              0x0000000105ef376c +[SentrySDK startWithOptions:] + 792
11  SentryCapacitor                     0x00000001059fc230 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCF + 1044
12  SentryCapacitor                     0x00000001059fcdc0 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCFTo + 52
13  Capacitor                           0x0000000105815528 $s9Capacitor0A6BridgeC12handleJSCall4callyAA0D0V_tFyycfU0_ + 856
14  Capacitor                           0x00000001058099d0 $sIeg_IeyB_TR + 48
15  libdispatch.dylib                   0x0000000105cac520 _dispatch_call_block_and_release + 32
16  libdispatch.dylib                   0x0000000105cae038 _dispatch_client_callout + 20
17  libdispatch.dylib                   0x0000000105cb60b0 _dispatch_lane_serial_drain + 984
18  libdispatch.dylib                   0x0000000105cb6df4 _dispatch_lane_invoke + 412
19  libdispatch.dylib                   0x0000000105cc3c74 _dispatch_workloop_worker_thread + 736
20  libsystem_pthread.dylib             0x00000001fc4c6ddc _pthread_wqthread + 288
21  libsystem_pthread.dylib             0x00000001fc4c6b7c start_wqthread + 8
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIWindow rootViewController]
PID: 599, TID: 38098, Thread name: (none), Queue name: bridge, QoS: 0
Backtrace:
4   Sentry                              0x0000000105f202f0 -[SentryUIViewControllerSwizzling swizzleRootViewControllerFromUIApplication:] + 1136
5   Sentry                              0x0000000105f1e560 -[SentryUIViewControllerSwizzling start] + 84
6   Sentry                              0x0000000105ed7e18 -[SentryPerformanceTrackingIntegration installWithOptions:] + 536
7   Sentry                              0x0000000105ef513c +[SentrySDK installIntegrations] + 1192
8   Sentry                              0x0000000105ef376c +[SentrySDK startWithOptions:] + 792
9   SentryCapacitor                     0x00000001059fc230 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCF + 1044
10  SentryCapacitor                     0x00000001059fcdc0 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCFTo + 52
11  Capacitor                           0x0000000105815528 $s9Capacitor0A6BridgeC12handleJSCall4callyAA0D0V_tFyycfU0_ + 856
12  Capacitor                           0x00000001058099d0 $sIeg_IeyB_TR + 48
13  libdispatch.dylib                   0x0000000105cac520 _dispatch_call_block_and_release + 32
14  libdispatch.dylib                   0x0000000105cae038 _dispatch_client_callout + 20
15  libdispatch.dylib                   0x0000000105cb60b0 _dispatch_lane_serial_drain + 984
16  libdispatch.dylib                   0x0000000105cb6df4 _dispatch_lane_invoke + 412
17  libdispatch.dylib                   0x0000000105cc3c74 _dispatch_workloop_worker_thread + 736
18  libsystem_pthread.dylib             0x00000001fc4c6ddc _pthread_wqthread + 288
19  libsystem_pthread.dylib             0x00000001fc4c6b7c start_wqthread + 8
2023-08-15 11:30:52.489425+0200 App[599:38098] [reports] Main Thread Checker: UI API called on a background thread: -[UIWindow rootViewController]
PID: 599, TID: 38098, Thread name: (none), Queue name: bridge, QoS: 0
Backtrace:
4   Sentry                              0x0000000105f202f0 -[SentryUIViewControllerSwizzling swizzleRootViewControllerFromUIApplication:] + 1136
5   Sentry                              0x0000000105f1e560 -[SentryUIViewControllerSwizzling start] + 84
6   Sentry                              0x0000000105ed7e18 -[SentryPerformanceTrackingIntegration installWithOptions:] + 536
7   Sentry                              0x0000000105ef513c +[SentrySDK installIntegrations] + 1192
8   Sentry                              0x0000000105ef376c +[SentrySDK startWithOptions:] + 792
9   SentryCapacitor                     0x00000001059fc230 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCF + 1044
10  SentryCapacitor                     0x00000001059fcdc0 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCFTo + 52
11  Capacitor                           0x0000000105815528 $s9Capacitor0A6BridgeC12handleJSCall4callyAA0D0V_tFyycfU0_ + 856
12  Capacitor                           0x00000001058099d0 $sIeg_IeyB_TR + 48
13  libdispatch.dylib                   0x0000000105cac520 _dispatch_call_block_and_release + 32
14  libdispatch.dylib                   0x0000000105cae038 _dispatch_client_callout + 20
15  libdispatch.dylib                   0x0000000105cb60b0 _dispatch_lane_serial_drain + 984
16  libdispatch.dylib                   0x0000000105cb6df4 _dispatch_lane_invoke + 412
17  libdispatch.dylib                   0x0000000105cc3c74 _dispatch_workloop_worker_thread + 736
18  libsystem_pthread.dylib             0x00000001fc4c6ddc _pthread_wqthread + 288
19  libsystem_pthread.dylib             0x00000001fc4c6b7c start_wqthread + 8
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIViewController childViewControllers]
PID: 599, TID: 38098, Thread name: (none), Queue name: bridge, QoS: 0
Backtrace:
4   Sentry                              0x0000000105f28f24 -[UIViewController(Sentry) sentry_descendantViewControllers] + 80
5   Sentry                              0x0000000105f204e8 -[SentryUIViewControllerSwizzling swizzleRootViewControllerAndDescendant:] + 72
6   Sentry                              0x0000000105f20450 -[SentryUIViewControllerSwizzling swizzleRootViewControllerFromUIApplication:] + 1488
7   Sentry                              0x0000000105f1e560 -[SentryUIViewControllerSwizzling start] + 84
8   Sentry                              0x0000000105ed7e18 -[SentryPerformanceTrackingIntegration installWithOptions:] + 536
9   Sentry                              0x0000000105ef513c +[SentrySDK installIntegrations] + 1192
10  Sentry                              0x0000000105ef376c +[SentrySDK startWithOptions:] + 792
11  SentryCapacitor                     0x00000001059fc230 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCF + 1044
12  SentryCapacitor                     0x00000001059fcdc0 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCFTo + 52
13  Capacitor                           0x0000000105815528 $s9Capacitor0A6BridgeC12handleJSCall4callyAA0D0V_tFyycfU0_ + 856
14  Capacitor                           0x00000001058099d0 $sIeg_IeyB_TR + 48
15  libdispatch.dylib                   0x0000000105cac520 _dispatch_call_block_and_release + 32
16  libdispatch.dylib                   0x0000000105cae038 _dispatch_client_callout + 20
17  libdispatch.dylib                   0x0000000105cb60b0 _dispatch_lane_serial_drain + 984
18  libdispatch.dylib                   0x0000000105cb6df4 _dispatch_lane_invoke + 412
19  libdispatch.dylib                   0x0000000105cc3c74 _dispatch_workloop_worker_thread + 736
20  libsystem_pthread.dylib             0x00000001fc4c6ddc _pthread_wqthread + 288
21  libsystem_pthread.dylib             0x00000001fc4c6b7c start_wqthread + 8
2023-08-15 11:30:52.605653+0200 App[599:38098] [reports] Main Thread Checker: UI API called on a background thread: -[UIViewController childViewControllers]
PID: 599, TID: 38098, Thread name: (none), Queue name: bridge, QoS: 0
Backtrace:
4   Sentry                              0x0000000105f28f24 -[UIViewController(Sentry) sentry_descendantViewControllers] + 80
5   Sentry                              0x0000000105f204e8 -[SentryUIViewControllerSwizzling swizzleRootViewControllerAndDescendant:] + 72
6   Sentry                              0x0000000105f20450 -[SentryUIViewControllerSwizzling swizzleRootViewControllerFromUIApplication:] + 1488
7   Sentry                              0x0000000105f1e560 -[SentryUIViewControllerSwizzling start] + 84
8   Sentry                              0x0000000105ed7e18 -[SentryPerformanceTrackingIntegration installWithOptions:] + 536
9   Sentry                              0x0000000105ef513c +[SentrySDK installIntegrations] + 1192
10  Sentry                              0x0000000105ef376c +[SentrySDK startWithOptions:] + 792
11  SentryCapacitor                     0x00000001059fc230 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCF + 1044
12  SentryCapacitor                     0x00000001059fcdc0 $s15SentryCapacitorAAC13initNativeSdkyySo13CAPPluginCallCFTo + 52
13  Capacitor                           0x0000000105815528 $s9Capacitor0A6BridgeC12handleJSCall4callyAA0D0V_tFyycfU0_ + 856
14  Capacitor                           0x00000001058099d0 $sIeg_IeyB_TR + 48
15  libdispatch.dylib                   0x0000000105cac520 _dispatch_call_block_and_release + 32
16  libdispatch.dylib                   0x0000000105cae038 _dispatch_client_callout + 20
17  libdispatch.dylib                   0x0000000105cb60b0 _dispatch_lane_serial_drain + 984
18  libdispatch.dylib                   0x0000000105cb6df4 _dispatch_lane_invoke + 412
19  libdispatch.dylib                   0x0000000105cc3c74 _dispatch_workloop_worker_thread + 736
20  libsystem_pthread.dylib             0x00000001fc4c6ddc _pthread_wqthread + 288
21  libsystem_pthread.dylib             0x00000001fc4c6b7c start_wqthread + 8

valeriomazzeo avatar Aug 15 '23 10:08 valeriomazzeo

Hello @lucas-zimerman, could you review the client's explanation?

Kobby-Bawuah avatar Aug 15 '23 17:08 Kobby-Bawuah

Sure, there are some repeated issues so, I'll keep focus here, but there's a new fix that will be deployed on the next version in order to fix this. Thanks for all the feedback!

lucas-zimerman avatar Aug 29 '23 13:08 lucas-zimerman

This bug was fixed and the fix will be included on the next version. If the error persists, feel free to reopen this issue

lucas-zimerman avatar Sep 07 '23 12:09 lucas-zimerman