Skip to main content
Solved

Error trying to connect SDK in expo managed project evaluating RNPurchases.isConfigured


Forum|alt.badge.img

hey guys good morning i am having this issue and couldn’t figure out. I am using the new SDK("react-native-purchases": "^4.5.3"), and also EXPO MANAGED FLOW("expo": "~44.0.0"), all updated.

evaluating RNPurchases.isConfigured

This is my code:

useEffect(() => {
    const connectRevenueCat = async () => {
      Purchases.setDebugLogsEnabled(true)
      if (Platform.OS === 'android') {
        console.log('entrou 3')
        await Purchases.setup('mypass', 'null')
      }
    }
    connectRevenueCat()
  const getPackages = async () => {
      try {
        const offerings = await Purchases.getOfferings()
        if (offerings.current !== null) {
          setProducts([offerings.current.availablePackages[0].product])
        }
      } catch (e) {
        // put this on screen to version 18
        setError(e?.message + 'O meu errinho do bem')
      }
    }
    getPackages()
  }, [])

Best answer by Zhu Liang

Update:

I managed to resolve the issue. Turns out you can’t use the default client (Expo Go app). Using a custom dev client works fine:

expo start --dev-client

Also need to do an initialization step in the code:

https://docs.revenuecat.com/docs/configuring-sdk#initialization

View original
Did this post help you find an answer to your question?

5 replies

Forum|alt.badge.img
  • Author
  • New Member
  • 3 replies
  • May 16, 2022

Any help would be appreciated, it is always getting inside the catch for some reason


Forum|alt.badge.img
  • Author
  • New Member
  • 3 replies
  • May 25, 2022

Anyone has an idea, what can it be?


Forum|alt.badge.img+3
  • Helper
  • 2 replies
  • May 30, 2022

I got the same error while following this guide: https://docs.revenuecat.com/docs/reactnative#managed-workflow

"expo": "^45.0.0",
"react-native-purchases": "^4.5.3"

 


Forum|alt.badge.img+3
  • Helper
  • 2 replies
  • Answer
  • May 30, 2022

Update:

I managed to resolve the issue. Turns out you can’t use the default client (Expo Go app). Using a custom dev client works fine:

expo start --dev-client

Also need to do an initialization step in the code:

https://docs.revenuecat.com/docs/configuring-sdk#initialization


Forum|alt.badge.img
  • Author
  • New Member
  • 3 replies
  • June 3, 2022
Zhu Liang wrote:

Update:

I managed to resolve the issue. Turns out you can’t use the default client (Expo Go app). Using a custom dev client works fine:

expo start --dev-client

Also need to do an initialization step in the code:

https://docs.revenuecat.com/docs/configuring-sdk#initialization

Hey man, yeah. The revenue cat connection really worked i guess using EAS flow, many thanks. Now i just having a small issue that i am receiving an empty object instead of my products but now the problem is other thing, something in the connection between revenue cat and android console probably. Thank you a lot and good luck on your projects too

 

Object {
  "all": Object {},
  "current": null,
}


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