jamesmontemagno / InAppBillingPlugin

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

ConnectAsync does not return a response (the app freezes) #301

Closed NikkiTheStitchQueen closed 3 years ago

NikkiTheStitchQueen commented 4 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

Version Number of Plugin: Pulled project directly in (feature/new-android-billing) Device Tested On: Google Pixel 2 Simulator Tested On: Version of VS: VS Community 2019 - version 16.6.4 Version of Xamarin: Versions of other things you are using:

Steps to reproduce the Behavior

Follow documentation for:

var connected = await billing.ConnectAsync(ItemType.InAppPurchase);

Expected Behavior

App will either connect or send back an error

Actual Behavior

My app freezes. Debugging the code, it will go through the ConnectAsync code, but I never get a value for "connected" and the app freezes.

Code snippet

Screenshotst

tinytownsoftware commented 4 years ago

I am suffering from the same problem. Did you ever find out what the issue was?

Ozden79 commented 3 years ago

I've the very same issue, anybody can shad a light on what might be wrong?

jamesmontemagno commented 3 years ago

Please upgrade to 4.0, i am using this in production just fine :)

Ozden79 commented 3 years ago

Upgrading to 4.0 didn’t solve my problem, however, I found the issue. I was calling the the function with a “Task” object as return and than was using “Task.Wait()” call to wait finish the call which caused the freeze. Instead of this, if you use “await”, it works fine.

From: James Montemagno notifications@github.com Sent: Saturday, January 23, 2021 12:26 AM To: jamesmontemagno/InAppBillingPlugin InAppBillingPlugin@noreply.github.com Cc: Ozden79 oirmak@gmail.com; Comment comment@noreply.github.com Subject: Re: [jamesmontemagno/InAppBillingPlugin] ConnectAsync does not return a response (the app freezes) (#301)

Please upgrade to 4.0, i am using this in production just fine :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jamesmontemagno/InAppBillingPlugin/issues/301#issuecomment-765692690 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AIZQAXYDDNQFYCWDRMHNN2DS3HUQHANCNFSM4PS3JJ4A .