Question

Error in console log first time running app with RevenueCat integration

  • 8 November 2022
  • 2 replies
  • 26 views

Badge +5

I have an existing app that I am upgrading to use RevenueCat.  If the current version of the app (non-RC version) is installed then you upgrade to the revenueCat integrated version in the logs I see the following error:

 

[Purchases] - DEBUG: ℹ️ CustomerInfo cache is stale, updating from network in foreground.

[Purchases] - DEBUG: ℹ️ Network operation 'GetCustomerInfoOperation' found with the same cache key 'FB1D5F41-6C6F-4...'. Skipping request.

[Purchases] - ERROR: 😿‼️ There was a problem related to the customer info. Requested a cached CustomerInfo but it's not available.

[Purchases] - ERROR: 😿‼️ There was a problem related to the customer info. Requested a cached CustomerInfo but it's not available.

 

I’m guessing this error is just shown because I asked for a cached version of the CustomerInfo in my code but there wasn’t anything in the cache?

 

I’m wondering if this error is benign or something I need to fix?  Seems strange this would be logged as an “ERROR” if it wasn’t important vs. just being a warning or an info. Just want to verify.

 

Thanks


2 replies

Userlevel 6
Badge +8

Hey @mrd!

If you’re fetching CustomerInfo with only a fetch policy of `cache`, and there isn’t anything in the cache, you’ll hit that error. You can probably ignore it, but you’d never fetch real data if there isn’t a cache available. I’d recommend fetching with the default policy to avoid it.

Let me know if you have any other questions!

Badge +5

Hi @cody - thanks for the reply. There are a couple of places in the app where the code isn’t async so for example I’m building some settings UI when the user clicked to open the settings menu and having up to date subscription info isn’t really necessary but if we have it I will use it, so in those cases I just used .cache instead of having to potentially make the code async and show a UI spinner etc. If the user digs in deeper and clicks on the subscription menu item then we will fetch the latest info and show some loading UI if necessary.

 

Sounds like it is not an issue, thanks for clarifying.

Reply