Skip to main content
Question

Calling customerInfo() never returns and doesn't throw error

  • September 5, 2025
  • 1 reply
  • 31 views

Forum|alt.badge.img

We noticed a weird issue that is happening to some users. When we present the paywall we are using the loaded offerings and if they are not loaded we wait for them to be refreshed.

 

In our code we first fetch customerInfo and then the offerings. By looking at the logs from one of our users call to the customerInfo() never seems to end - it doesn’t return nor throw an error.

public func refreshData() async throws {
logger.log("Refresh data")
try await refreshCustomerInfo()
try await refreshProducts()
}

inside the refreshCustomerInfo() we are logging everything but only Begin refreshing customer info seems to be included in the logs.

public func refreshCustomerInfo() async throws {
logger.log("Begin refreshing customer info")
do {
customerInfo = try await purchases.customerInfo()
logger.log("Refreshing customer info succeeded. Bought: \(purchased)")
} catch let error {
logger.error("Refreshing customer info failed", error)
throw PurchaseError(error as? ErrorCode) ?? error
}
}

Apart from `Begin refreshing customer info` doesn’t seem to be called since the offerings are not refreshed either. Here a screenshot of the filtered logs:

I guess one workaround for now is to move products refresh before the customer info. Looks like when the offerings are fetched but customer info fails for some reason we will be able to show the available products but when user wants to purchase it they will need to sign in to their Apple ID.

 

What might be causing this weird issue with customer info not being fetched correctly? Why no error is thrown? I guess there is some kind of timeout for this request? We’re currently using 5.32 but will upgrade to the latest version. Didn’t see any mentions of `customerInfo` in the release notes on github though.

This post has been closed for comments

1 reply

guilherme
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • September 9, 2025

Hey ​@michał-stoic ,

Looking at the logs and making sure of the full flow, how is the refreshData() being called? As there are quite a few happening in succession and since it’s in an async call, wondering if it’s getting triggered multiple times and then never returning to the main thread.

Would it be possible to enable the Debug Logs of the SDK? That will give us a bit more visibility on what is happening in parallel: https://www.revenuecat.com/docs/test-and-launch/debugging 

To sanity check, the customer info can be retrieved in multiple ways:

// Using Swift Concurrency
do {
let customerInfo = try await Purchases.shared.customerInfo()
} catch {
// handle error
}

// Using Completion Blocks
Purchases.shared.getCustomerInfo { (customerInfo, error) in
// access latest customerInfo

 Context here

Could you give that completion block a try too? To see if that helps at all, maybe from a test button tap? If this completes while your await purchases.customerInfo() hangs, it’s almost certainly a Task being cancelled by view lifecycle. 

Also, could you share:

  • the mentioned debug logs from the SDK; 

  • your test environment: device vs. simulator, iOS version, Xcode version.

  • where refreshData() is invoked (a code snippet could help).

Thanks,