j3k0 / cordova-plugin-purchase

In-App Purchase for Cordova on iOS, Android and Windows
https://purchase.cordova.fovea.cc
1.29k stars 529 forks source link

Login keeps coming back... #315

Closed anykeysolutions closed 5 years ago

anykeysolutions commented 8 years ago

I use the plugin on a special purchase page. As soon as the user hits this page and store.refresh is called, the login for the app stores appears, which is fine. But if I go back to any other page, which doesn't use the plugin, hit the home button and go back to the app, the login appears again.

This behaviour doesn't stop. If I visited the purchase page once, every time I hit the home button and go back to the app, the login shows again. It can only be stopped if I close the application completly, If I reenter it, the problem is gone. Also, if I don't visit the purchase page, everything is fine.

But as soon as store.refresh is called, the problem exists again. I made sure, that I don't call store.refresh multiple times, I only call it once.

It looks like the app has to check something with the store every time I go back to the app. But I can't figure out, what the problem is and why it's calling the login every time.

Any suggestions?

rotoxl commented 8 years ago

Hi,

same problem here. I have also used several sandbox users and everytime I get to the purchase screen it begins to ask for the password of those sandbox users

Neh3maH commented 8 years ago

Hi, Same problem here.

saniyusuf commented 8 years ago

same here any ideas what is wrong

saniyusuf commented 8 years ago

aapraently this is correct behaviour when you use a different account to buy the product from the one that is on the phone itslef

Neh3maH commented 8 years ago

Seriously, thanks a lot ! So it would be because I use the sandbox users instead of the real user of the phone ?

saniyusuf commented 8 years ago

based on my information that is correct. If you use a differnt user from the one the phone is tied to this will happen anytime you are about to use an app that calls that refresh which makes sense.

saniyusuf commented 8 years ago

@Neh3maH I have tested this theory and it does not seem to solve the issue. Can anyone confirm they have a fix and this is not a bug

saniyusuf commented 8 years ago

Hi Guys please use this link to the branch provided in this comment where there is a fix. You might have to delte your app completely from the phone and sign out restart you phone and even remove and re add the IOS project then run again after putting the fix. https://github.com/d3orn/cordova-plugin-purchase/tree/transactionFix

rotoxl commented 8 years ago

Hi @saniyusuf,

gonna give it a try. It would be great news to have it working.

Anyway, comparing j3k0/master and the fixed stuff gives us only one difference at line 500

EDIT: I'm sorry but it did not worked. Login warning keeps popping up. I followed all the steps described by @saniyusuf but no luck

saniyusuf commented 8 years ago

@rotoxl you might have to restore your phone for this to work like I had to on my test device.

bwalsh commented 8 years ago

Tried this, but did not work. @saniyusuf exactly what steps did you take to get this to work?

saniyusuf commented 8 years ago

@bwalsh restore your test iphone then install the app

bwalsh commented 8 years ago

@saniyusuf thank you. what do you mean by: "restore your test iphone"

saniyusuf commented 8 years ago

like restor it form settings. There is a cache problem you can get rid of this by trying soo many times or just storing your iphone like fatcory reset @bwalsh

enricodeleo commented 8 years ago

I reset to factory then restored my iPhone backup and I'm having the same behavior. It is impossible to work because everytime I open the app products are flagged as bought (even if I click on cancel on the login prompt) and sometimes the login request pops randomly even when I'm on other apps. Is it possible to reset all the logins and pending transactions at once ?

bwalsh commented 8 years ago

Any news on fix &/or workaround? Any definitive word if it affects released apps?

saniyusuf commented 8 years ago

Fix is availablein v 4 of the plugin On 27 Dec 2015 22:07, "bwalsh" notifications@github.com wrote:

Any news on fix &/or workaround? Any definitive word if it affects released apps?

— Reply to this email directly or view it on GitHub https://github.com/j3k0/cordova-plugin-purchase/issues/315#issuecomment-167441613 .

optikalefx commented 8 years ago

I don't think this is fixed, My users still get asked for password randomly throughout app use

glennkarlsen commented 8 years ago

@optikalefx Your users? In production or testflight users?

optikalefx commented 8 years ago

Right now, testflight users. But it's hard for me to trust it in prod. You know?

glennkarlsen commented 8 years ago

Okey, thats "positive" I guess. No, I don't know. Just hoping it will work well in production.

priyag676 commented 7 years ago

@j3k0 Hi, The issue mentioned above is also replicated on ionic app i.e. live on itunes app store, I am the using the previous version of the plugin. https://github.com/AlexDisler/cordova-plugin-inapppurchase/issues/138

Dexus commented 7 years ago

I can only reproduce it when I have my phone with multiple sandbox accounts and/or live accounts and buyed with different accounts the products. I think it has a reason why apple prefer to use a own test device.

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.