OneSignal-iOS-SDK icon indicating copy to clipboard operation
OneSignal-iOS-SDK copied to clipboard

[Bug] Crash when logging in-app message impression

Open kajensen opened this issue 1 year ago • 15 comments

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

  • [X] I agree to follow this project's Code of Conduct

kajensen avatar Jun 19 '24 15:06 kajensen

Update: also seeing crashes on 17.4.1

kajensen avatar Jun 20 '24 16:06 kajensen

@kajensen Thank you for reporting we will investigate

emawby avatar Jun 21 '24 18:06 emawby

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 avatar Jun 24 '24 17:06 kunalzigma

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.

kunalzigma avatar Jun 25 '24 06:06 kunalzigma

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.

edsonbittencourt avatar Jun 26 '24 01:06 edsonbittencourt

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?

kunalzigma avatar Jun 27 '24 07:06 kunalzigma

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

nan-li avatar Jun 27 '24 15:06 nan-li

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?

nan-li avatar Jun 27 '24 15:06 nan-li

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: @.***>

kunalzigma avatar Jun 27 '24 15:06 kunalzigma

@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.

nan-li avatar Jun 27 '24 17:06 nan-li

@nan-li at least 17.4.1 as well

kajensen avatar Jun 27 '24 18:06 kajensen

@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

kunalzigma avatar Jun 27 '24 18:06 kunalzigma

@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 avatar Jun 27 '24 19:06 kajensen

@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.

kajensen avatar Jun 27 '24 19:06 kajensen

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

kunalzigma avatar Jun 28 '24 04:06 kunalzigma

The fix has been released in version 5.2.2

emawby avatar Jul 03 '24 16:07 emawby

The same crash occurs in 5.2.6 when the device is offline. Exception Reason: *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1] iOS 18.0.1

AlexSaraev avatar Oct 30 '24 09:10 AlexSaraev

I also have the same problem after updating to version 5.2.6. I didn't have this problem with the previous version. The crash occurs when the app is open.

NSInvalidArgumentException *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1

CoreFoundation +0x827cc __exceptionPreprocess OneSignalCore +0x0a06c -[OneSignalClient handleJSONNSURLResponse:data:error:isAsync:withRequest:onSuccess:onFailure:] OneSignalCore +0x09338 __54-[OneSignalClient executeRequest:onSuccess:onFailure:]_block_invoke Called from CFNetwork +0x6b9c0 __40-[__NSURLSessionLocal taskForClassInfo:]_block_invoke

pierrolivier avatar Oct 31 '24 07:10 pierrolivier

same happen,

it happen where is no internet connection, and you keep using the app.

summonerriftofficial avatar Nov 16 '24 08:11 summonerriftofficial

Same issue in 5.2.7

截圖 2024-11-17 下午2 06 55

amoshsueh avatar Nov 17 '24 06:11 amoshsueh

This crash still happening in 5.2.7. Please fix this ASAP.

Screenshot 2024-11-26 at 12 05 05 PM

ronee12 avatar Nov 26 '24 06:11 ronee12

@emawby Any update about it ?

ahmedsafadii avatar Dec 01 '24 06:12 ahmedsafadii

@emawby updatess?

solibe1 avatar Dec 18 '24 00:12 solibe1

The new crash reports on 5.2.6 and 5.2.7 are fixed in Release 5.2.9

nan-li avatar Dec 19 '24 00:12 nan-li