cafebazaar / Poolakey

Android In-App Billing SDK for Cafe Bazaar App Store
Apache License 2.0
71 stars 22 forks source link

getPurchasedProducts returns empty list sometimes #75

Open RezaDizaji opened 1 year ago

RezaDizaji commented 1 year ago

getPurchasedProducts returns empty list continuously right after a Bazaar login until next time users sign out of their account and sign in again. (I think this happens specially if login is done through 3rd party app and not the Bazaar app itself).

farhadrazzaghi commented 1 year ago

If you are using a 3rd party application to log in Cafe Bazaar, you must start the init process of Poolakey from the beginning after the user login, so that Poolakey can identify that this user has logged in. I would be very happy if you could share your codes with us.

DHosseiny commented 1 year ago

Closing as no more info has been added to the issue. But feel free to reopen it if you think the problem will not be solved with Farhad's workaround.

RezaDizaji commented 1 year ago

I found some additional and corrected information about the subject: I implemented the process in a way that Poolakey get initialized every time a request is being sent (exactly as @farhadrazzaghi said), but there was no success in solving the problem. The problem persists when it starts to occur. Even closing the app and opening it again after users log into Bazaar account doesn't solve the problem for them, the only solution is to log out of Bazaar account and log in again for Poolakey to return the correct information in relative callbacks.

RezaDizaji commented 1 year ago

I found some additional and corrected information about the subject: I implemented the process in a way that Poolakey get initialized every time a request is being sent (exactly as @farhadrazzaghi said), but there was no success in solving the problem. The problem persists when it starts to occur. Even closing the app and opening it again after users log into Bazaar account doesn't solve the problem for them, the only solution is to log out of Bazaar account and log in again for Poolakey to return the correct information in relative callbacks.

Updated information yet again... .

RezaDizaji commented 3 months ago

Please re-open the issue since this is not fixed yet. I found out the way to reproduce the issue and where it might be originated from.

After a purchase done, restart the device and try to get purchases from Bazaar, this ends up getting empty arrays for both in-app purchases and subscriptions, falsely. Very interestingly, this continues to happen until the user opens their profile screen in Bazaar app which from then onwards getting purchases returns correct values even if user had already closed the profile screen in Bazaar.

DHosseiny commented 3 months ago

Can you send your apps package name or link in bazaar's website?

RezaDizaji commented 3 months ago

Here it is: ir.rezadizaji.aasa

DHosseiny commented 3 months ago

رضا جان من نتونستم بار تکرارش کنم مشکل رو با برنامه ی شما. ی اشتراک ۶ ماهه خریدم و هر بار میرم تو برنامه میگه اون اشتراک رو داری. اگر حالت خاصی داره لطفا بهمون بیشتر توضیح بده که حالتش چیه. کلا هم فکر میکنم تیکت زدن از طریق پشتیبانی ارتباطمون رو بهتر کنه. ممنون.

DHosseiny commented 3 months ago

البته من منظور شما راجب login is done through 3rd party app and not the Bazaar app itself رو متوجه نشدم. میتونی بیشتر توضیح بدی. اگر فیلم هم بتونی برامون بفرستی عالی میشه.

RezaDizaji commented 3 months ago

رضا جان من نتونستم بار تکرارش کنم مشکل رو با برنامه ی شما. ی اشتراک ۶ ماهه خریدم و هر بار میرم تو برنامه میگه اون اشتراک رو داری. اگر حالت خاصی داره لطفا بهمون بیشتر توضیح بده که حالتش چیه. کلا هم فکر میکنم تیکت زدن از طریق پشتیبانی ارتباطمون رو بهتر کنه. ممنون.

از طریق پشتیبانی هم تیکت زدم و تیکت الان بازه. شما دستگاه رو ریستارت کنید و بعد بدون این که برنامه‌ی بازار رو باز کرده باشید بازگردانی خرید کنید. در این حالت تا وقتی کاربر صفحه‌ی حساب کاربری بازارشو باز نکرده باشه بازار برای برنامه برنمیگردونه خریدهای کاربر رو.

RezaDizaji commented 3 months ago

البته من منظور شما راجب login is done through 3rd party app and not the Bazaar app itself رو متوجه نشدم. میتونی بیشتر توضیح بدی. اگر فیلم هم بتونی برامون بفرستی عالی میشه.

پیام بنده نیست اون پیام پیام همکارتونه.

DHosseiny commented 3 months ago

رضا جان من نتونستم بار تکرارش کنم مشکل رو با برنامه ی شما. ی اشتراک ۶ ماهه خریدم و هر بار میرم تو برنامه میگه اون اشتراک رو داری. اگر حالت خاصی داره لطفا بهمون بیشتر توضیح بده که حالتش چیه. کلا هم فکر میکنم تیکت زدن از طریق پشتیبانی ارتباطمون رو بهتر کنه. ممنون.

از طریق پشتیبانی هم تیکت زدم و تیکت الان بازه. شما دستگاه رو ریستارت کنید و بعد بدون این که برنامه‌ی بازار رو باز کرده باشید بازگردانی خرید کنید. در این حالت تا وقتی کاربر صفحه‌ی حساب کاربری بازارشو باز نکرده باشه بازار برای برنامه برنمیگردونه خریدهای کاربر رو.

من این رو هم روی samsung تست کردم، پیش نیومد. مشخصات گوشیی که این براش پیش میاد رو میگید لطفا؟

RezaDizaji commented 3 months ago

مشکل روی هر دستگاهی رخ می‌دهد و پایدار است. من هم روی شبیه‌ساز و هم دو مدل گوشی سامسونگ با دو نوع پردازنده تست کردم و هم کاربران بنده با انواع دستگاه‌ها با مشکل دست و پنجه نرم می‌کنند. ویدیویی که گذاشتم کاملا گویای مشکل است. البته این کار در نسخه‌ی آخر برنامه ممکن نیست چون بنده محدودیت‌ها رو کاهش دادم تا کاربران کمتر اذیت شوند. ولی در نسخه‌های قبلی برنامه مطمئنا این مشکل را می‌توانید روی هر دستگاهی مشاهده کنید.

لینک ویدیو: https://s30.picofile.com/file/8476535050/Screen_Recording_1403_03_19_at_2_28_12_at_night_mp4.zip.html

hamid97m commented 1 month ago

Reza Jan, I checked all scenarios, and it didn't happen. Could you please tell us which version of Poolakey you are using? Are you using the last version(2.2.0)?