purchases-ios: Fatal Exception in `RCPurchases.m`
We’re seeing a Fatal Exception in our latest app version.
Details
- iOS v13.3
- App in foreground state
- Crashlytics assumes device is jailbroken
- SDK
revenuecat/purchases-ios v3.2.2, installed through Carthage
Stack trace
Fatal Exception: NSInvalidArgumentException
*** -[__NSDictionaryM setObject:forKeyedSubscript:]: key cannot be nil
-[RCPurchases purchaseProduct:withPayment:withPresentedOfferingIdentifier:completion:]
0 CoreFoundation 0x19b5a096c __exceptionPreprocess
1 libobjc.A.dylib 0x19b2b9028 objc_exception_throw
2 CoreFoundation 0x19b5f9500 -[__NSCFString characterAtIndex:].cold.1
3 CoreFoundation 0x19b6035a0 -[__NSDictionaryM setObject:forKeyedSubscript:].cold.2
4 CoreFoundation 0x19b47b190 -[__NSDictionaryM setObject:forKeyedSubscript:]
5 Purchases 0x1054aa4b0 -[RCPurchases purchaseProduct:withPayment:withPresentedOfferingIdentifier:completion:] + 558 (RCPurchases.m:558)
6 Purchases 0x1054a9f08 -[RCPurchases purchasePackage:withCompletionBlock:] + 485 (RCPurchases.m:485)
7 AppName 0x104f2d738 closure #1 in RCPurchases.purchase(_:) + 134 (PurchasesExtension.swift:134)
8 AppName 0x105055ee8 partial apply for thunk for @escaping @callee_guaranteed (@guaranteed @escaping @callee_guaranteed (@guaranteed SingleEvent<RCOfferings>) -> ()) -> (@out Disposable)
9 RxSwift 0x1061c99f4 partial apply for closure #1 in static PrimitiveSequenceType<>.create(subscribe:) + 39 (Single.swift:39)
10 RxSwift 0x10619946c AnonymousObservable.run<A>(_:cancel:) + 60 (Create.swift:60)
11 RxSwift 0x1061a6f64 Producer.subscribe<A>(_:) + 18 (Producer.swift:18)
...
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (8 by maintainers)
The PR is already merged, we’ll mst likely make a build with it tomorrow
I’m having a similar issue. We have an existing manual implementation for handling in-app purchases. We integrated RevenueCat in observer mode with the intention of sending events straight to Mixpanel. The app occasionally crashes at launch, and also occasionally when making a purchase. On 3.2.2 via cocoapods.
Error is -
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1]'Logs leading up to the crash. This is when I actively make a purchase on the device:
@aboedo does this seem related?