Skip to content
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

NPE with IMarketBillingService sendBillingRequest #48

Open
lujop opened this issue Oct 23, 2011 · 2 comments
Open

NPE with IMarketBillingService sendBillingRequest #48

lujop opened this issue Oct 23, 2011 · 2 comments
Labels

Comments

@lujop
Copy link

lujop commented Oct 23, 2011

I have got some stacktraces reported by ACRA. They are very occasional and it seems to be more on google's part but I don't know if it will be nice to catch the error, and log it.

at android.os.Parcel.readException(Parcel.java:1327)
at android.os.Parcel.readException(Parcel.java:1275)
at com.android.vending.billing.IMarketBillingService$Stub$Proxy.sendBillingRequest(SourceFile:100)
at net.robotmedia.billing.request.BillingRequest.getRequestType(SourceFile:82)
                                                 run
at net.robotmedia.billing.BillingService.runPendingRequests(SourceFile:217)
at net.robotmedia.billing.BillingService.onServiceConnected(SourceFile:151)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1058)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1075)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:132)
at android.app.ActivityThread.main(ActivityThread.java:4123)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
at dalvik.system.NativeStart.main(Native Method)
@larsa71
Copy link

larsa71 commented Nov 9, 2011

Hi,

can you check if this happens when you perform a restore transactions on an already purchased item?

@derosa
Copy link

derosa commented May 30, 2012

Looks like this bug: http://code.google.com/p/marketbilling/issues/detail?id=25
I fixed it naively in my code (not using Android Billing Library) by returning INVALID_REQUEST:

Bundle request = null;
            Bundle response = null;
            try {
                request = makeRequestBundle("CHECK_BILLING_SUPPORTED");
                response = mService.sendBillingRequest(request);
            } catch (NullPointerException e) {
                return Consts.BILLING_RESPONSE_INVALID_REQUEST_ID;
            }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants