OneSignal / OneSignal-iOS-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native iOS app with OneSignal. https://onesignal.com
Other
493 stars 262 forks source link

[Bug] Crash when logging in-app message impression #1453

Closed kajensen closed 2 months ago

kajensen commented 3 months ago

What happened?

I'm seeing reports of a subset of my users crashing when logging a OneSignal in-app message impression.

Screenshot 2024-06-19 at 10 59 47 AM

This is a re-opening of #937

Steps to reproduce?

I haven't reproduced myself but the crash logs indicate it happens when an in-app message is shown. Early indications show that it appears to be limited to iOS 17.5.1 devices.

What did you expect to happen?

No crash

OneSignal iOS SDK version

5.1.6

iOS version

17

Specific iOS version

iOS 17.5.1

Relevant log output

No response

Code of Conduct

kajensen commented 3 months ago

Update: also seeing crashes on 17.4.1

emawby commented 3 months ago

@kajensen Thank you for reporting we will investigate

kunalzigma commented 3 months ago

Can confirm same crash in 5.2.0

Its useless to use OneSignal.

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Reason: *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1]
Termination Reason: SIGNAL 6 Abort trap: 6
Terminating Process: Anivy - Voice Changer [2689]

Last Exception Backtrace:
0   CoreFoundation                  0x1895e8f20 __exceptionPreprocess + 164 (NSException.m:249)
1   libobjc.A.dylib                 0x18147a018 objc_exception_throw + 60 (objc-exception.mm:356)
2   CoreFoundation                  0x18957ae6c -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 728 (NSPlaceholderDictionary.m:0)
3   CoreFoundation                  0x18957aa88 +[NSDictionary dictionaryWithObjects:forKeys:count:] + 52 (NSDictionary.m:614)
4   OneSignalInAppMessages          0x102f3d42c +[OSRequestInAppMessageViewed withAppId:withPlayerId:withMessageId:forVariantId:] + 228
5   OneSignalInAppMessages          0x102f391fc -[OSMessagingController messageViewImpressionRequest:] + 268
6   libdispatch.dylib               0x19148c13c _dispatch_call_block_and_release + 32 (init.c:1530)
7   libdispatch.dylib               0x19148ddd4 _dispatch_client_callout + 20 (object.m:576)
8   libdispatch.dylib               0x19149c5a4 _dispatch_main_queue_drain + 988 (queue.c:7898)
9   libdispatch.dylib               0x19149c1b8 _dispatch_main_queue_callback_4CF + 44 (queue.c:8058)
10  CoreFoundation                  0x1895bb710 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1780)
11  CoreFoundation                  0x1895b8914 __CFRunLoopRun + 1996 (CFRunLoop.c:3149)
12  CoreFoundation                  0x1895b7cd8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
13  GraphicsServices                0x1ce4681a8 GSEventRunModal + 164 (GSEvent.c:2196)
14  UIKitCore                       0x18bbf090c -[UIApplication _run] + 888 (UIApplication.m:3713)
15  UIKitCore                       0x18bca49d0 UIApplicationMain + 340 (UIApplication.m:5303)
16  MyApp                   0x1029a1b6c main + 64 (AppDelegate.swift:17)
17  dyld                            0x1acc69e4c start + 2240 (dyldMain.cpp:1298)
kunalzigma commented 3 months ago

this should be resolved immediately, we are fed up of all these crashes. Already lost many users in another app due to crashes and cannot afford to lose more in this one where it is happening. You might have seen other users removing onesignal from their apps on these sdk issues. You are already losing business due to this. Dont force us to do the same. Or please provide alternatives to Onesignal. we cannot afford more crashes of such kind. instead of gaining business, we are losing after adding OneSignal. Never faced any such issue with any 3rd party SDK that too paid in past 13 years of development. This is too much and unbearable. Cant you provide crash free experience for atleast a year or so? Is that really difficult? please say it to my face, leave onesignal. Dont harass me. This is torture and harassment. Instead of focussing on new features, you should be have made it bug-free.

edsonbittencourt commented 3 months ago

I'm having problems migrating my app from iOS 17 to iOS 18 and Mac Sequoia, where the scenario is as follows: if the OneSignal framework is installed in the app, I can't run it in Xcode 16, as the app generates multiple errors/crashes.

By completely removing the OneSignal package, everything works normally, and I can build/run my app perfectly.

The problem is that I can't use Xcode 15.4 anymore unless I roll back my OS. Therefore, I can't send app updates.

I don't know if it's related to the problem, but it's quite complicated to maintain the use of the OneSignal framework.

kunalzigma commented 3 months ago

I have paused InApp messages from my app because saw 2 more crashes just now. We were showing first IAM on first app start by any user after which push prompt shows. Will pausing avoid crashes until , i can expect an update? I dont care if subscribers are added. I just dont want any more crashes. Is that possible with this?

nan-li commented 3 months ago

Hi @edsonbittencourt can you open a new issue with details about your errors?

nan-li commented 3 months ago

Hi @kunalzigma, if you use the SDK method OneSignal.InAppMessages.paused = true and set this upon initialization, IAMs will not display and this crash will not occur.

Just wondering, did you recently delete users or subscriptions?

kunalzigma commented 3 months ago

I have paused from the console. Will that work in avoiding crashes? I wont be getting subscribers because push prompt is shown after IAM until this is resolved.Whats the ETA for this to be resolved? Kindly atleast let us know. No, i didnt even touch or delete any users / subscriptions. Its strange it is happening to my last added app suddenly. On 27 Jun 2024, at 9:19 PM, Nan @.***> wrote: Hi @kunalzigma, if you use the SDK method OneSignal.InAppMessages.paused = true and set this upon initialization, IAMs will not display and this crash will not occur. Just wondering, did you recently delete users or subscriptions?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

nan-li commented 3 months ago

@kajensen @kunalzigma Are you seeing this only on iOS 17.5.1? We are resolving and investigating as you did not delete any users or subscriptions.

kajensen commented 3 months ago

@nan-li at least 17.4.1 as well

kunalzigma commented 3 months ago

@nan-li i am seeing 4 crashes. 3 in one app, 2 in 17.5.1 , and 1 in 17.4.1, whereas the other app, 1 crash in 17.5.1

kajensen commented 3 months ago

@nan-li This has affected over 200 users for us, so doesn't appear to be isolated. Please let us know if we can help investigate as this is a priority for us to fix asap and it has already been over a week.

kajensen commented 3 months ago

@emawby

Any reports or information you can share regarding the investigation? This has been open over a week and is a priority for us to fix asap.

kunalzigma commented 3 months ago

Another crash that too on the app which had those previous other crashes. 5 crashes on 3 apps.

emawby commented 2 months ago

The fix has been released in version 5.2.2