Today OneSignal updated to 2.14.0 via cocoapods
It crashes on app launch with this report
* Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: '* -[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'
However, it does not crash on the simulator
UPDATE: Fixed after I deleted the app and rebuilt it. But It worth to report it to you I think
Same here with version 2.14.0
Same using Carthage. This is very critical as delete/re-install is not an option for most of the users.
One thing I notice is, when I uninstall and install the app again, it assigns a new push id for the device.
This is a mistake on our end due to a class being renamed that we were storing in our Codeable data. For now safest bet is to wait for a version 2.14.1 release or reverting to version 2.13.1
Easy fix is deleting app (clearing storage) and reinstalling as well if you want to do some 2.14.0 testing, but not a good fix for your users when publishing.
@mikechoch when will you fix it?
When the fix will be deployed? You know, there are a lot of production users with a crashing app.
Also, as I understood, rollback to the previous version will cause to same crash for the users, who already reinstall the application or install it from scratch.
Thanks for reporting. A fix for this is included in the OneSignal-iOS-SDK 2.14.1 release
Hi Guys,
We recently faced this issue on version 2.12.0, after update our app started crashing on launch. After looking into this thread, we published a hotfix of our app by updating OneSignal to version 2.14.1. But still some of our users facing crash on app launch on latest version. Any workaround please? Find below crash log:
Fatal Exception: 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
Fatal Exception: NSInvalidUnarchiveOperationException
0 CoreFoundation 0x19dc5d654 __exceptionPreprocess
1 libobjc.A.dylib 0x19d97fbcc objc_exception_throw
2 Foundation 0x19dfb5430 -[NSCoder(Exceptions) __failWithExceptionName:errorCode:format:]
3 Foundation 0x19dfb5540 -[NSCoder(Exceptions) __failWithExceptionName:errorCode:format:]
4 Foundation 0x19e01fe70 _decodeObjectBinary
5 Foundation 0x19df755e8 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:]
6 Foundation 0x19df49874 -[NSArray(NSArray) initWithCoder:]
7 Foundation 0x19e0204f8 _decodeObjectBinary
8 Foundation 0x19e01f9b4 _decodeObject
9 Foundation 0x19df30658 -[NSKeyedUnarchiver decodeObjectForKey:]
10 Foundation 0x19df83a94 +[NSKeyedUnarchiver unarchiveObjectWithData:]
11 MyApp 0x105260bc8 -[OneSignalUserDefaults getSavedCodeableDataForKey:defaultValue:] + 154 (OneSignalUserDefaults.m:154)
12 MyApp 0x105258d40 -[OSInfluenceDataRepository lastNotificationsReceivedData] + 75 (OSInfluenceDataRepository.m:75)
13 MyApp 0x105253d58 -[OSNotificationTracker lastChannelObjects] + 53 (OSNotificationTracker.m:53)
14 MyApp 0x105238b64 -[OSChannelTracker lastReceivedIds] + 88 (OSChannelTracker.m:88)
15 MyApp 0x105269c64 -[OSSessionManager attemptSessionUpgrade:withDirectId:] + 178 (OSSessionManager.m:178)
16 MyApp 0x105254958 +[OneSignalTracker applicationForegrounded] + 117 (OneSignalTracker.m:117)
17 MyApp 0x10524f5f0 -[OneSignalAppDelegate oneSignalApplicationDidBecomeActive:] + 270 (UIApplicationDelegate+OneSignal.m:270)
18 UIKitCore 0x1a1d06780 -[UIApplication _stopDeactivatingForReason:]
19 UIKitCore 0x1a14b3ff0 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:]
20 UIKitCore 0x1a14b433c -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]
21 UIKitCore 0x1a14b3bfc -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:]
22 UIKitCore 0x1a14b8098 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2
23 UIKitCore 0x1a18882ac +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:]
24 UIKitCore 0x1a197d62c _UISceneSettingsDiffActionPerformChangesWithTransitionContext
25 UIKitCore 0x1a14b7df4 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke
26 UIKitCore 0x1a197d528 _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext
27 UIKitCore 0x1a14b7c5c -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]
28 UIKitCore 0x1a1327e30 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke
29 UIKitCore 0x1a13269d0 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:]
30 UIKitCore 0x1a1327b68 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:]
31 UIKitCore 0x1a18ada08 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:]
32 FrontBoardServices 0x1a2de50a8 -[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]
33 FrontBoardServices 0x1a2e09684 __88-[FBSWorkspaceScenesClient sceneID:updateWithSettingsDiff:transitionContext:completion:]_block_invoke_2
34 FrontBoardServices 0x1a2deebfc -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:]
35 FrontBoardServices 0x1a2e095b8 __88-[FBSWorkspaceScenesClient sceneID:updateWithSettingsDiff:transitionContext:completion:]_block_invoke
36 libdispatch.dylib 0x19d923524 _dispatch_client_callout
37 libdispatch.dylib 0x19d8cc434 _dispatch_block_invoke_direct$VARIANT$mp
38 FrontBoardServices 0x1a2e2d850 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__
39 FrontBoardServices 0x1a2e2d51c -[FBSSerialQueue _queue_performNextIfPossible]
40 FrontBoardServices 0x1a2e2da44 -[FBSSerialQueue _performNextFromRunLoopSource]
41 CoreFoundation 0x19dbdbad8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
42 CoreFoundation 0x19dbdba30 __CFRunLoopDoSource0
43 CoreFoundation 0x19dbdb1b8 __CFRunLoopDoSources0
44 CoreFoundation 0x19dbd61e8 __CFRunLoopRun
45 CoreFoundation 0x19dbd5ba8 CFRunLoopRunSpecific
46 GraphicsServices 0x1a7d45344 GSEventRunModal
47 UIKitCore 0x1a1d113e4 UIApplicationMain
48 MyApp 0x104ae33bc main + 21 (AppDelegate.swift:21)
49 libdyld.dylib 0x19da5d8f0 start
Most helpful comment
This is a mistake on our end due to a class being renamed that we were storing in our
Codeabledata. For now safest bet is to wait for a version2.14.1release or reverting to version2.13.1Easy fix is deleting app (clearing storage) and reinstalling as well if you want to do some
2.14.0testing, but not a good fix for your users when publishing.