App hangs while loading customer info
- [x] I have updated Purchases SDK to the latest version
- [x] I have read the Contribution Guidelines
- [x] I have searched the Community
- [x] I have read docs.revenuecat.com
- [x] I have searched for existing Github issues
Describe the bug A clear and concise description of what the bug is. The more detail you can provide the faster our team will be able to triage and resolve the issue. Do not remove any of the steps from the template below. If a step is not applicable to your issue, please leave that step empty.
-
Environment
- Platform:
- SDK version:
- StoreKit version:
- [ ] StoreKit 1 (default on versions <5.0.0. Can be enabled in versions >=5.0.0 with
.with(storeKitVersion: .storeKit1)) - [x] StoreKit 2 (default on versions >=5.0.0)
- [ ] StoreKit 1 (default on versions <5.0.0. Can be enabled in versions >=5.0.0 with
- OS version:
- Xcode version:
- Device and/or simulator:
- [x] Device
- [ ] Simulator
- Environment:
- [x] Sandbox
- [ ] TestFlight
- [ ] Production
- How widespread is the issue. Percentage of devices affected. Once every 3 run attempts
-
Debug logs that reproduce the issue. Complete logs with
Purchases.logLevel = .verbosewill help us debug this issue.
Thread 1 Queue : com.apple.main-thread (serial)
#0 0x00000001d60b4788 in mach_msg2_trap ()
#1 0x00000001d60b7e98 in mach_msg2_internal ()
#2 0x00000001d60b7db0 in mach_msg_overwrite ()
#3 0x00000001d60b7bfc in mach_msg ()
#4 0x0000000184a03804 in __CFRunLoopServiceMachPort ()
#5 0x0000000184a02eb0 in __CFRunLoopRun ()
#6 0x0000000184a55284 in CFRunLoopRunSpecific ()
#7 0x00000001d1c954c0 in GSEventRunModal ()
#8 0x000000018759a674 in -[UIApplication _run] ()
#9 0x00000001871c0e88 in UIApplicationMain ()
#10 0x0000000189356ef8 in closure #1 (Swift.UnsafeMutablePointer<Swift.Optional<Swift.UnsafeMutablePointer<Swift.Int8>>>) -> Swift.Never in SwiftUI.KitRendererCommon(Swift.AnyObject.Type) -> Swift.Never ()
#11 0x0000000189356e28 in SwiftUI.runApp<τ_0_0 where τ_0_0: SwiftUI.App>(τ_0_0) -> Swift.Never ()
#12 0x0000000189356d0c in static SwiftUI.App.main() -> () ()
#14 0x00000001aac99de8 in start ()
Thread 4 Queue : com.apple.root.user-initiated-qos.cooperative (concurrent)
#0 0x00000001d60bab78 in __psynch_mutexwait ()
#1 0x000000020f6bd8a0 in _pthread_mutex_firstfit_lock_wait ()
#2 0x000000020f6bd250 in _pthread_mutex_firstfit_lock_slow ()
#3 0x000000010f3b3f98 in Lock.perform<Foundation.Data?>(_:) at /Users/user/Library/Developer/Xcode/DerivedData/MyProj-gipnbzphogbolrfbaufhhpsuckef/SourcePackages/checkouts/purchases-ios/Sources/Misc/Concurrency/Lock.swift:41
#4 0x000000010f3b2ca4 in Atomic.withValue<RevenueCat.CustomerInfoManager.Data>(_:) at /Users/user/Library/Developer/Xcode/DerivedData/MyProj-gipnbzphogbolrfbaufhhpsuckef/SourcePackages/checkouts/purchases-ios/Sources/Misc/Concurrency/Atomic.swift:81
#5 0x000000010f30a528 in CustomerInfoManager.withData<Foundation.Data?>(_:) at /Users/user/Library/Developer/Xcode/DerivedData/MyProj-gipnbzphogbolrfbaufhhpsuckef/SourcePackages/checkouts/purchases-ios/Sources/Identity/CustomerInfoManager.swift:491
#6 0x000000010f30c280 in CustomerInfoManager.cachedCustomerInfo(appUserID:) at /Users/user/Library/Developer/Xcode/DerivedData/MyProj-gipnbzphogbolrfbaufhhpsuckef/SourcePackages/checkouts/purchases-ios/Sources/Identity/CustomerInfoManager.swift:196
#7 0x000000010f30b28c in CustomerInfoManager.customerInfo(appUserID:fetchPolicy:completion:) at /Users/user/Library/Developer/Xcode/DerivedData/MyProj-gipnbzphogbolrfbaufhhpsuckef/SourcePackages/checkouts/purchases-ios/Sources/Identity/CustomerInfoManager.swift:145
#8 0x000000010f6c0a08 in Purchases.getCustomerInfo(fetchPolicy:completion:) at /Users/user/Library/Developer/Xcode/DerivedData/MyProj-gipnbzphogbolrfbaufhhpsuckef/SourcePackages/checkouts/purchases-ios/Sources/Purchasing/Purchases/Purchases.swift:970
#9 0x000000010f3bc1a8 in closure #1 in Purchases.customerInfoAsync(fetchPolicy:) at /Users/user/Library/Developer/Xcode/DerivedData/MyProj-gipnbzphogbolrfbaufhhpsuckef/SourcePackages/checkouts/purchases-ios/Sources/Misc/Concurrency/Purchases+async.swift:136
#10 0x000000010f2ea364 in closure #1 in withUnsafeThrowingContinuation<RevenueCat.CustomerInfo>(isolation:_:) ()
#11 0x000000010f2e8268 in withUnsafeThrowingContinuation<RevenueCat.CustomerInfo>(isolation:_:) ()
#12 0x000000010f3bbfcc in Purchases.customerInfoAsync(fetchPolicy:) at /Users/user/Library/Developer/Xcode/DerivedData/MyProj-gipnbzphogbolrfbaufhhpsuckef/SourcePackages/checkouts/purchases-ios/Sources/Misc/Concurrency/Purchases+async.swift:135
#13 0x000000010f6c0f90 in Purchases.customerInfo(fetchPolicy:) at /Users/user/Library/Developer/Xcode/DerivedData/MyProj-gipnbzphogbolrfbaufhhpsuckef/SourcePackages/checkouts/purchases-ios/Sources/Purchasing/Purchases/Purchases.swift:981
#14 0x000000010f6c0dd4 in Purchases.customerInfo() at /Users/user/Library/Developer/Xcode/DerivedData/MyProj-gipnbzphogbolrfbaufhhpsuckef/SourcePackages/checkouts/purchases-ios/Sources/Purchasing/Purchases/Purchases.swift:977
#15 0x000000010e789b28 in protocol witness for Purchaser.customerInfo() in conformance Purchases ()
#16 0x000000010e74d4c0 in customerInfo()
#17 0x000000010e750310 in protocol witness for customerInfo()
#18 0x000000010e79abd0 in getCustomerInfo()
#19 0x000000010e79c9d8 in protocol witness for getCustomerInfo()
#20 0x000000010e6bbf54 in closure #1 in fetchUserSubscriptions()
#21 0x000000010e6bde8c in partial apply for closure #1 in fetchUserSubscriptions() ()
#22 0x000000010e6c044c in thunk for @escaping @isolated(any) @callee_guaranteed @async () -> (@out A) ()
#23 0x000000010e6c16dc in thunk for @escaping @isolated(any) @callee_guaranteed @async () -> (@out A)partial apply ()
-
Steps to reproduce, with a description of expected vs. actual behavior
-
Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.) The app hangs, logs attached
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
Hi @prodigel, do you see the issue consistently? Would you mind sharing how do you initialize the SDK and how are you fetching the customer info?