Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Main thread is getting blocked during initialisation #1452

Open
1 task done
sapharow opened this issue Jun 18, 2024 · 4 comments
Open
1 task done

[Bug]: Main thread is getting blocked during initialisation #1452

sapharow opened this issue Jun 18, 2024 · 4 comments

Comments

@sapharow
Copy link

sapharow commented Jun 18, 2024

What happened?

The app's main thread hanged for more than 3 seconds due to usage of synchronous deprecated API applicationIconBadgeNumber.

Steps to reproduce?

Can not be reliably reproduced locally due to nature of the issue. 
The info is gathered using BugSnag error reporter from one of our users.

What did you expect to happen?

The app's main thread is not blocked during OneSignal initialisation.

OneSignal iOS SDK version

Release 5.2.1

iOS version

17

Specific iOS version

17.0.2

Relevant log output

Thread 0 - com.apple.usernotifications.UNUserNotificationServiceConnection - (TH_STATE_WAITING)
0  libsystem_kernel.dylib +0x11d4 _mach_msg2_trap
1  libsystem_kernel.dylib +0xf6c  _mach_msg2_internal
2  libsystem_kernel.dylib +0xe84  _mach_msg_overwrite
3  libsystem_kernel.dylib +0xcc4  _mach_msg
4  libdispatch.dylib +0x1eefc     __dispatch_mach_send_and_wait_for_reply
5  libdispatch.dylib +0x1f29c     _dispatch_mach_send_with_result_and_wait_for_reply
6  libxpc.dylib +0x106cc          _xpc_connection_send_message_with_reply_sync
7  Foundation +0x396bc            ___NSXPCCONNECTION_IS_WAITING_FOR_A_SYNCHRONOUS_REPLY__
8  Foundation +0x213b8            -[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]
9  Foundation +0x3b4bc            -[NSXPCConnection _sendSelector:withProxy:arg1:arg2:]
10 Foundation +0x3b3e8            __NSXPCDistantObjectSimpleMessageSend2
11 UserNotifications +0x46fc      ___70-[UNUserNotificationServiceConnection badgeNumberForBundleIdentifier:]_block_invoke
12 libdispatch.dylib +0x42fc      __dispatch_client_callout
13 libdispatch.dylib +0x136b0     __dispatch_lane_barrier_sync_invoke_and_complete
14 UserNotifications +0x5090      -[UNUserNotificationServiceConnection badgeNumberForBundleIdentifier:]
15 UserNotifications +0x4f40      -[UNUserNotificationCenter badgeNumber]
16 UIKitCore +0x390530            -[UIApplication applicationIconBadgeNumber]
17 OneSignalNotifications +0x7580 +[OSNotificationsManager clearBadgeCount:fromClearAll:]
18 OneSignalFramework +0x9188     +[OneSignal init]
<redacted>

Code of Conduct

  • I agree to follow this project's Code of Conduct
@sapharow sapharow changed the title [Bug]: Main thread block during initialisation [Bug]: Main thread is getting blocked during initialisation Jun 18, 2024
@frederik-jacques
Copy link

I'm seeing the same thing ... launch time is really slow after adding the OneSignal SDK for iOS.

@dingwilson
Copy link

+1

@jherrm
Copy link

jherrm commented Sep 16, 2024

+1 This crash happened during an app review and caused us to get rejected. Any workarounds??

@danielshaffer
Copy link

+1 crashed on app review and was rejected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants