[BUG] Crashes during transaction
New issue checklist
- [x] I have reviewed the
READMEand documentation - [x] I have searched existing issues and this is not a duplicate
- [x] I have attempted to reproduce the issue and include an example project.
General information
-
Superwallversion: 3.4.6 - iOS version(s): 15, 16, 17
- CocoaPods/Carthage version (if applicable):
- Xcode version: 15.2
- Devices/Simulators affected: prod, devices
- Reproducible in the demo project? (Yes/No): no
- Related issues:
Describe the bug
I have just crashlogs from production
Thread 4 Crashed:
0 libobjc.A.dylib 0x000000018f1c4820 objc_msgSend + 32 (:-1)
1 SuperwallKit 0x0000000106256020 PurchasingCoordinator.completePurchase(of:result:) + 132 (PurchasingCoordinator.swift:125)
2 SuperwallKit 0x000000010624126c ProductPurchaserSK1.updatePurchaseCompletionBlock(for:purchaseDate:) + 44 (ProductPurchaserSK1.swift:219)
3 SuperwallKit 0x0000000106240855 closure #1 in ProductPurchaserSK1.paymentQueue(:updatedTransactions:) + 1 (ProductPurchaserSK1.swift:126)
4 SuperwallKit 0x000000010624292d partial apply for closure #1 in ProductPurchaserSK1.paymentQueue(:updatedTransactions:) + 1 (
Last Exception Backtrace:
0 CoreFoundation 0x1ab54e678 __exceptionPreprocess + 164 (NSException.m:249)
1 libobjc.A.dylib 0x1a3803c80 objc_exception_throw + 60 (objc-exception.mm:356)
2 CoreFoundation 0x1ab49b1a8 -[__NSArrayM removeObjectsInRange:] + 2284 (NSArrayM.m:0)
3 CoreFoundation 0x1ab49c27c -[NSMutableArray removeObject:] + 132 (NSMutableArray.m:272)
4 StoreKit 0x1d3d56e0c -[SKPaymentQueue removeLocalTransaction:] + 128 (SKPaymentQueue.m:1321)
5 StoreKit 0x1d3d5114c -[SKPaymentQueue finishTransaction:] + 356 (SKPaymentQueue.m:345)
6 SuperwallKit 0x1076a4d84 ProductPurchaserSK1.updatePurchaseCompletionBlock(for:purchaseDate:) + 396 (ProductPurchaserSK1.swift:213)
7 SuperwallKit 0x1076a4855 closure #1 in ProductPurchaserSK1.paymentQueue(:updatedTransactions:) + 1 (ProductPurchaserSK1.swift:126)
8 SuperwallKit 0x1076a692d partial apply for closure #1 in ProductPurchaserSK1.paymentQueue(_:updatedTransactions:) + 1 (
Thread 5 Crashed: 0 libobjc.A.dylib 0x0000000199ddac14 objc_retain + 16 (:-1) 1 SuperwallKit 0x0000000106bc4a74 DependencyContainer.makeStoreTransaction(from:) + 56 (DependencyContainer.swift:416) 2 SuperwallKit 0x0000000106c5d8c9 ProductPurchaserSK1.record(:) + 1 (ProductPurchaserSK1.swift:291) 3 SuperwallKit 0x0000000106c5f491 closure #1 in closure #1 in ProductPurchaserSK1.paymentQueue(:updatedTransactions:) + 1 4 SuperwallKit 0x0000000106c5f495 partial apply for closure #1 in closure #1 in ProductPurchaserSK1.paymentQueue(_:updatedTransactions:) + 1 5 SuperwallKit 0x0000000106c438f5 specialized thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out A) + 1 6 SuperwallKit 0x0000000106c43959 thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out A)specialized partial apply + 1 7 libswift_Concurrency.dylib 0x00000001acd8ba41 completeTaskWithClosure(swift::AsyncContext*, swift::SwiftError*) + 1 (Task.cpp:463)
Having the same issue on my end :( I'm wondering if you are using any other framework that manages monetization / implemented your own monetization system / using storekit 2?