jamesmontemagno / InAppBillingPlugin

Cross-platform In App Billing Plugin for .NET
MIT License
651 stars 152 forks source link

Android 7.1.2 is not connecting. #55

Closed brianmatic closed 7 years ago

brianmatic commented 7 years ago

If you are creating an issue for a BUG please fill out this information. If you are asking a question or requesting a feature you can delete the sections below.

Failure to fill out this information will result in this issue being closed. If you post a full stack trace in a bug it will be closed, please post it to http://gist.github.com and then post the link here.

Bug Information

We have a user using 7.1.2 and it is failing to connect. We are stumped.

Version Number of Plugin: Latest Nuget beta as of 7/17/2017 Device Tested On:Android Pixel Simulator Tested On: 7.1.1 Version of VS: Mac Version of Xamarin: Mac Versions of other things you are using:

Steps to reproduce the Behavior

Call ConnectAsync on Android 7.1.2

Expected Behavior

It will connect

Actual Behavior

It is returning false.

Code snippet

var connected = await CrossInAppBilling.Current.ConnectAsync();

Screenshotst

jamesmontemagno commented 7 years ago

Is this your main development phone with your own development account on it?

I have tested it on my 6P running both 7.1.2 and 8.0.0 and seemed fine.

brianmatic commented 7 years ago

Thanks. No, it is my tester's phone. It is a Pixel 7.3.2. It happened after he checked out one time. We didn't have the code to consume the product yet. Now we can't even connect. It just returns false.

Brian Anderson

On Jun 26, 2017, at 1:34 PM, James Montemagno notifications@github.com wrote:

Is this your main development phone with your own development account on it?

I have tested it on my 6P running both 7.1.2 and 8.0.0 and seemed fine.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

jamesmontemagno commented 7 years ago

What version of the plugin are you using?

I would also attach to logcat to see what the output is there.

At that point it is simply trying to bind to the service and is failing to do so. Perhaps there is something wrong with the device or Google Play is down for some reason.

brianmatic commented 7 years ago

1.1.0.46-beta

brianmatic commented 7 years ago

Here is an interesting thing that my tester found:

justono [8:23 AM] So I'm not sure how to change my default email or Google account for my phone I could try to figure that out but I'm assuming if I did it would work because of this error

[8:24 AM] What I did was created a new tally sheet account with my brightly email and then went to click on unlock and got that same error modal

[8:25 AM] But then without closing the tally sheet app I went into Apps and data and cleared my Play Store Cache and then didn't open the Play Store but went straight into the tally sheet app and clicked unlock on the reports

[8:25 AM] And I got this error

screenshot_20170626-082210

jamesmontemagno commented 7 years ago

Seems like the item is owned already... is it a consumable?

brianmatic commented 7 years ago

Yes. It is a consumable. We didn't consume it the first time he bought it. We now have that code in place but we can't connect.

Brian Anderson

On Jun 27, 2017, at 12:56 PM, James Montemagno notifications@github.com wrote:

Seems like the item is owned already... is it a consumable?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

brianmatic commented 7 years ago

Here are some exceptions we are getting in our logs.

Purchase Error:Purchase:catch (InAppBillingPurchaseException ex): Plugin.InAppBilling.Abstractions.InAppBillingPurchaseException: Cannot connect to iTunes Store at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x100299a34 + 0x000d4> in <2f4074c3120b4d80802e10af84b67d41#5db9e3d65e9b1ba84b3cc17ba38c5850>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x10029995c + 0x000c7> in <2f4074c3120b4d80802e10af84b67d41#5db9e3d65e9b1ba84b3cc17ba38c5850>:0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () <0x100299c78 + 0x0003b> in <2f4074c3120b4d80802e10af84b67d41#5db9e3d65e9b1ba84b3cc17ba38c5850>:0 at Plugin.InAppBilling.InAppBillingImplementation+<PurchaseAsync>d__11.MoveNext () <0x1010d4b44 + 0x000bf> in <472ddfb22801465ca964846c1c804c28#5db9e3d65e9b1ba84b3cc17ba38c5850>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x100299a34 + 0x000d4> in <2f4074c3120b4d80802e10af84b67d41#5db9e3d65e9b1ba84b3cc17ba38c5850>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x10029995c + 0x000c7> in <2f4074c3120b4d80802e10af84b67d41#5db9e3d65e9b1ba84b3cc17ba38c5850>:0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () <0x100299c78 + 0x0003b> in <2f4074c3120b4d80802e10af84b67d41#5db9e3d65e9b1ba84b3cc17ba38c5850>:0 at TallySheet.EventViewModel+d__159.MoveNext () <0x10037a700 + 0x00657> in <c9eaca136861492aa683c998a37af74c#5db9e3d65e9b1ba84b3cc17ba38c5850>:0

brianmatic commented 7 years ago

Unlock Reports:PromptBuyNowAsync:catch(Exception): Plugin.InAppBilling.Abstractions.InAppBillingPurchaseException: Cannot connect to iTunes Store at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x100331a34 + 0x000d4> in <2f4074c3120b4d80802e10af84b67d41#5db9e3d65e9b1ba84b3cc17ba38c5850>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x10033195c + 0x000c7> in <2f4074c3120b4d80802e10af84b67d41#5db9e3d65e9b1ba84b3cc17ba38c5850>:0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () <0x100331c78 + 0x0003b> in <2f4074c3120b4d80802e10af84b67d41#5db9e3d65e9b1ba84b3cc17ba38c5850>:0 at Plugin.InAppBilling.InAppBillingImplementation+<GetProductInfoAsync>d__7.MoveNext () <0x10116c568 + 0x000c7> in <472ddfb22801465ca964846c1c804c28#5db9e3d65e9b1ba84b3cc17ba38c5850>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x100331a34 + 0x000d4> in <2f4074c3120b4d80802e10af84b67d41#5db9e3d65e9b1ba84b3cc17ba38c5850>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x10033195c + 0x000c7> in <2f4074c3120b4d80802e10af84b67d41#5db9e3d65e9b1ba84b3cc17ba38c5850>:0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () <0x100331c78 + 0x0003b> in <2f4074c3120b4d80802e10af84b67d41#5db9e3d65e9b1ba84b3cc17ba38c5850>:0 at TallySheet.EventViewModel+d__156.MoveNext () <0x100411120 + 0x005fb> in <c9eaca136861492aa683c998a37af74c#5db9e3d65e9b1ba84b3cc17ba38c5850>:0

brianmatic commented 7 years ago
  1. Purchase Error:Purchase:catch (InAppBillingPurchaseException ex): Plugin.InAppBilling.Abstractions.InAppBillingPurchaseException: 6 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in :0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in :0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in <ff4120dcbf344d3998629711b43104ff>:0 at Plugin.InAppBilling.InAppBillingImplementation+<PurchaseAsync>d__27.MoveNext () [0x00247] in <0a9431fecc2847fba5d02d0cc7397401>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in :0 at Plugin.InAppBilling.InAppBillingImplementation+d26.MoveNext () [0x000d8] in <0a9431fecc2847fba5d02d0cc7397401>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in :0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in :0 at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in :0 at TallySheet.EventViewModel+d159.MoveNext () [0x00266] in :0
brianmatic commented 7 years ago

Purchase Error:Purchase:catch (InAppBillingPurchaseException ex): Plugin.InAppBilling.Abstractions.InAppBillingPurchaseException: Unable to process purchase. at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in :0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in :0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in <ff4120dcbf344d3998629711b43104ff>:0 at Plugin.InAppBilling.InAppBillingImplementation+<PurchaseAsync>d__27.MoveNext () [0x00247] in <0a9431fecc2847fba5d02d0cc7397401>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in :0 at Plugin.InAppBilling.InAppBillingImplementation+d26.MoveNext () [0x000d8] in <0a9431fecc2847fba5d02d0cc7397401>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in :0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in :0 at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in :0 at TallySheet.EventViewModel+d159.MoveNext () [0x00266] in :0

brianmatic commented 7 years ago

Purchase Error:Purchase:catch (InAppBillingPurchaseException ex): Plugin.InAppBilling.Abstractions.InAppBillingPurchaseException: 7 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in :0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in :0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in <ff4120dcbf344d3998629711b43104ff>:0 at Plugin.InAppBilling.InAppBillingImplementation+<PurchaseAsync>d__27.MoveNext () [0x00247] in <0a9431fecc2847fba5d02d0cc7397401>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in :0 at Plugin.InAppBilling.InAppBillingImplementation+d26.MoveNext () [0x000d8] in <0a9431fecc2847fba5d02d0cc7397401>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in :0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in :0 at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in :0 at TallySheet.EventViewModel+d159.MoveNext () [0x00266] in :0

jamesmontemagno commented 7 years ago

Can you please just put this in a gist at http://gist.github.com post in here doesn't help.

Plugin.InAppBilling.Abstractions.InAppBillingPurchaseException: Cannot connect to iTunes Store at

This means that most likely you are not logged into a proper test account. Although this doesn't have anything to do with your original bug that you opened for Android.

brianmatic commented 7 years ago

Ok, I copied the code that calls the plugin to gist: https://gist.github.com/brianmatic/41a09e17d6044139d76a91fac757d9ce

The exceptions are happening in the release that is live. We capture them in to Google Analytics.

This one seems to happen the most:

Purchase Error:Purchase:catch (InAppBillingPurchaseException ex): Plugin.InAppBilling.Abstractions.InAppBillingPurchaseException: Unable to process purchase. at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in :0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in :0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in <ff4120dcbf344d3998629711b43104ff>:0 at Plugin.InAppBilling.InAppBillingImplementation+<PurchaseAsync>d__27.MoveNext () [0x00247] in <0a9431fecc2847fba5d02d0cc7397401>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in :0 at Plugin.InAppBilling.InAppBillingImplementation+d26.MoveNext () [0x000d8] in <0a9431fecc2847fba5d02d0cc7397401>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in :0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in :0 at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in :0 at TallySheet.EventViewModel+d159.MoveNext () [0x00266] in :0

This one is on Android 7.1.2

Purchase Error:Purchase:catch (InAppBillingPurchaseException ex): Plugin.InAppBilling.Abstractions.InAppBillingPurchaseException: 7 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <ff4120dcbf344d3998629711b43104ff>:0 at Plugin.InAppBilling.InAppBillingImplementation+<PurchaseAsync>d__27.MoveNext () [0x00247] in <0a9431fecc2847fba5d02d0cc7397401>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <ff4120dcbf344d3998629711b43104ff>:0 at Plugin.InAppBilling.InAppBillingImplementation+<PurchaseAsync>d__26.MoveNext () [0x000d8] in <0a9431fecc2847fba5d02d0cc7397401>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <ff4120dcbf344d3998629711b43104ff>:0 at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <ff4120dcbf344d3998629711b43104ff>:0 at TallySheet.EventViewModel+<Purchase>d__159.MoveNext () [0x00266] in <c9eaca136861492aa683c998a37af74c>:0
brianmatic commented 7 years ago

This exception is also logged from my tester's events: Purchase Unsuccessful:Event=2830. That gets triggered is null is returned from the CrossInAppBilling.Current.PurchaseAsync method.

jamesmontemagno commented 7 years ago

I am not sure which ones are Android or which are iOS.

on iOS you can get Unable to process purchase if they cancel the purchase. This throws an "Unknown" exception, just how Apple handles it.

This bug is too convoluted and I am sorry bug I am going to close and re-open new ones. Please DO NOT post stack traces in the bugs, post them in a Gist and link to them.

My recommendation is to download the plugin code and debug through it on your device to see what is going on. You could be trying to consume something that you haven't purchased yet and that is throwing an exception.