Eymir / marketbilling

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

com.example.dungeons.util.Base64DecoderException: single trailing character at offset 19 #63

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
STEPS TO REPRODUCE:
1. use google sample application
2. run it on HTC G7 desire (os2.3)
3.

EXPECTED OUTPUT:
when the purchase was complete. The app crash 
ACTUAL OUTPUT:
app crash:
04-05 11:02:58.922: E/Security(1804): Base64 decoding failed.
04-05 11:02:58.922: D/AndroidRuntime(1804): Shutting down VM
04-05 11:02:58.922: W/dalvikvm(1804): threadid=1: thread exiting with uncaught 
exception (group=0x401e4568)
04-05 11:02:58.932: E/AndroidRuntime(1804): FATAL EXCEPTION: main
04-05 11:02:58.932: E/AndroidRuntime(1804): java.lang.RuntimeException: Unable 
to start service com.example.dungeons.BillingService@406e76c8 with Intent { 
act=com.android.vending.billing.PURCHASE_STATE_CHANGED 
cmp=com.example.dungeons/.BillingService (has extras) }: 
java.lang.IllegalArgumentException: 
com.example.dungeons.util.Base64DecoderException: single trailing character at 
offset 19
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2060)
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
android.app.ActivityThread.access$2800(ActivityThread.java:117)
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:994)
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
android.os.Handler.dispatchMessage(Handler.java:99)
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
android.os.Looper.loop(Looper.java:130)
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
android.app.ActivityThread.main(ActivityThread.java:3694)
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
java.lang.reflect.Method.invokeNative(Native Method)
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
java.lang.reflect.Method.invoke(Method.java:507)
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
dalvik.system.NativeStart.main(Native Method)
04-05 11:02:58.932: E/AndroidRuntime(1804): Caused by: 
java.lang.IllegalArgumentException: 
com.example.dungeons.util.Base64DecoderException: single trailing character at 
offset 19
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
com.example.dungeons.Security.generatePublicKey(Security.java:209)
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
com.example.dungeons.Security.verifyPurchase(Security.java:128)
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
com.example.dungeons.BillingService.purchaseStateChanged(BillingService.java:493
)
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
com.example.dungeons.BillingService.handleCommand(BillingService.java:383)
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
com.example.dungeons.BillingService.onStart(BillingService.java:360)
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
android.app.Service.onStartCommand(Service.java:428)
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2047)
04-05 11:02:58.932: E/AndroidRuntime(1804):     ... 10 more
04-05 11:02:58.932: E/AndroidRuntime(1804): Caused by: 
com.example.dungeons.util.Base64DecoderException: single trailing character at 
offset 19
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
com.example.dungeons.util.Base64.decode(Base64.java:559)
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
com.example.dungeons.util.Base64.decode(Base64.java:474)
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
com.example.dungeons.util.Base64.decode(Base64.java:420)
04-05 11:02:58.932: E/AndroidRuntime(1804):     at 
com.example.dungeons.Security.generatePublicKey(Security.java:199)
04-05 11:02:58.932: E/AndroidRuntime(1804):     ... 16 more

AFFECTED ORDER IDS (IF RELEVANT):

OS VERSION:

MARKET/MYAPPS VERSION:

DEVICE:

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

NOTES:

Original issue reported on code.google.com by Samuel.C...@gmail.com on 5 Apr 2012 at 3:21

GoogleCodeExporter commented 9 years ago
http://developer.android.com/guide/market/billing/billing_integrate.html

I forgot add my public key to sample code

Original comment by e...@ceosoftcenters.com on 5 Apr 2012 at 6:54

GoogleCodeExporter commented 9 years ago
How to discard this Issue 63 ?

Original comment by Samuel.C...@gmail.com on 5 Apr 2012 at 7:02