Question

Empty offerings on android emulator in dev mode - should it be possible for this to work?

  • 1 November 2022
  • 1 reply
  • 41 views

Badge +4

Hi, I appreciate this question has been asked a lot, but I’ve looked through the other answers and none match my case.

 

I’ve looked at:

 

I am using the Android emulator and I want to view my paywall with offerings. I am getting the following logs:

 DEBUG: ℹ️ API request started: GET /subscribers/ID/offerings
2022-11-01 18:51:38.254 5392-6969/com.app D/[Purchases] - DEBUG: ℹ️ API request completed with status: GET /subscribers/ID/offerings 304
2022-11-01 18:51:38.260 5392-6969/com.app D/[Purchases] - DEBUG: ℹ️ Requesting products from the store with identifiers: monthly_subscription_packs, yearly_subscription_packs, year1_30pct_off
2022-11-01 18:51:38.261 5392-6969/com.app D/[Purchases] - DEBUG: ℹ️ Requesting products from the store with identifiers: monthly_subscription_a yearly_subscription_a, year1_30pct_off
2022-11-01 18:51:38.695 5392-5392/com.app D/[Purchases] - DEBUG: ℹ️ Starting connection for com.android.billingclient.api.BillingClientImpl@625820f
2022-11-01 18:51:38.697 5392-5392/com.fapp D/[Purchases] - DEBUG: ℹ️ Starting connection for com.android.billingclient.api.BillingClientImpl@625820f
2022-11-01 18:51:38.713 5392-5392/com.appW/[Purchases] - WARN: 🤖‼️ Billing is not available in this device. DebugMessage: Billing service unavailable on device.. ErrorCode: BILLING_UNAVAILABLE.
2022-11-01 18:51:38.714 5392-5392/ W/[Purchases] - WARN: 🤖‼️ Billing is not available in this device. DebugMessage: Billing service unavailable on device.. ErrorCode: BILLING_UNAVAILABLE.
2022-11-01 18:51:38.721 5392-5392/ E/[Purchases] - ERROR: 🤖‼️ The device or user is not allowed to make the purchase.
2022-11-01 18:51:38.721 5392-5392/E/[Purchases] - ERROR: 🤖‼️ Error fetching offerings - PurchasesError(code=PurchaseNotAllowedError, underlyingErrorMessage=Billing is not available in this device. DebugMessage: Billing service unavailable on device.. ErrorCode: BILLING_UNAVAILABLE., message='The device or user is not allowed to make the purchase.')
2022-11-01 18:51:38.721 5392-5392 E/[Purchases] - ERROR: 🤖‼️ The device or user is not allowed to make the purchase.

 

Firstly, is it possible to fetch offerings in the Android emulator?

Assuming it is, some more info:

  • Purchases work perfectly in production, plus also locally with a real device. So I don’t think it can be a Play Store config problem?
  • My emulator is API 33 and Android version 12
  • React Native 0.67 & react-native-purchases 4.6.1

Anything else I can check that would help understand the problem


1 reply

Userlevel 5
Badge +8

Hey @MattFin,

We generally don’t recommend testing in simulators/emulators (apart from StoreKit Testing on iOS). Like the error mentioned: Billing is not available on this device.

That being said, I’d recommend ensuring you have the Play Store installed on the emulator and are signed into the correct Google account that is able to test purchases - that might work. Good luck!

Reply