google-services icon indicating copy to clipboard operation
google-services copied to clipboard

GMR/ERROR invalid currency code

Open travoux opened this issue 10 years ago • 8 comments

Why am I getting this error when running the app after integrating with Google Cloud Messaging? <GMR/ERROR> Cannot record transaction with invalid currency code: (nil) screen shot 2016-05-08 at 9 16 41 pm

travoux avatar May 08 '16 13:05 travoux

Hi Sajid,

Could you provide the full logging output? I'm interested in the context of this error.

Thanks a lot for reporting this.

ggpuglia avatar May 12 '16 20:05 ggpuglia

screen shot 2016-05-15 at 11 15 36 am

I have used this device to test purchase in-app subscription before. Using iTunes test user account. But I don't see why gcm support libraries are somehow related to the transaction records?

travoux avatar May 15 '16 03:05 travoux

Hi Sajid,

This is happening because the SDK is receiving "infinite" in-app purchases. This is a long shot, but could you check if you are always calling [[SKPaymentQueue defaultQueue] finishTransaction:transaction].

If you are sure you always calling it, could you enable the verbose mode (-GMRDebugEnabled) argument and post the log output.

Thanks in advance.

ggpuglia avatar May 16 '16 16:05 ggpuglia

I'm in the process of adding in-app purchases for my app, started with the thought that it would be subscription based, but switched it later on. During my subscription-based testing, I had some itunes login problems (test user account) since I have 2-factor and touch-ID enabled. I'm pretty sure this is a very specific error for testers with some of these auth factors.

The error is not infinite to me, and stops when it prompts me for my itunes store login on the app. The error seems to correspond with the number of times I've launched the simulator. I'm trying to find what is causing this currency call in the first place, but I think the common problem is IAP subscriptions + itunes test user accounts.

nathanharig avatar May 17 '16 14:05 nathanharig

I just solved my issue with the following swift code- not sure what yours is in.

In the viewDidLoad(), run this one then remove/comment it out. It will complete all missing transactions.

for transaction:SKPaymentTransaction in SKPaymentQueue.defaultQueue() .transactions {  // fixes storekit problem

            SKPaymentQueue.defaultQueue() .finishTransaction(transaction)
        }

Adapted from this- http://stackoverflow.com/a/30948292

nathanharig avatar May 17 '16 15:05 nathanharig

Thanks nathan, that solved the issue. But I was wondering why sdk has something to do wi this..

travoux avatar May 24 '16 13:05 travoux

@travoux @nathanharig from the discussion it looks like the issue is solved so I am going to close this. Please re-open if that's not the case.

samtstern avatar Jun 28 '16 17:06 samtstern

Thanks nathan.This helped.

abhimuralidharan avatar Jul 26 '16 10:07 abhimuralidharan