Open mihailapuste opened 1 week ago
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
Can you please share some logs from the LogCat so we can see what's going on?
Thank you!
Can you please share some logs from the LogCat so we can see what's going on?
Thank you!
@vegaro
Hi there So here are the relevant logcat logs. Since the app hangs, there were no logs past these that were relevant as far as I could tell.
2024-09-17 18:03:52.203 28868-29015 elabs.app.de com.group.app.dev E Invalid ID 0x00000223.
2024-09-17 18:03:52.207 28868-29102 ReactNativeJS com.group.app.dev I 'begin_checkout', { product_id: 'com.group.app.dev.premium.subscription.annually.promo2:p1y',
has_promo: false,
promo_code: null,
intro_screen_type: 'default',
purchase_state: 'INTRO',
hard_paywall_enabled: false,
trial_period: null,
duration: 'ANNUAL',
offering: 'promo2',
has_referral_user: false,
ios_promotional_offer_product: null,
available_discounts: undefined,
selected_discount: undefined,
has_completed_onboarding: false,
subscription_screen_placement: 'ONBOARDING_GET_STARTED',
source: 'GetStartedScreen' }
2024-09-17 18:03:52.247 28868-29104 unknown:ReactNative com.group.app.dev E Caught NullPointerException when dispatching message in MessageQueueThreadHandler. This is likely caused by runnable(msg.callback) being nulled in Android Handler after dispatching and before handling (see T170239922 for more details).Currently we observe that it only happen once which is during initialisation. Due to fixing probably involve Android System code, we decide to ignore here for now and print an error message for debugging purpose in case this cause more serious issues in future.
2024-09-17 18:03:54.156 28868-29443 BufferPoolAccessor2.0 com.group.app.dev D bufferpool2 0x6e587b1a98 : 5(8417280 size) total buffers - 5(8417280 size) used buffers - 642/648 (recycle/alloc) - 6/649 (fetch/transfer)
2024-09-17 18:03:54.535 28868-29440 CCodecBufferChannel com.group.app.dev D [c2.android.aac.decoder#901] DEBUG: elapsed: n=6 [in=0 pipeline=0 out=2]
2024-09-17 18:03:54.535 28868-29440 CCodecBufferChannel com.group.app.dev D [c2.qti.avc.decoder#511] DEBUG: elapsed: n=28 [in=0 pipeline=0 out=24]
2024-09-17 18:03:54.918 28868-29452 BufferPoolAccessor2.0 com.group.app.dev D bufferpool2 0x6e587de528 : 5(40960 size) total buffers - 1(8192 size) used buffers - 1284/1289 (recycle/alloc) - 6/1280 (fetch/transfer)
2024-09-17 18:03:57.844 28868-29440 CCodecBufferChannel com.group.app.dev D [c2.qti.avc.decoder#511] DEBUG: elapsed: n=28 [in=0 pipeline=0 out=24]
2024-09-17 18:03:57.939 28868-29452 CCodec com.group.app.dev I state->set(FLUSHING)
2024-09-17 18:03:57.940 28868-29452 CCodec com.group.app.dev I state->set(FLUSHED)
2024-09-17 18:03:57.941 28868-29420 MediaCodec com.group.app.dev D keep callback message for reclaim
2024-09-17 18:03:57.941 28868-29452 CCodec com.group.app.dev I state->set(RESUMING)
2024-09-17 18:03:57.942 28868-29452 CCodecConfig com.group.app.dev I query failed after returning 19 values (BAD_INDEX)
2024-09-17 18:03:57.942 28868-29452 Codec2Client com.group.app.dev W query -- param skipped: index = 1342179345.
2024-09-17 18:03:57.942 28868-29452 Codec2Client com.group.app.dev W query -- param skipped: index = 2415921170.
2024-09-17 18:03:57.942 28868-29452 Codec2Client com.group.app.dev W query -- param skipped: index = 1610614798.
2024-09-17 18:03:57.943 28868-29452 CCodec com.group.app.dev I state->set(RUNNING)
attempt 2 with different product
2024-09-17 18:06:42.707 30171-30352 ReactNativeJS com.group.app.dev I 'begin_checkout', { product_id: 'com.group.app.dev.premium.subscription.quarterly.promo1b:p3m',
has_promo: true,
promo_code: 'promo1',
intro_screen_type: 'default',
purchase_state: 'ALL_PLANS',
hard_paywall_enabled: false,
trial_period: null,
duration: 'THREE_MONTH',
offering: 'promo1',
has_referral_user: false,
ios_promotional_offer_product: null,
available_discounts: undefined,
selected_discount: undefined,
has_completed_onboarding: true,
subscription_screen_placement: 'ONBOARDING_GET_STARTED',
source: 'SubscriptionBottomBar' }
2024-09-17 18:06:42.739 30171-30353 unknown:ReactNative com.group.app.dev E Caught NullPointerException when dispatching message in MessageQueueThreadHandler. This is likely caused by runnable(msg.callback) being nulled in Android Handler after dispatching and before handling (see T170239922 for more details).Currently we observe that it only happen once which is during initialisation. Due to fixing probably involve Android System code, we decide to ignore here for now and print an error message for debugging purpose in case this cause more serious issues in future.
2024-09-17 18:06:44.932 30171-30492 BufferPoolAccessor2.0 com.group.app.dev D bufferpool2 0x6e587b8998 : 5(8417280 size) total buffers - 5(8417280 size) used buffers - 878/884 (recycle/alloc) - 6/885 (fetch/transfer)
code
export async function makePurchase(
offering: IOfferModel,
): Promise<MakePurchaseStatusTypes> {
try {
const { product } = offering;
const purchaseMade = await Purchases.purchaseStoreProduct(
product
);
Describe the bug
Upgrading to the latest
react-native-purchases
from7.2.1
to8.2.0
, I noticed that we were previously using the now deprecatedpurchaseProduct()
function to make purchases.This was, and still does work perfectly fine on iOS and android. But to comply with the latest docs, I replaced this function with
purchaseStoreProduct
and passed the correct parameters.When testing on
iOS
there was no issue, and I could make the purchase as before, however onandroid
this new function causes the purchase to simply hang. No errors returned, it just seems to hang for an indefinite period. When reverting back topurchaseProduct
, it works again.Wondering if anyone else has experienced this issue, as I could not find any related issues in the comunity threads or gh tickets.
Thanks in advance!
android
8.2.0
0.73.8
Additional context Add any other context about the problem here.