Skip to main content
Question

Android issue: There was a problem with the store. No error number returned

  • September 6, 2023
  • 1 reply
  • 369 views

Forum|alt.badge.img+1

Hello

I need help debugging further

I’m trying to get more error details for the fallowing error

“[Error: There was a problem with the store.]”

I found the fallowing article 

It explains how to find the issue by looking at the error type

however I’m not getting any additional error details other than What I showed above.

When I fallow the suggested error handling link
https://www.revenuecat.com/docs/errors#android-errors

and I try to handle the `onError` promise, It simply tells me that `onError` is not define in the promise



4 issue types are suggested to look into

I’m using react native and here is the function I’m using to try and get the errors:
 


    useEffect(() => {
      ;(async function load() {
        try {
          console.log("Setting Debug Level")
          await Purchases.setLogLevel(Purchases.LOG_LEVEL.DEBUG);
          console.log("Setting API Key")
          await Purchases.configure({apiKey: "MY_KEY_IS_REMOVED_FOR_SAFETY"})
          console.log("Getting Offecrings")
          Purchases.getOfferings()
          .onError((e)=>{
            console.log("Error Happened")
            console.log(e)
          })
          .then(()=>{
            if (offerings.current !== null) {  
                // Display current offering with offerings.current
                console.log("Offrings: ", offerings.current)
            }
          })
      } catch (e) {
        console.log("No Offerings found")
        console.log(e)

      }})()
    }, [])


How can I further debug this?

1 reply

sharif
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • 513 replies
  • September 8, 2023

Hello,

In your code you can simply await on getOfferings like this:

// ...
console.log("Getting Offecrings")
const offerings = await Purchases.getOfferings();
offerings.current !== null) {
  // Display current offering with offerings.current
  console.log("Offrings: ", offerings.current)
}
// ...

Since the code is already in a try-catch, you don’t need the onError (if you still did want to use the .then pattern, then instead of .onError you should use .catch).

That should hopefully get rid of that type error you’re getting and allow you to log the error code.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings