purchaseUpdatedListener is called multipletimes on ios platform
Please use Discussion board if you want get some help out of it. Please report issue if there is a bug.
using same code as provided in the docs
Version of react-native-iap
^6.0.2
Version of react-native
0.63.3
Platforms you faced the error (IOS or Android or both?)
ios
Expected behavior
purchaseUpdatedListener should run only after purchase is completed
Actual behavior
purchaseUpdatedListener is called once a new user is navigated to the subscription page with previous purchases
Tested environment (Emulator? Real Device?)
real device
Steps to reproduce the behavior
run the app of ios device , make a purchase , logout and login again with other user
Have you checked if your component is not rerendering?
I am suspecting if this is a similar issue with https://github.com/hyochan/react-native-audio-recorder-player/issues/313
Have you checked if your component is not rerendering?
I am suspecting if this is a similar issue with hyochan/react-native-audio-recorder-player#313
this is not for recorder @hyochan : )
Have you checked if your component is not rerendering? I am suspecting if this is a similar issue with hyochan/react-native-audio-recorder-player#313
this is not for recorder @hyochan : )
Of course I know that. My mistake since I have not make it clear enough.
I wanted you to double check if this is not rerendering issue
@hyochan ,I am facing the same issue here (its not related to rendering issue).
Hi, We are also facing same issue for IOS. Below are full details on the issue:
- We purchase a product or subscription using react-native-iap integration. Currently issue seems to be reproducing for subscriptions
- We receive the purchase event in purchaseUpdateListner and we send the purchase details to our backend process to make the purchased service available. We create a transaction entry in our DB for the record.
- Success is returned to app and we complete the transaction using finishTransaction method
- We do receive the subsequent renewable events in purchaseUpdateListener which are processed similarly. DB entries are made for those too.
- On next launch of the app, we are again getting the original transaction which was processed and completed successfully.
- We are still getting events for transaction which were processed 1-2 months back.
Is there any way to correctly finish those transactions? Also, for how long we will be receiving old transactions? Is there any expiration time limit on these?
Hi, I'm also facing same issue for IOS. when i come to purchase screen purchaseUpdateListner is running multiple times
i'm not getting any solution for the same
if there is any thing that is should know , please let me know,
It seems that I've got the same, even that listeners are initialized only once.
hello. the same issue happens also for auto-renewable subscription products on Android on Sandbox. since 2nd event for the same purchase is triggered right after the first one (2-3 milliseconds later) so it makes the situation more difficult to put a check point on either mobile app code or back-end code. I'm still working on it not to process the same purchase data more than once on back-end.
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.
@Akashdeep312 can you please help us check if this is still an issue on 8.x.x for iOS?
I have found the following as something that is expected from the native SDK: https://stackoverflow.com/a/3633571/570612 If it still happens on 8.x.x and the above doesn't fix. We'll reopen. Thank you