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]: OneSignalUserDefaults Crash #1365

Closed
1 task done
danhalliday opened this issue Feb 6, 2024 · 10 comments
Closed
1 task done

[Bug]: OneSignalUserDefaults Crash #1365

danhalliday opened this issue Feb 6, 2024 · 10 comments

Comments

@danhalliday
Copy link

danhalliday commented Feb 6, 2024

What happened?

iOS app crashed in production with a stack trace showing OneSignal frames.

Steps to reproduce?

No idea. This is a remote crash report from Crashlytics.

What did you expect to happen?

The library should not cause a crash, regardless of what I may be doing wrong in using it.

OneSignal iOS SDK version

5.1.0

iOS version

11 or below

Specific iOS version

* 17.2.1

Relevant log output

Crashed: com.apple.NSURLSession-delegate
0  CoreFoundation                 0x11d18 __CFBasicHashRehash + 112
1  CoreFoundation                 0x119a8 __CFBasicHashAddValue + 100
2  CoreFoundation                 0x1190c CFBasicHashAddValue + 420
3  CoreFoundation                 0x116fc CFDictionaryAddValue + 208
4  CoreFoundation                 0x10c34 _flattenPlist + 308
5  CoreFoundation                 0x10d98 _flattenPlist + 664
6  CoreFoundation                 0x10dfc _flattenPlist + 764
7  CoreFoundation                 0x10d98 _flattenPlist + 664
8  CoreFoundation                 0x107dc __CFBinaryPlistWriteOrPresize + 240
9  Foundation                     0x3c658 -[NSKeyedArchiver finishEncoding] + 640
10 Foundation                     0x6e7714 +[NSKeyedArchiver archivedDataWithRootObject:] + 112
11 OneSignalCore                  0x112b4 -[OneSignalUserDefaults saveCodeableDataForKey:withValue:] + 88
12 OneSignalUser                  0x1c264 block_destroy_helper.32 + 23276
13 OneSignalUser                  0x33970 __swift_noop_void_return + 9644
14 OneSignalCore                  0xdcb4 -[OneSignalClient handleJSONNSURLResponse:data:error:isAsync:withRequest:onSuccess:onFailure:] + 848
15 OneSignalCore                  0xc998 __54-[OneSignalClient executeRequest:onSuccess:onFailure:]_block_invoke + 44
16 CFNetwork                      0xf368 _CFNetworkSetHSTSStoragePath + 28508
17 CFNetwork                      0x2d218 CFHTTPMessageCopySerializedMessage + 13784
18 libdispatch.dylib              0x26a8 _dispatch_call_block_and_release + 32
19 libdispatch.dylib              0x4300 _dispatch_client_callout + 20
20 libdispatch.dylib              0xb894 _dispatch_lane_serial_drain + 748
21 libdispatch.dylib              0xc3f8 _dispatch_lane_invoke + 432
22 libdispatch.dylib              0x17004 _dispatch_root_queue_drain_deferred_wlh + 288
23 libdispatch.dylib              0x16878 _dispatch_workloop_worker_thread + 404
24 libsystem_pthread.dylib        0x1964 _pthread_wqthread + 288
25 libsystem_pthread.dylib        0x1a04 start_wqthread + 8

Code of Conduct

  • I agree to follow this project's Code of Conduct
@danhalliday danhalliday changed the title [Bug]: [Bug]: OneSignalUserDefaults Crash Feb 6, 2024
@danhalliday
Copy link
Author

@nan-li FYI this is not fixed in 5.1.3.

@ihijazi
Copy link

ihijazi commented Mar 29, 2024

I'm having the same issue. I've posted also about another issue which might be relevant but still no updated on it: OneSignal/OneSignal-Flutter-SDK#858

One thing I noted is the crash happens when not using cellular data (i.e not WiFi)

@kunalzigma
Copy link

@danhalliday am seeing this crash, first time on 5.1.3. Updated app on 30th march, saw this same day. How many crashes can we expect ? like out of 100 or 1000 sessions?

@danhalliday
Copy link
Author

We are seeing in the ballpark of 0.1% of sessions produce something like this bug (we have several different traces though which I think are ultimately this same one). Naturally whether that’s a problem will depend on the size of your user base. But FWIW this is currently our biggest crasher.

@dombartenope
Copy link

Hi folks,

Thank you all for your reports here. I am creating an internal ticket to highlight the issue you're all facing here directly with the SDK team. I'll be linking them this thread, so the team can reply or request information as needed.

Thanks
Dom
OS Technical Support

@yasht01
Copy link

yasht01 commented Apr 22, 2024

Hey folks,
Saw this error for the first time on our app using Flutter SDK. Is there any extra info that we can provide to help debug this issue better?

Onesignal Flutter SDK version: 5.1.0

@nan-li
Copy link
Contributor

nan-li commented May 15, 2024

Hi everyone, thank you for your reports,

We have made a few crash fixes since. Please update to Release 5.1.6 or later, and let us know if the crashes are resolved, or what crashes still remain.

@emawby emawby closed this as completed May 20, 2024
@danhalliday
Copy link
Author

Hi @nan-li, it doesn’t look like this is fixed in 5.1.6. I have a new release out to a few thousand users and am still seeing frequent crashes with the following trace.

Crashed: OneSignal.OSPropertyOperationExecutor
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000
0  CoreFoundation                 0x13054 _CFArrayReplaceValues + 1004
1  CoreFoundation                 0x128d8 CFArrayAppendValue + 152
2  CoreFoundation                 0x11068 _flattenPlist + 292
3  CoreFoundation                 0x11248 _flattenPlist + 772
4  CoreFoundation                 0x111e4 _flattenPlist + 672
5  CoreFoundation                 0x10c2c __CFBinaryPlistWriteOrPresize + 240
6  Foundation                     0x39230 -[NSKeyedArchiver finishEncoding] + 640
7  Foundation                     0x6f12a8 +[NSKeyedArchiver archivedDataWithRootObject:] + 112
8  OneSignalCore                  0xd69c -[OneSignalUserDefaults saveCodeableDataForKey:withValue:] + 88
9  OneSignalUser                  0x1f75c block_destroy_helper.32 + 27880
10 OneSignalUser                  0x1e0bc block_destroy_helper.32 + 22088
11 libdispatch.dylib              0x213c _dispatch_call_block_and_release + 32
12 libdispatch.dylib              0x3dd4 _dispatch_client_callout + 20
13 libdispatch.dylib              0xb400 _dispatch_lane_serial_drain + 748
14 libdispatch.dylib              0xbf30 _dispatch_lane_invoke + 380
15 libdispatch.dylib              0x16cb4 _dispatch_root_queue_drain_deferred_wlh + 288
16 libdispatch.dylib              0x16528 _dispatch_workloop_worker_thread + 404
17 libsystem_pthread.dylib        0x1f20 _pthread_wqthread + 288
18 libsystem_pthread.dylib        0x1fc0 start_wqthread + 8

My new release also has a lower-frequency crash with a similar trace, more similar to the original one I posted above:

Crashed: OneSignal.OSPropertyOperationExecutor
EXC_BREAKPOINT 0x000000019df30168
0  CoreFoundation                 0x12168 __CFBasicHashRehash + 112
1  CoreFoundation                 0x11df8 __CFBasicHashAddValue + 100
2  CoreFoundation                 0x11d5c CFBasicHashAddValue + 420
3  CoreFoundation                 0x11b4c CFDictionaryAddValue + 208
4  CoreFoundation                 0x11078 _flattenPlist + 308
5  CoreFoundation                 0x11248 _flattenPlist + 772
6  CoreFoundation                 0x111e4 _flattenPlist + 672
7  CoreFoundation                 0x10c2c __CFBinaryPlistWriteOrPresize + 240
8  Foundation                     0x39230 -[NSKeyedArchiver finishEncoding] + 640
9  Foundation                     0x6f12a8 +[NSKeyedArchiver archivedDataWithRootObject:] + 112
10 OneSignalCore                  0xd69c -[OneSignalUserDefaults saveCodeableDataForKey:withValue:] + 88
11 OneSignalUser                  0x1ebf8 block_destroy_helper.32 + 24964
12 OneSignalUser                  0x1e0bc block_destroy_helper.32 + 22088
13 libdispatch.dylib              0x213c _dispatch_call_block_and_release + 32
14 libdispatch.dylib              0x3dd4 _dispatch_client_callout + 20
15 libdispatch.dylib              0xb400 _dispatch_lane_serial_drain + 748
16 libdispatch.dylib              0xbf30 _dispatch_lane_invoke + 380
17 libdispatch.dylib              0x16cb4 _dispatch_root_queue_drain_deferred_wlh + 288
18 libdispatch.dylib              0x16528 _dispatch_workloop_worker_thread + 404
19 libsystem_pthread.dylib        0x1f20 _pthread_wqthread + 288
20 libsystem_pthread.dylib        0x1fc0 start_wqthread + 8

@danhalliday
Copy link
Author

Also another variant, in case this is of any use...

Crashed: OneSignal.OSPropertyOperationExecutor
EXC_BREAKPOINT 0x000000019df30168
0  CoreFoundation                 0x12168 __CFBasicHashRehash + 112
1  CoreFoundation                 0x11df8 __CFBasicHashAddValue + 100
2  CoreFoundation                 0x30a0 CFDictionarySetValue + 208
3  Foundation                     0x21534 _encodeObject + 660
4  Foundation                     0x210dc -[NSKeyedArchiver _encodeArrayOfObjects:forKey:] + 460
5  Foundation                     0x200c4 -[NSDictionary(NSDictionary) encodeWithCoder:] + 572
6  Foundation                     0x2173c _encodeObject + 1180
7  OneSignalUser                  0xf1f4 block_destroy_helper + 6436
8  OneSignalUser                  0xf3ac block_destroy_helper + 6876
9  Foundation                     0x2173c _encodeObject + 1180
10 Foundation                     0x210dc -[NSKeyedArchiver _encodeArrayOfObjects:forKey:] + 460
11 Foundation                     0x4ffc0 -[NSArray(NSArray) encodeWithCoder:] + 588
12 Foundation                     0x2173c _encodeObject + 1180
13 Foundation                     0x6f12a0 +[NSKeyedArchiver archivedDataWithRootObject:] + 104
14 OneSignalCore                  0xd69c -[OneSignalUserDefaults saveCodeableDataForKey:withValue:] + 88
15 OneSignalUser                  0x1ebf8 block_destroy_helper.32 + 24964
16 OneSignalUser                  0x1e0bc block_destroy_helper.32 + 22088
17 libdispatch.dylib              0x213c _dispatch_call_block_and_release + 32
18 libdispatch.dylib              0x3dd4 _dispatch_client_callout + 20
19 libdispatch.dylib              0xb400 _dispatch_lane_serial_drain + 748
20 libdispatch.dylib              0xbf30 _dispatch_lane_invoke + 380
21 libdispatch.dylib              0x16cb4 _dispatch_root_queue_drain_deferred_wlh + 288
22 libdispatch.dylib              0x16528 _dispatch_workloop_worker_thread + 404
23 libsystem_pthread.dylib        0x1f20 _pthread_wqthread + 288
24 libsystem_pthread.dylib        0x1fc0 start_wqthread + 8

@nan-li
Copy link
Contributor

nan-li commented May 23, 2024

Hi @danhalliday thank you for following up with these 3 stacktraces.

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

7 participants