Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paywall shows the default template on Android #1178

Open
5 tasks done
foyarash opened this issue Feb 14, 2025 · 7 comments
Open
5 tasks done

Paywall shows the default template on Android #1178

foyarash opened this issue Feb 14, 2025 · 7 comments
Labels
bug Something isn't working

Comments

@foyarash
Copy link

Describe the bug

I am using the RevenueCatUI.Paywall component on a route. On iOS, it correctly displays my only template configured on my RC's project. However, on Android, it displays the default template.

Apparently, from the logs:

Could not process value for variable 'sub_offer_duration' for package 'my_package_name'. Please check that the product for that package matches the requirements for that variable. Defaulting to empty string.

I am not rendering the sub_offer_duration in my template.

  1. Environment
    1. Platform: Android
    2. SDK version: 8.5.3
    3. OS version: Android 14
    4. Xcode/Android Studio version:
    5. React Native version: 0.74.5
  2. Debug logs that reproduce the issue
W  Displaying default template because paywall is missing for offering 'my_offering'.
W  Displaying default template due to validation errors.
W  Could not process value for variable 'sub_offer_duration' for package 'my_package_1'. Please check that the product for that package matches the requirements for that variable. Defaulting to empty string.
W  Could not process value for variable 'sub_offer_duration' for package 'my_package_2'. Please check that the product for that package matches the requirements for that variable. Defaulting to empty string.
  1. Steps to reproduce, with a description of expected vs. actual behavior

Open a Paywall on Android, with packages including consumable items. On iOS, it displays the configured template. On Android it displays the default template, while it should display the same as iOS.

@foyarash foyarash added the bug Something isn't working label Feb 14, 2025
@RCGitBot
Copy link
Contributor

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

@MarkVoVN
Copy link

I currently facing the same issue, waiting for any updates to this

@Sid110307
Copy link

Facing the same issue. Would be great if the team updates on this

@Energieman
Copy link

I also had this issue.
Upgrade both to the latest and run build
as of today 18th Feb, 2025, the latest are

"react-native-purchases": "^8.6.1",
"react-native-purchases-ui": "^8.6.1",

@Jethro87
Copy link

Hi all, thanks for reporting. Can you all clarify if the issue here is for Paywalls V1 or V2? If V2, please note that you need to be running >8.6.0.

Also, can you attach full debug logs from application start to opening the paywall? Thanks.

@Sid110307
Copy link

Sid110307 commented Feb 21, 2025

Hi, we are using V2 (SDK 8.11.0)

 LOG  DEBUG ℹ️ Debug logging enabled
 LOG  DEBUG ℹ️ SDK Version - 8.11.0
 LOG  DEBUG ℹ️ Package name - <redacted>
 LOG  DEBUG ℹ️ Purchases configured with response verification: DISABLED
 LOG  DEBUG 👤 Identifying App User ID: <redacted>
 LOG  DEBUG ℹ️ Deleting old synced subscriber attributes that don't belong to <redacted>
 LOG  DEBUG ℹ️ Listener set
 LOG  DEBUG ℹ️ Sending latest CustomerInfo to listener.
 LOG  DEBUG ℹ️ Starting connection for com.android.billingclient.api.BillingClientImpl@8810a0b
 LOG  DEBUG ℹ️ App foregrounded
 LOG  DEBUG ℹ️ CustomerInfo cache is stale, updating from network in foreground.
 LOG  DEBUG Retrieving customer info with policy: FETCH_CURRENT
 LOG  DEBUG ℹ️ Updating pending purchase queue
 LOG  DEBUG ℹ️ Offerings cache is stale, updating from network in foreground
 LOG  DEBUG ℹ️ Querying purchases
 LOG  DEBUG 😻 Start Offerings update from network.
 LOG  DEBUG Request already scheduled with jitter delay, adding existing callbacks to unjittered request with key: BackgroundAwareCallbackCacheKey(cacheKey=[/subscribers/<redacted>/offerings], appInBackground=false)
 LOG  DEBUG ℹ️ Updating pending purchase queue
 LOG  DEBUG ℹ️ No subscriber attributes to synchronize.
 LOG  DEBUG ℹ️ Starting connection for com.android.billingclient.api.BillingClientImpl@8810a0b
 LOG  DEBUG ℹ️ Billing Service Setup finished for com.android.billingclient.api.BillingClientImpl@8810a0b
 LOG  DEBUG ℹ️ Updating pending purchase queue
 LOG  DEBUG ℹ️ Cleaning previously sent tokens
 LOG  DEBUG ℹ️ Tokens already posted: []
 LOG  DEBUG ℹ️ Saving tokens []
 LOG  DEBUG ℹ️ Tokens already posted: []
 LOG  DEBUG ℹ️ No pending purchases to sync
 LOG  DEBUG Request already scheduled with jitter delay, adding existing callbacks to unjittered request with key: BackgroundAwareCallbackCacheKey(cacheKey=[/subscribers/<redacted>], appInBackground=false)
 LOG  DEBUG Billing connected with country code: IN
 LOG  DEBUG API request started: GET /subscribers/<redacted>/offerings
 LOG  DEBUG API request completed with status: GET /subscribers/<redacted>/offerings 304
 LOG  DEBUG ℹ️ Requesting products from the store with identifiers: premium
 LOG  DEBUG ℹ️ Querying purchases
 LOG  DEBUG ℹ️ Querying purchases
 LOG  DEBUG ℹ️ Cleaning previously sent tokens
 LOG  DEBUG ℹ️ Products request finished for premium
 LOG  DEBUG ℹ️ Tokens already posted: []
 LOG  DEBUG ℹ️ Saving tokens []
 LOG  DEBUG ℹ️ Tokens already posted: []
 LOG  DEBUG 💰 Retrieved productDetailsList: ProductDetails{jsonString='{"productId":"premium","type":"subs","title":"TestPremium (MyApp)","name":"TestPremium","localizedIn":["en-GB"],"skuDetailsToken":"AEuhp4K9eKLrLwOcVj1RwY-iMjx9le9tp6LG0CcCUr_VDOyVnAIIJfNtUT-KY3Y0JbY="
,"subscriptionOfferDetails":[{"offerIdToken":"AWOstcaQbYh9gRatUwtYz4IR6sFgnH9InYqVbjbrMnZ\/7WOBzxN3vaGGb9ru2zOJ01xSkOkMjWNPX+OKTXkuII443g==","basePlanId
":"premium-1m","pricingPhases":[{"priceAmountMicros":189000000,"priceCurrencyCode":"INR","formattedPrice":"₹189.00","billingPeriod":"P1M","recurrenceMod
e":1}],"offerTags":[]},{"offerIdToken":"AWOstcZSfNjOBTdd5GHh2IJYYGLWwXcOsq\/8DuJqNvU8X1kSbZrPgKObFgKr0OU0uc1Io6vq5Xfj6C\/WdjnHMPa+cw==","basePlanId":"pr
emium-3m","pricingPhases":[{"priceAmountMicros":499000000,"priceCurrencyCode":"INR","formattedPrice":"₹499.00","billingPeriod":"P3M","recurrenceMode":1}
],"offerTags":[]},{"offerIdToken":"AWOstcYTjkE\/y3k5r08wBHw9PrRr1jFsKTxA9KufCHVSMYxX+28jEX95bCzZ+K2+FzYyKPOaEkInbUp5FmZsyRYMKQ==","basePlanId":"premium-
12m","pricingPhases":[{"priceAmountMicros":1899000000,"priceCurrencyCode":"INR","formattedPrice":"₹1,899.00","billingPeriod":"P1Y","recurrenceMode":1}],
"offerTags":[]}]}', parsedJson={"productId":"premium","type":"subs","title":"TestPremium (MyApp)","name":"TestPremium","
localizedIn":["en-GB"],"skuDetailsToken":"AEuhp4K9eKLrLwOcVj1RwY-iMjx9le9tp6LG0CcCUr_VDOyVnAIIJfNtUT-KY3Y0JbY=","subscriptionOfferDetails":[{"offerIdTok
en":"AWOstcaQbYh9gRatUwtYz4IR6sFgnH9InYqVbjbrMnZ\/7WOBzxN3vaGGb9ru2zOJ01xSkOkMjWNPX+OKTXkuII443g==","basePlanId":"premium-1m","pricingPhases":[{"priceAm
ountMicros":189000000,"priceCurrencyCode":"INR","formattedPrice":"₹189.00","billingPeriod":"P1M","recurrenceMode":1}],"offerTags":[]},{"offerIdToken":"A
WOstcZSfNjOBTdd5GHh2IJYYGLWwXcOsq\/8DuJqNvU8X1kSbZrPgKObFgKr0OU0uc1Io6vq5Xfj6C\/WdjnHMPa+cw==","basePlanId":"premium-3m","pricingPhases":[{"priceAmountM
icros":499000000,"priceCurrencyCode":"INR","formattedPrice":"₹499.00","billingPeriod":"P3M","recurrenceMode":1}],"offerTags":[]},{"offerIdToken":"AWOstc
YTjkE\/y3k5r08wBHw9PrRr1jFsKTxA9KufCHVSMYxX+28jEX95bCzZ+K2+FzYyKPOaEkInbUp5FmZsyRYMKQ==","basePlanId":"premium-12m","pricingPhases":[{"priceAmountMicros
":1899000000,"priceCurrencyCode":"INR","formattedPrice":"₹1,899.00","billingPeriod":"P1Y","recurrenceMode":1}],"offerTags":[]}]}, productId='premium', p
roductType='subs', title='TestPremium (MyApp)', productDetailsToken='AEuhp4K9eKLrLwOcVj1RwY-iMjx9le9tp6LG0CcCUr_VDOyVnAIIJfN
tUT-KY3Y0JbY=', subscriptionOfferDetails=[com.android.billingclient.api.ProductDetails$SubscriptionOfferDetails@c46b074, com.android.billingclient.api.ProductDetails$SubscriptionOfferDetails@194a99d, com.android.billingclient.api.ProductDetails$SubscriptionOfferDetails@4683e12]}
 LOG  DEBUG ℹ️ No pending purchases to sync
 LOG  DEBUG ℹ️ Cleaning previously sent tokens
 LOG  DEBUG ℹ️ Tokens already posted: []
 LOG  DEBUG ℹ️ Saving tokens []
 LOG  DEBUG ℹ️ Tokens already posted: []
 LOG  DEBUG ℹ️ No pending purchases to sync
 LOG  DEBUG ℹ️ Building offerings response with 1 products
 LOG  DEBUG OfferingImagePreDownloader: starting image download
 LOG  DEBUG API request started: GET /subscribers/<redacted>
 LOG  DEBUG API request completed with status: GET /subscribers/<redacted> 200
 LOG  DEBUG 😻 CustomerInfo updated from network.
 LOG  DEBUG ℹ️ CustomerInfo updated, sending to listener.
 LOG  DEBUG Retrieving customer info with policy: CACHED_OR_FETCHED
 LOG  DEBUG ℹ️ Vending CustomerInfo from cache.
 LOG  DEBUG ℹ️ Checking if cache is stale AppInBackground false

Also in iOS, another line is logged: Could not determine price format because price string is incompatible.

@theprashant-one
Copy link

Facing the exact same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants