Question

Flutter Purchases.getPurchaserInfo() hangs and never returns in TestFlight [Repost]

  • 21 February 2022
  • 1 reply
  • 72 views

Badge +1

[Reposting in SDK’s as I accidentally posted in General]

I’m trying to push my app out for Beta testing but when I upload a build to TestFlight and run it the call to Purchases.getPurchaserInfo() hangs and never returns. It works on the same device when just running outside of TestFlight. 

I can run through the whole IAP flow when running on this device. But as soon as I push to TestFlight and run it through there it just hangs waiting to get purchaser info. 

 

I think these are the logs needed:

default    12:08:37.873277-0500    Runner    [Purchases] - DEBUG: ℹ️ There are no requests currently running, starting request GET /subscribers/$RCAnonymousID0X0P+0f621ae3fbd374db9b96d0b6d31ea5d20
default    12:08:37.873327-0500    Runner    [Purchases] - DEBUG: ℹ️ API request started: GET /v1/subscribers/$RCAnonymousID:f621ae3fbd374db9b96d0b6d31ea5d20
default    12:08:37.883570-0500    Runner    [Purchases] - DEBUG: ℹ️ There's a request currently running and 0 requests left in the queue, queueing GET /subscribers/$RCAnonymousID0X0P+0f621ae3fbd374db9b96d0b6d31ea5d20/offerings
default    12:08:37.944968-0500    Runner    [Purchases] - DEBUG: ℹ️ Vending PurchaserInfo from cache.
default    12:08:38.072597-0500    Runner    [Purchases] - DEBUG: ℹ️ applicationDidBecomeActive
default    12:08:38.111412-0500    Runner    [Purchases] - DEBUG: ℹ️ API request completed with status: GET /v1/subscribers/$RCAnonymousID:f621ae3fbd374db9b96d0b6d31ea5d20 304
default    12:08:38.116900-0500    Runner    [Purchases] - DEBUG: ℹ️ Serial request done: GET /subscribers/$RCAnonymousID0X0P+0f621ae3fbd374db9b96d0b6d31ea5d20, 1 requests left in the queue
default    12:08:38.117369-0500    Runner    [Purchases] - DEBUG: ℹ️ Starting the next request in the queue, <RCHTTPRequest: httpMethod=GET
path=/subscribers/$RCAnonymousID0X0P+0f621ae3fbd374db9b96d0b6d31ea5d20/offerings
requestBody=(null)
headers={
    Authorization = "XXXXXX";
}
retried=0
>
default    12:08:38.154050-0500    Runner    [Purchases] - DEBUG: ℹ️ API request completed with status: GET /v1/subscribers/$RCAnonymousID:f621ae3fbd374db9b96d0b6d31ea5d20/offerings 304
default    12:08:38.154144-0500    Runner    [Purchases] - DEBUG: ℹ️ Requesting products from the store with identifiers: {(
    "mylomoney_monthly_599"
)}
default    12:08:38.154505-0500    Runner    [Purchases] - DEBUG: ℹ️ Serial request done: GET /subscribers/$RCAnonymousID0X0P+0f621ae3fbd374db9b96d0b6d31ea5d20/offerings, 0 requests left in the queue
default    12:08:38.187735-0500    Runner    [Purchases] - DEBUG: ℹ️ Products request finished.
default    12:08:38.187908-0500    Runner    [Purchases] - DEBUG: 💰 Retrieved SKProducts:
default    12:08:38.187958-0500    Runner    [Purchases] - DEBUG: 💰 mylomoney_monthly_599 - <SKProduct: 0x28144cf50>
default    12:08:38.188026-0500    Runner    [Purchases] - DEBUG: ℹ️ 1 completion handlers waiting on products


1 reply

Userlevel 5
Badge +8

Hey @Mitch Dennett,

 

Thanks for reporting! 

🧐 Could you try uninstalling the app before installing the TestFlight version, and seeing if you get the same result? 

My reasoning is that from the debug logs, it looks like the SDK does indeed fetch purchaserInfo, but the backend returns a 304, indicating that the SDK should be using a cached e-tag. 

I wonder if the e-tag might not be getting correctly picked up after changing versions. 

 

Reply