[SKStoreProductViewController sceneDisconnected:] crash on iOS 15.7

Hello.

We are experiencing come crashes on iOS 15.7 (both beta and release version). Our crashes are spiking with the release of iOS 15.7.

This issue happened before on iOS 15.6 beta but on 15.6 release it was fixed.

Here is the stack trace:

NSInvalidArgumentException ___CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__

NSInvalidArgumentException: -[SKStoreProductViewController sceneDisconnected:]: unrecognized selector sent to instance 0x10bb15e00

0  CoreFoundation     ___exceptionPreprocess
1  libobjc.A.dylib    _objc_exception_throw
2  CoreFoundation     -[NSObject(NSObject) doesNotRecognizeSelector:]
3  UIKitCore          -[UIResponder doesNotRecognizeSelector:]
4  CoreFoundation     ____forwarding___
5  CoreFoundation     ___forwarding_prep_0___
6  CoreFoundation     ___CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__
7  CoreFoundation     ____CFXRegistrationPost_block_invoke
8  CoreFoundation     __CFXRegistrationPost
9  CoreFoundation     __CFXNotificationPost
10 Foundation         -[NSNotificationCenter postNotificationName:object:userInfo:]
11 UIKitCore          -[UIScene _invalidate]
12 UIKitCore          -[UIWindowScene _invalidate]
13 UIKitCore          -[UIApplication workspace:willDestroyScene:withTransitionContext:completion:]
14 UIKitCore          -[UIApplicationSceneClientAgent scene:willInvalidateWithEvent:completion:]
15 FrontBoardServices -[FBSScene _callOutQueue_agent_willDestroyWithTransitionContext:completion:]
16 FrontBoardServices ___84-[FBSWorkspaceScenesClient _queue_invalidateScene:withTransitionContext:completion:]_block_invoke_2
17 FrontBoardServices -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:]
18 FrontBoardServices ___84-[FBSWorkspaceScenesClient _queue_invalidateScene:withTransitionContext:completion:]_block_invoke
19 libdispatch.dylib  __dispatch_client_callout
20 libdispatch.dylib  __dispatch_block_invoke_direct$VARIANT$mp
21 FrontBoardServices __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__
22 FrontBoardServices -[FBSSerialQueue _targetQueue_performNextIfPossible]
23 FrontBoardServices -[FBSSerialQueue _performNextFromRunLoopSource]
24 CoreFoundation     ___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
25 CoreFoundation     ___CFRunLoopDoSource0
26 CoreFoundation     ___CFRunLoopDoSources0
27 CoreFoundation     ___CFRunLoopRun
28 CoreFoundation     _CFRunLoopRunSpecific
29 GraphicsServices   _GSEventRunModal
30 UIKitCore          -[UIApplication _run]
31 UIKitCore          _UIApplicationMain
32 XXXXXXXXXXX        main (main.m:8:22)
33 dyld               start

Regards!

Answered by Frameworks Engineer in 729646022

Thanks everyone for reporting an increased number of crash reports for an unrecognized selector in [SKStoreProductViewController sceneDisconnected:] or [SKStoreProductViewController appWillTerminate].

This crash happens in the public release of iOS/iPadOS 15.7, and seed releases of iOS/iPadOS 16 prior to seed 4 [1]. It does not occur in the public release of iOS 16.

The crash primarily happens when the app is in the background and is about to be terminated by the operating system. As a result, these crashes are not expected to be visible to the majority of end users. (One exception is on iPad with an app that supports multiple scenes, and a user manually terminates a scene.)

Your analytics will show an increased in crash rate, however your customers should not be affected by this issue. 

We are actively working to address the crash.

[1] In which case you should update to the most recent release.

The same issue on iOS 15.7

We are having the same issue. Up until now it was still happening quite a lot on iOS 16, but yesterday the crashes spiked 10 times when they started appearing on iOS 15.7 and will probably continue to rise substantially now that iOS 15.7 and iOS 16 are officially out

Same here with 15.7, many user blame us because an app update same time with 15.7

Crash rates are of the charts, this issue dropped our crash-free sessions by 0.5%!!!! Apple please help!!!

Same issues: crashs mostly doubled for iOS 15.7 and iOS 16.0 (already happened on iOS 15.6 beta this summer).

Same issue on 15.7 and 16.0. We have thousands of crashes.

Same issue :/ For me, this is occurring while watching Admob rewarded ads. The ad freezes and then a crash popup appears every time. This is especially common among our Ipad test devices independent of OS version ( tested on 15.4 and 15.7 ).

I'm seeing this issue in one of the apps I work on. I saw it first in crashlogs (Bugsnag) in July but last 2 weeks the number of reported crashes skyrocketed. The app doesn't explicitly use the SKStoreProductViewController. It uses UIApplication.shared.open("itms-apps://apps.apple.com/app/appid") and the SKStoreReviewController.requestReview(), I'm not sure which one of these uses the SKStoreProductViewController. What is very odd, the other 2 apps that use the same way to show the other product app pages don't have this crash in their logs. Edit: I saw somebody mentioned the issue could be related to AdMob. This app also uses AdMob, the other 2 apps don't use AdMob.

Able to reproduce a crash with the same stack symbols locally and the code below stops the crash from happening. The code is creating empty functions to handle the unrecognized selector message and restricting this extension to iOS 15.7:

@available(iOS, introduced: 15.7, obsoleted: 16.0)
@objc extension SKStoreProductViewController {
    func sceneDisconnected(_ arg: AnyObject) {}
    func appWillTerminate() {}
}

Thanks everyone for reporting an increased number of crash reports for an unrecognized selector in [SKStoreProductViewController sceneDisconnected:] or [SKStoreProductViewController appWillTerminate].

This crash happens in the public release of iOS/iPadOS 15.7, and seed releases of iOS/iPadOS 16 prior to seed 4 [1]. It does not occur in the public release of iOS 16.

The crash primarily happens when the app is in the background and is about to be terminated by the operating system. As a result, these crashes are not expected to be visible to the majority of end users. (One exception is on iPad with an app that supports multiple scenes, and a user manually terminates a scene.)

Your analytics will show an increased in crash rate, however your customers should not be affected by this issue. 

We are actively working to address the crash.

[1] In which case you should update to the most recent release.

10

Have the same issue in 15.7 and disappeared in iOS16

Sorry can you confirm is this workaround can fix it for now?

@available(iOS, introduced: 15.7, obsoleted: 16.0)
@objc extension SKStoreProductViewController {
    func sceneDisconnected(_ arg: AnyObject) {}
    func appWillTerminate() {}
}

https://stackoverflow.com/a/73796906/92153

Thanks

The same issue on iOS 15.7. A small number occurred at 16.0.0

We are also seeing this issue across multiple apps. ADDITIONALLY we are seeing a strongly correlated increase in DuplicateTransaction replies from the app store. is anyone else seeing this increase as well?

Do the developers have to take care of this crash themselves or will there be an iOS 15.7.1 version in which this issue is fixed?

Dear Apple, important question: I’m still seeing this a lot on iOS 15.7 and it’s appearing on the App Store Connect crash reports. Will this affect ranking? It’s making up the majority of my crashes

iOS 15.7.1 did fix this crash, but the iOS 15.7.2 beta (at RC as of Dec 7th) has reintroduced this crash. Can we get a rev of 15.7.2 before it ships to re-fix this crash?

15.7.2 reintroduced the crash!

Can we get an update from this from Apple? My crashes are soaring

This is now the single most common crash on all of our iOS users. As mentioned it was fixed and then regressed.

Hi! We are having the same problem in our applications. Hoping Apple will address that in 15.7.* patch release.

It looks like it has been fixed again in iOS version 15.7.3. So far we haven't had any crashes reported with this new version.

[SKStoreProductViewController sceneDisconnected:] crash on iOS 15.7
 
 
Q