fredlala8 / marketbilling

Automatically exported from code.google.com/p/marketbilling
0 stars 0 forks source link

NullPointerException in com.android.vending.billing.MarketBillingService #18

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
STEPS TO REPRODUCE:
1. Implement the in app billing using the example app
2. Test with the static responses android.test.purchased, this works fine
3. Test with android.test.canceled, this gives an exception, see callstack. 
What's going wrong???

EXPECTED OUTPUT:
No exception

ACTUAL OUTPUT:
Exception

AFFECTED ORDER IDS (IF RELEVANT):

OS VERSION:
2.2.3
MARKET/MYAPPS VERSION:
2.3.6
DEVICE:
Nexus One

OUTPUT FROM ADB BUGREPORT ATTACHED:
(Note: The output from "adb bugreport" is required for all bug reports.)

NOTES:
04-20 21:35:22.908 D/BillingService(28634): CheckBillingSupported
04-20 21:35:22.908 I/BillingService(28634): binding to Market billing service
04-20 21:35:22.928 D/BillingService(28634): Billing service connected
04-20 21:35:22.928 D/BillingService(28634): CheckBillingSupported
04-20 21:35:22.938 I/BillingService(28634): CheckBillingSupported response 
code: RESULT_OK
04-20 21:35:22.938 I/AutoPilot(28634): supported: true
04-20 21:35:22.938 D/BillingService(28634): request id: -1
04-20 21:35:23.008 I/ActivityManager(   92): Displayed 
com.willemstoker.AutoPilot/.EditYourSettingActivity: +253ms
04-20 21:35:25.228 D/AutoPilot(28634): buying
04-20 21:35:25.228 D/BillingService(28634): RequestPurchase
04-20 21:35:25.248 I/ActivityManager(   92): Starting: Intent { 
act=android.intent.action.VIEW 
cmp=com.android.vending/.billing.InAppBuyPageActivity (has extras) } from pid -1
04-20 21:35:25.258 D/BillingService(28634): request id: 2737388895789349760
04-20 21:35:25.518 I/dalvikvm(28213): Jit: resizing JitTable from 4096 to 8192
04-20 21:35:25.608 I/ActivityManager(   92): Displayed 
com.android.vending/.billing.InAppBuyPageActivity: +334ms
04-20 21:35:25.628 D/dalvikvm(28213): GC_CONCURRENT freed 1176K, 53% free 
3533K/7367K, external 2905K/3300K, paused 4ms+7ms
04-20 21:35:26.598 D/vending (28213): [1] BaseBuyPageActivity.onPostResponse(): 
{PurchaseResult=OK, PurchaseInfo=PurchaseInfo=, SignupStatus=SIGNED_UP, 
TId=transactionId.android.test.canceled, ShoppingCart=[ItemPrice=$0.99, 
TaxInclusive=, TaxExclusive=, Total=$0.99, HasTaxMessage=false, 
TaxMessage=null, HasFooterMessage=true, FooterMessage=Dit is geen echte 
aankoop.], RefundPolicy=<b>Voor deze aankoop is geen teruggave 
mogelijk.</b><br/><a 
href="http://market.android.com/support/bin/answer.py?answer=1061913">Beleid 
voor teruggaven</a>, Instruments=[[Id=android.test.canceled, Name=VISA xxx-FAKE 
Invalid=false Type=CREDIT_CARD] ], 
DefaultBillingInstrument=android.test.canceled, ErrorFields=[]}
04-20 21:35:26.608 D/vending (28213): [1] 
BaseBuyPageActivity.shouldAddCarrierBilling(): isProvisioned(): false 
isSavedonServer(): false radio available? true
04-20 21:35:26.608 D/vending (28213): [1] 
BaseBuyPageActivity.shouldAddCarrierBilling(): isProvisioned(): false 
isSavedonServer(): false radio available? true
04-20 21:35:30.698 D/dalvikvm(28221): GC_EXPLICIT freed 565K, 54% free 
2786K/5959K, external 1625K/2137K, paused 86ms
04-20 21:35:30.878 D/vending (28213): [1] 
BaseBuyPageActivity.onOrderResponse(): state: CART_PURCHASE response: 
[PurchaseResult=OK]
04-20 21:35:30.958 D/dalvikvm(28213): GC_CONCURRENT freed 1353K, 54% free 
3424K/7431K, external 2265K/2801K, paused 7ms+2ms
04-20 21:35:30.978 I/Gmail   (27611): MainSyncRequestProto: lowestBkwdConvoId: 
0, highestHandledServerOp: 183171, normalSync: true
04-20 21:35:31.208 I/BillingReceiver(28634): notifyId: android.test.canceled
04-20 21:35:31.208 W/ActivityManager(   92): Duplicate finish request for 
HistoryRecord{40827cf0 com.android.vending/.billing.InAppBuyPageActivity}
04-20 21:35:31.218 I/BillingService(28634): handleCommand() action: 
com.willemstoker.AutoPilot.GET_PURCHASE_INFORMATION
04-20 21:35:31.218 D/BillingService(28634): GetPurchaseInformation
04-20 21:35:31.228 E/BillingService(28634): getPurchaseInformation received 
RESULT_OK
04-20 21:35:31.228 D/BillingService(28634): request id: 3656394189988289586
04-20 21:35:31.238 W/InputManagerService(   92): Window already focused, 
ignoring focus gain of: 
com.android.internal.view.IInputMethodClient$Stub$Proxy@409e0740
04-20 21:35:31.308 I/BillingService(28634): handleCommand() action: 
com.android.vending.billing.RESPONSE_CODE
04-20 21:35:31.308 D/BillingService(28634): RequestPurchase: RESULT_OK
04-20 21:35:31.308 D/AutoPilot(28634): android.test.canceled: RESULT_OK
04-20 21:35:31.308 I/AutoPilot(28634): purchase was successfully sent to server
04-20 21:35:31.978 I/BillingService(28634): handleCommand() action: 
com.android.vending.billing.PURCHASE_STATE_CHANGED
04-20 21:35:31.978 I/Security(28634): signedData: 
{"nonce":6955467956256124291,"orders":[{"notificationId":"android.test.canceled"
,"orderId":"transactionId.android.test.canceled","packageName":"com.willemstoker
.AutoPilot","productId":"android.test.canceled","purchaseTime":1303328261915,"pu
rchaseState":1}]}
04-20 21:35:31.998 D/BillingService(28634): ConfirmNotifications
04-20 21:35:32.008 E/BillingService(28634): confirmNotifications received 
RESULT_OK
04-20 21:35:32.008 D/BillingService(28634): request id: 8907712747543870794
04-20 21:35:32.008 I/AutoPilot(28634): onPurchaseStateChange() itemId: 
android.test.canceled CANCELED
04-20 21:35:32.018 I/BillingService(28634): handleCommand() action: 
com.android.vending.billing.RESPONSE_CODE
04-20 21:35:32.018 D/BillingService(28634): GetPurchaseInformation: RESULT_OK
04-20 21:35:32.028 W/dalvikvm(28213): threadid=11: thread exiting with uncaught 
exception (group=0x40015560)
04-20 21:35:32.028 E/AndroidRuntime(28213): FATAL EXCEPTION: Thread-21
04-20 21:35:32.028 E/AndroidRuntime(28213): java.lang.NullPointerException
04-20 21:35:32.028 E/AndroidRuntime(28213):     at 
com.android.vending.billing.MarketBillingService$BillingNotifier.showStatusBarNo
tifications(MarketBillingService.java:397)
04-20 21:35:32.028 E/AndroidRuntime(28213):     at 
com.android.vending.billing.MarketBillingService$AsynchPurchaseInformation.doReq
uest(MarketBillingService.java:549)
04-20 21:35:32.028 E/AndroidRuntime(28213):     at 
com.android.vending.AsynchRequestRunner$RequestRunnable.run(AsynchRequestRunner.
java:37)
04-20 21:35:32.028 E/AndroidRuntime(28213):     at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
04-20 21:35:32.028 E/AndroidRuntime(28213):     at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
04-20 21:35:32.028 E/AndroidRuntime(28213):     at 
java.lang.Thread.run(Thread.java:1019)
04-20 21:35:32.028 E/AndroidRuntime(28213):     at 
com.android.vending.AsynchRequestRunner$VendingThreadFactory$VendingFactoryThrea
d.run(AsynchRequestRunner.java:118)

Original issue reported on code.google.com by willem.stoker on 21 Apr 2011 at 8:08

GoogleCodeExporter commented 8 years ago
I'm having the same problem too.  

This can be easily replicated in Dungeons by removing  <action 
android:name="android.intent.action.MAIN" /> and/or <category 
android:name="android.intent.category.LAUNCHER" /> in the android manifest.  
Normally you should pnly launch MarketBillingService in an activity with 
aforementioned tags.

That said, i'm starting to get problems on apps similar to livewallpapers and 
such.   Tagging the wallpaper service with MAIN/LAUNCHER does not work here, so 
I get similar errors from above.

Original comment by aimatand...@gmail.com on 24 Nov 2011 at 5:07

GoogleCodeExporter commented 8 years ago
I'm having a similar error in line 733. I don't have the 
android.intent.category.LAUNCHER in the manifest since I'm building a plugin

Original comment by ilnu...@gmail.com on 2 Feb 2012 at 4:49

GoogleCodeExporter commented 8 years ago
Getting the same problem with a widget, earlier versions of the market/play app 
worked ok, seems the recent version or two have this problem. In-app needs to 
better support apps that dont have a launcher icon..

Original comment by mathew.w...@gmail.com on 8 Mar 2012 at 3:42

GoogleCodeExporter commented 8 years ago
same here, waiting for a fix

Original comment by ababee...@gmail.com on 18 Mar 2012 at 11:43

GoogleCodeExporter commented 8 years ago
This has been a problem in Shady SMS since December of last year. In earlier 
versions of the Play Store it would just crash, now the Play Store is ANR'ing.

Original comment by waterfue...@gmail.com on 6 Aug 2012 at 4:47

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
ANR occurring in Play Store version 3.7.15, Verizon Galaxy S3. The ANR occurs 
predictably when a users attempt at purchase is declined, canceled, refunded, 
anything but successful. Confirmed on the Samsung Galaxy Nexus on Verizon, and 
Sprint. Confirmed on the HTC EVO 4G LTE on Sprint. Confirmed on the HTC 
Thunderbolt on Verizon. 

I can't find a single phone where the Play Store does not crash under a 
declined, canceled, or refunded circumstance. 

Original comment by waterfue...@gmail.com on 7 Aug 2012 at 1:40

GoogleCodeExporter commented 8 years ago
fucked by the same error! I published an unmanaged product in my app. After I 
pay the money with google wallet for a real test ,the play store app just 
crashed. What's more,I got two emails from the google play. The first told me 
that the purchase process completed, but the second said that the order is 
canceld by google.

Original comment by ixy...@gmail.com on 30 Jan 2013 at 1:46

GoogleCodeExporter commented 8 years ago
Inventory.getPurchase(SKU) is going to return null if the sku provided was not 
purchased. You cannot get further purchase information from it.

Original comment by ani...@educren.com on 29 Apr 2014 at 7:05