-
-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object reference not set to an instance of an object on ConnectAsync #71
Comments
Have you read through this: https://jamesmontemagno.github.io/InAppBillingPlugin/TestingAndTroubleshooting.html your app most likely isn't configured correct. |
Yes I have readed it, but not succeed :( In fact is not a new app, I had an existing implementation of InApp Billing, so for sure it was working, I re-made the app and now I using the plugin. The unique difference I saw, is that I'm using Net.Standard instead of PCL and Package Reference on the host projects, something like this:
|
I'm seeing the same issue. I went through the configuration you linked @jamesmontemagno. Any thoughts? Do we need to be on API 26? |
It is impossible to be on API 26 as we don't support it yet. |
You should not be compiling against API 26 at all, that would be a terrible idea. I will take a look at that code though, do you know which part is the null ref exception? |
I do, it's the Context. I will downgrade the API and will inform the result. |
Did you remove the MainApplication.cs file that was added to your app? this grabs your current activity that is active. |
No, I left it as is installed. Let me downgrade some things, test it and return with a verdict if all went fine. |
Make sure that the currentactivity is being set as it is required |
Ok, so I downgrade all to compile against API 25, it's important to remove API 26 and Tools in order to work (Terrible idea to have this API right now installed). |
Glad you got it working. I will test this out with the SDKs, but only API 25 is supported currently. |
I just got it working too. Turns out our project already depended on |
@jamesmontemagno Does plugin already support api level 26 or 27? |
yup |
I am seeing this exception on my production as well. I have tested with 2 different accounts on 2 different android phones and my tests were successful. I cant get purchases, however I see some users get this exception as below. What could be the possible reason?
|
I have tried several way and always I getting the error. I have all configured, the Billing permission, app on alpha and compiling against api 26.
Bug Information
Version Number of Plugin: 1.2.2
Device Tested On: Samsung Galaxy S7 Edge
Version of VS: 2017 Enterprise - 15.3.1
Version of Xamarin: 4.6
StackTrance = https://gist.github.com/egimbernat/991b516159329d528696d042fc5619d8
Steps to reproduce the Behavior
Try to ConnectAsync and error ocurrs.
Expected Behavior
Connects successfully
Actual Behavior
Exception is thrown
Code snippet
Screenshotst
The text was updated successfully, but these errors were encountered: