Android Question IAB Helper is NOT setup

Robert Valentino

Well-Known Member
Licensed User
Longtime User
Today my app crashed with IAB Helper is not setup.

This is really strange.

Because I save the Supported flag from my call to Billing Manager Supported

I test this flag before trying to do anything with Billing Manager.

Is it possible to get
B4X:
               gBillingManager.Initialize("BillingManager", gBMK)                                                           

               Wait For BillingManager_BillingSupported(Supported As Boolean, Message As String)       

           gBillingManagerSupported = Supported   
           gBillingManagerMessage    = Message

Is it possible for me to get a Supported flag as True and then when I actually go to do something with BillingManager for it not to be supported any more?

Because I save the flag

B4X:
Do some startup tasks - nothing to do with IAB
...  Open database, ...

Then I try to getownedproducts and crash on IAB Helper is not setup.

So if the flag I got said supported then where did it go....

B4X:
           If   gBillingManagerSupported Then               
                 gBillingManager.GetOwnedProducts
           end if

BobVal
 

Robert Valentino

Well-Known Member
Licensed User
Longtime User
Dump report
B4X:
Program Crash - Doing:15001

  Max Memory = 512.00 MB 
Total Free        = 508.42 MB 
Total Memory = 8.38 MB 
Used Memory = 3.58 MB 
  Free Memory = 4.80 MB 

--------- beginning of main 
~i:*** Service (starter) Create *** 
~i:** Service (starter) Start ** 
~i:** Activity (main) Create, isFirst = true ** 
~i:** Activity (main) Resume ** 
Portrait:true  Real (X/Y):360 / 640 
Small Screen:true  Unsuported:false 
~i:** Activity (main) Pause, UserClosed = false ** 
sending message to waiting queue (activity_permissionresult) 
running waiting messages (1) 
~i:** Activity (main) Resume ** 
~i:** Activity (main) Pause, UserClosed = false ** 
sending message to waiting queue (activity_permissionresult) 
sending message to waiting queue (activity_permissionresult) 
running waiting messages (2) 
~i:** Activity (main) Resume ** 
~i:** Activity (main) Pause, UserClosed = false ** 
sending message to waiting queue (CallSubDelayed - StarterProgress) 
sending message to waiting queue (CallSubDelayed - Create_Screen) 
~i:*** Service (httputils2service) Create *** 
~i:** Service (httputils2service) Start ** 
ResponseError. Reason: Not Found, Response: <!DOCTYPE HTML> 
<html> 

    <head> 
        <title>404 Error - Page Not Found</title> 
        <style> 
            #ad_frame{ height:800px; width:100%; } 
            body{ margin:0; border: 0; padding: 0; } 
        </style> 
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> 
        <script type="text/javascript" language="JavaScript"> 
            var url = 'http://www.iyfipgun.com/?dn=' 
                + document.domain + '&pid=9POL6F2H4'; 

            $(document).ready(function() { 
                $('#ad_frame').attr('src', url); 
            }); 
        </script> 
    </head> 
    <body> 
        <iframe id="ad_frame" src="http://www.iyfipgun.com/" 
            frameborder="0" scrolling="no"> 

            <!-- browser does not support iframe's --> 

        </iframe> 
    </body> 

</html> 
sending message to waiting queue (CallSubDelayed - StarterProgress) 
sending message to waiting queue (CallSubDelayed - StarterProgress) 
sending message to waiting queue (activity_permissionresult) 
running waiting messages (5) 
~i:** Activity (main) Resume ** 
VC NamesDB 
~e:starter_startup_alldone (java line: 2046) 
~e:java.lang.IllegalStateException: IAB helper is not set up. Can't perform operation: queryInventory 
~e: at anywheresoftware.b4a.objects.IbHelper.checkSetupDone(IbHelper.java:776) 
~e: at anywheresoftware.b4a.objects.IbHelper.queryInventoryAsync(IbHelper.java:609) 
~e: at anywheresoftware.b4a.objects.IbHelper.queryInventoryAsync(IbHelper.java:636) 
~e: at anywheresoftware.b4a.inappbilling3.BillingManager3.GetOwnedProducts(BillingManager3.java:84) 
~e: at com.BOBs.BBS.starter._startup_alldone(starter.java:2046) 
~e: at java.lang.reflect.Method.invoke(Native Method) 
~e: at anywheresoftware.b4a.BA.raiseEvent2(BA.java:191) 
~e: at anywheresoftware.b4a.keywords.Common$11.run(Common.java:1154) 
~e: at android.os.Handler.handleCallback(Handler.java:789) 
~e: at android.os.Handler.dispatchMessage(Handler.java:98) 
~e: at android.os.Looper.loop(Looper.java:164) 
~e: at android.app.ActivityThread.main(ActivityThread.java:6944) 
~e: at java.lang.reflect.Method.invoke(Native Method) 
~e: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) 
~e: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374) 
java.lang.IllegalStateException: IAB helper is not set up. Can't perform operation: queryInventory 
at anywheresoftware.b4a.objects.IbHelper.checkSetupDone(IbHelper.java:776) 
at anywheresoftware.b4a.objects.IbHelper.queryInventoryAsync(IbHelper.java:609) 
at anywheresoftware.b4a.objects.IbHelper.queryInventoryAsync(IbHelper.java:636) 
at anywheresoftware.b4a.inappbilling3.BillingManager3.GetOwnedProducts(BillingManager3.java:84) 
at com.BOBs.BBS.starter._startup_alldone(starter.java:2046) 
at java.lang.reflect.Method.invoke(Native Method) 
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:191) 
at anywheresoftware.b4a.keywords.Common$11.run(Common.java:1154) 
at android.os.Handler.handleCallback(Handler.java:789) 
at android.os.Handler.dispatchMessage(Handler.java:98) 
at android.os.Looper.loop(Looper.java:164) 
at android.app.ActivityThread.main(ActivityThread.java:6944) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
 
Upvote 0

Robert Valentino

Well-Known Member
Licensed User
Longtime User
You seem upset. Sorry if I have upset you.

Using IDE to read logs? The output is from a Application_Error in my Starter program that Emails me this information on a Crash on a users device.

Reading the logs on a user device using IDE??????? This is not possible is it?

I haven't had any problems in the past so there was no reason for the Log messages.
But I have added some in the next release
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Top