-
Notifications
You must be signed in to change notification settings - Fork 264
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]: NSInvalidUnarchiveOperationException *** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (OSIndirectNotification) for key (NS.objects) because no class named "OSIndirectNotification" was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target). If the class was renamed, use setClassName:forClass: to add a class translation mapping to NSKeyedUnarchiver #1098
Comments
i'm having crash with a lot of users on production, can someone help me? |
@marcosnovaesq Thanks for reporting, does this issue happen only if you upgrade the app in place? In other words does this crash still happen if you uninstall and reinstall the app? |
@jkasten2 yes, when users reinstall the app it start working again as supposed to... Any info i could pass you to repro? We are with this bug for 2 weeks already |
according to method migrateToVersion_02_14_00_AndGreater in class OSMigrationController.m if the user had a cached sdk version lower than 21400 then it should migrate... Before the major update we did we had onesignal-ios-sdk on version 21301. Maye it's the cause, i just don't know why users aren't getting migrated... |
+1 I'm having this exact issue. Recently updated from 3.7.3 to 4.3.7 and some iOS users randomly crash with
Asking for a complete reinstall solves the issue, but that's not a valid solution to the entire user base. Unfortunately, we haven't been able to reproduce the issue on the simulator either. |
any updates on this? I managed to get a lastExceptionBackTrace from ips files
|
any updates on this? |
Updated: we released a version with the one signal completely removed from the app and the user stopped seeing the crash. We then released another version with it and started crashing again. So i don't know if you plan to fix this issue again or not, but for the moment we are going without one signal plugged in our app |
@marcosnovaesq I apologize for the inconvenience we are actively working in reproducing and fixing this issue |
@emawby hi, no problem, i tried downgrading sdk for version 2.14.2, problem is i have only one user that i can use to reproduce.. So it went as following: |
@marcosnovaesq @pedrosbmartins After researching the issue I confirmed a case where this issue could happen, if you updated the OneSignal SDK on the main target but left your Can you check your target 'OneSignalNotificationServiceExtension' do
pod 'OneSignalXCFramework', '>= 3.4.3', '< 4.0'
end Source: Step-by-Step React Native 3.x to 4.0.0 Upgrade Guide - Step 2 Make sure to remove |
@jkasten2 On my side, when we upgraded to another major, we did not change this line, at first. When I was fixing the bug, changing this line was one of my many failed attempts xD... But we didn't change this line when we upgraded, only later. I only managed to fix when i released a version with react-native-onesignal 3.8.1 |
@marcosnovaesq Thanks for following up, however I am not sure I understand. Sounds like you ran into some issue upgrading that line in your Now that everything is updated you are no longer seeing this issue now? |
Sorry for the confusion, what happened was -> issue still happening, crash still being caught by sentry |
@marcosnovaesq I see, that is clear to me now! My best guess what is happening now is that the migration was already run but the old OneSignal version in the NSE (NotificationServiceExtension) added some records with the old version. Now that the NSE is updated it isn't writing the old format, however now there are some stuck old records continuing to create this crash. We will look into what can be done to address this state your app and possibly some others are stuck in due to this mix of OneSignal versions. |
thanks @jkasten2 i thought it weird too, looked at the code and the migration should have run, maybe it just didn't migrate correctly? Maybe a edge case where you migrate to buggy 3.x.x to major 4, i don't know. Are you planning on release something to address it? Thanks!! |
@marcosnovaesq I believe your user got migrated correct on the first time the app ran to upgrade them. But the issue is the old NSE put some old record on the device and the migration won't run a 2nd time currently to fix those records. We are looking into addressing this edge case in the next release (3.11.3 or 3.12.0). |
Oh i see! it makes sense since that line was not updated together, it used old NSE... nice |
Hello @jkasten2 how is it going? any news? Thanks |
@marcosnovaesq Sorry for the delay, we don't have an eta yet on this fix. |
Hi @jkasten2 Thanks |
Hi our existing iOS app user get this error as well, even updating app to latest OneSginal SDK version didn't help, when is this issue getting fixed? |
@angyy10 according to our interpretation we should only wait for them to release a fix for this... But no estimates so far, let me know if you fix this |
Any news? |
Hello, are you still looking into this? |
Hello, anyone looking into this can provide more information regarding the current situation? |
What happened?
We updated our react-native-onesignal lib that used OneSignal-iOS-SDK version 2.13.0, which had this bug, according to this issue and according to this one it got solved on later versions. We updated react-native-onesignal to version 4.3.7 ( uses sdk version 3.10.1)and did the correct steps to make it work in ios. Aparrently it started happening to some of our iOS users. Digging in the code we found that it was supossed to run a migration on some version, but aparrently on our end it didn't happen. Anyway our test users that had this happening reinstalled and began to work, but not a fix for common production user
Steps to reproduce?
What did you expect to happen?
Work ok for all ios users
OneSignal iOS SDK version
3.10.1
iOS version
15
Specific iOS version
Relevant log output
CoreFoundation
+0x099d78
__exceptionPreprocess
libobjc.A
+0x016730
objc_exception_throw
Foundation
+0x1208bc
-[NSCoder __failWithException:]
Foundation
+0x120a28
-[NSCoder(Exceptions) __failWithExceptionName:errorCode:format:]
Foundation
+0x03650c
_decodeObjectBinary
Foundation
+0x07da74
-[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:]
Foundation
+0x095578
-[NSArray(NSArray) initWithCoder:]
Foundation
+0x036cac
_decodeObjectBinary
Foundation
+0x01bbb8
_decodeObject
Foundation
+0x03ad88
-[NSKeyedUnarchiver decodeObjectForKey:]
Foundation
+0x09e8bc
+[NSKeyedUnarchiver unarchiveObjectWithData:]
OneSignal
+0x054f74
finishProcessingNotification
OneSignal
+0x04c7a4
finishProcessingNotification
OneSignal
+0x041fd8
finishProcessingNotification
OneSignal
+0x024d28
onesignal_Log
OneSignal
+0x05ee1c
finishProcessingNotification
OneSignal
+0x010fb4
onesignal_Log
libdispatch
+0x001e64
_dispatch_call_block_and_release
libdispatch
+0x003a28
_dispatch_client_callout
libdispatch
+0x011f44
_dispatch_main_queue_drain
libdispatch
+0x011b94
_dispatch_main_queue_callback_4CF
CoreFoundation
+0x0522ec
CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE
CoreFoundation
+0x00c1f0
__CFRunLoopRun
CoreFoundation
+0x01f6b4
CFRunLoopRunSpecific
GraphicsServices
+0x001370
GSEventRunModal
UIKitCore
+0x513e84
-[UIApplication _run]
UIKitCore
+0x2955e8
UIApplicationMain
myapp
+0x008120
0x1038c5ce4
Code of Conduct
The text was updated successfully, but these errors were encountered: