-
Notifications
You must be signed in to change notification settings - Fork 263
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]: Crash on OneSignal.initWithLaunchOptions(_:)
#1310
Comments
OneSignal.initWithLaunchOptions(_:)
@djtarazona Thank you for reporting are you able to reproduce this issue when debugging? I noticed that you are also using version |
I will update to Our engineering team still cannot reproduce the issue. We're going to rely on our external TestFlight beta testers for now. We're waiting for Beta App Review at the moment. I will report back. Thanks! |
I'm curious if setting the App ID before calling OneSignal.setAppId("<app_id>")
OneSignal.initWithLaunchOptions(launchOptions) |
@emawby We updated to the OneSignal SDK to
OneSignalLaunchCrash-SDK3.12.6.txt We'd appreciate anything you can do to expedite a resolution to this issue as our app is crashing on launch and unusable for thousands of users. 🙏 |
I was able to fix the crash! But I'm not sure if this breaks anything else. With some debug code, I got this output of
If you review the code, the crash makes sense. OneSignal-iOS-SDK/iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/Influence/OSChannelTracker.m Lines 140 to 146 in 27aa823
The code was hitting this line, trying to initialize an array with My "fix" is to not enter that code block if Hopefully this is enough information for a proper fix. Please let me know if you need anything else. Thanks! |
@djtarazona Thank you for investigating that is very helpful we will work on implementing the fix! You are also welcome to submit a PR if you would like |
@emawby We'll leave getting a proper fix implemented in your hands, as I'm not sure how Outcomes / attribution is supposed to work and worry while this code may fix the crash, it may break something else in OneSignal. Thanks! |
What happened?
Our app, which uses the OneSignal iOS SDK, is reportedly crashing on launch. I believe I've found the crash reports from Apple in Xcode Organizer.
We aren't aware of any code changes made to introduce this crash. It did not begin with a new build/release - suddenly the build we have had on the App Store for 5 days began crashing.
The only thing I've found so far that may be related: We created an In-App Message the day the crash began. 👀
Opening the crash report in Xcode gives some more detail. It is crashing when initializing an array:
[__NSPlaceholderArray initWithObjects:count:]
Note we are initializing OneSignal on the main thread with the code:
Here is a full crash report: OneSignalLaunchCrash.txt
Steps to reproduce?
What did you expect to happen?
App should launch normally with no crash
OneSignal iOS SDK version
3.11.5
iOS version
16
Specific iOS version
* iOS 16.6
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: