fredlala8 / marketbilling

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

Billing not working with more accounts #87

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
STEPS TO REPRODUCE:
1. Get clean device
2. Set up one Google account
3. Go to settings and add another Google account
4. Launch Play Store, accept terms of service and go back
[at this point, Play Store is working well]
5. Launch application with implemented in-app billing v3 (IAB)
6. In-app billing doesn't work!

EXPECTED OUTPUT:
IAB service runs, user of launched application can purchase in-app content.

ACTUAL OUTPUT:
InAppBillingService.checkBillingEnabled: Billing unavailable for this package 
and user.

OS VERSION:
Android 4.2.1
Android 4.0.4

MARKET/MYAPPS VERSION:
Play Store 3.10.9 (on both Android versions)

DEVICE:
Samsung Galaxy Nexus (4.2.1)
HTC Incredible S (4.0.4)
The same behavior also observed on LG Optimus One and on HTC Wildfire

OUTPUT FROM ADB BUGREPORT ATTACHED:
12-11 13:40:51.302: INFO/ActivityManager(388): Start proc cc.carnero.myapp for 
activity cc.carnero.myapp/.activity.PlayerActivity: pid=639 uid=10097 
gids={50097, 3003, 1028}
12-11 13:40:51.365: INFO/dalvikvm(639): Turning on JNI app bug workarounds for 
target SDK version 13...
12-11 13:40:51.459: DEBUG/dalvikvm(358): GC_CONCURRENT freed 530K, 6% free 
9855K/10420K, paused 5ms+6ms, total 43ms
12-11 13:40:51.685: INFO/imt-media-android(639): Applocation started, debug 
build: true, ant/maven: false
12-11 13:40:51.818: DEBUG/dalvikvm(639): GC_FOR_ALLOC freed 103K, 2% free 
9101K/9236K, paused 56ms, total 56ms
12-11 13:40:51.857: DEBUG/dalvikvm(639): GC_CONCURRENT freed 137K, 3% free 
9362K/9636K, paused 3ms+2ms, total 28ms
12-11 13:40:51.857: DEBUG/dalvikvm(639): WAIT_FOR_CONCURRENT_GC blocked 19ms
12-11 13:40:51.896: INFO/ActivityManager(388): No longer want cz.idnes.kemel 
(pid 32265): empty #17
12-11 13:40:51.935: DEBUG/dalvikvm(639): GC_FOR_ALLOC freed 130K, 3% free 
9524K/9736K, paused 14ms, total 15ms
12-11 13:40:51.935: INFO/dalvikvm-heap(639): Grow heap (frag case) to 9.901MB 
for 602896-byte allocation
12-11 13:40:51.951: DEBUG/dalvikvm(639): GC_CONCURRENT freed <1K, 3% free 
10113K/10328K, paused 4ms+3ms, total 20ms
12-11 13:40:51.951: DEBUG/dalvikvm(639): WAIT_FOR_CONCURRENT_GC blocked 16ms
12-11 13:40:51.951: DEBUG/dalvikvm(639): WAIT_FOR_CONCURRENT_GC blocked 4ms
12-11 13:40:51.966: DEBUG/dalvikvm(639): GC_FOR_ALLOC freed <1K, 3% free 
10113K/10328K, paused 12ms, total 12ms
12-11 13:40:51.966: INFO/dalvikvm-heap(639): Grow heap (frag case) to 10.923MB 
for 1072656-byte allocation
12-11 13:40:51.990: DEBUG/dalvikvm(639): GC_FOR_ALLOC freed 0K, 2% free 
11160K/11376K, paused 17ms, total 17ms
12-11 13:40:52.201: DEBUG/dalvikvm(639): GC_CONCURRENT freed 0K, 2% free 
11163K/11376K, paused 2ms+197ms, total 214ms
12-11 13:40:52.263: DEBUG/dalvikvm(639): GC_FOR_ALLOC freed 785K, 9% free 
10939K/11896K, paused 16ms, total 17ms
12-11 13:40:52.318: DEBUG/dalvikvm(639): GC_CONCURRENT freed 203K, 5% free 
11359K/11896K, paused 3ms+3ms, total 24ms
12-11 13:40:52.318: DEBUG/dalvikvm(639): WAIT_FOR_CONCURRENT_GC blocked 19ms
12-11 13:40:52.349: DEBUG/IabHelper(639): Starting in-app billing setup.
12-11 13:40:52.349: INFO/myapp(639): initializing HTTP client
12-11 13:40:52.396: INFO/myapp(639): Allocation [KB]: 11870
12-11 13:40:52.607: DEBUG/dalvikvm(639): GC_CONCURRENT freed 240K, 3% free 
11835K/12104K, paused 3ms+4ms, total 22ms
12-11 13:40:52.982: INFO/AudioService(388): Remote Control   
registerMediaButtonIntent() for PendingIntent{41af2910: 
PendingIntentRecord{41af27e8 cc.carnero.myapp broadcastIntent}}
12-11 13:40:52.982: VERBOSE/PhoneStatusBar(589): setLightsOn(true)
12-11 13:40:53.013: DEBUG/Reader(358): Synchronization service will run at Tue 
Dec 11 14:10:53 CET 2012
12-11 13:40:53.021: WARN/Settings(639): Setting android_id has moved from 
android.provider.Settings.System to android.provider.Settings.Secure, returning 
read-only value.
12-11 13:40:53.021: WARN/myapp(639): activity is resumed, but service isn't 
ready
12-11 13:40:53.045: DEBUG/IabHelper(639): Billing service connected.
12-11 13:40:53.045: DEBUG/IabHelper(639): Checking for in-app billing 3 support.
12-11 13:40:53.060: DEBUG/Finsky(466): [17017] 
InAppBillingService.getPreferredAccount: cc.carnero.myapp: Account from first 
account - [U5BM5MJ2rjZT25XwwOKumEyFh84]
12-11 13:40:53.068: WARN/Finsky(466): [17017] 
InAppBillingService.checkBillingEnabled: Billing unavailable for this package 
and user.
12-11 13:40:53.130: INFO/ActivityManager(388): No longer want 
com.google.android.apps.docs (pid 32429): empty #17
12-11 13:40:53.170: INFO/Choreographer(26207): Skipped 72 frames!  The 
application may be doing too much work on its main thread.
12-11 13:40:53.380: DEBUG/imt-media-android(639): Starting playback right from 
start command.
12-11 13:40:53.388: WARN/imt-media-android(639): starting playback with unknown 
artist and song title
12-11 13:40:55.216: DEBUG/dalvikvm(19796): GC_CONCURRENT freed 259K, 34% free 
10094K/15204K, paused 6ms+3ms, total 45ms
12-11 13:40:55.591: DEBUG/imt-media-android(639): START playback
12-11 13:40:55.599: INFO/imt-media-android(639): audioTrackBufferSize = 110592
12-11 13:40:55.607: ERROR/imt-media-android(639): Can't read. cantReadNum = 0
12-11 13:40:55.654: ERROR/imt-media-android(639): Can't read. cantReadNum = 1
12-11 13:40:55.677: DEBUG/dalvikvm(639): GC_CONCURRENT freed 959K, 8% free 
11804K/12804K, paused 14ms+3ms, total 37ms
12-11 13:40:55.677: DEBUG/dalvikvm(639): WAIT_FOR_CONCURRENT_GC blocked 18ms

NOTES:
When I return to Play Store, switch to second account and agree with terms of 
service on it, it starts working. Implementation of IAB is taken from example.

Original issue reported on code.google.com by carn...@carnero.cc on 11 Dec 2012 at 1:21

GoogleCodeExporter commented 8 years ago
Couldn't repro this problem. It's WAI for me. Is the second account special in 
some way (e.g. set up as a resident of some country where Google Play does not 
support buying apps?) If you try to purchase something from Google Play with 
it, does it go through?

Original comment by b...@google.com on 5 Feb 2013 at 7:29

GoogleCodeExporter commented 8 years ago
In my case there is a slight deviation on this problem. I have the dev acc and 
another one that has bought IAPs in an earlier device. No matter how many times 
I switch accounts in the Play app, I always get the developer account showing 
when trying to do an IAP. Needless to say that I've tried installing the app 
from the non-dev account and tried clearing data of both Play and the app using 
IAB to no avail. 

P.S. If I use another user on the same device and only add the non-dev account 
on that user, it works fine, but I assume that's to be expected.

Original comment by veni...@gmail.com on 6 Feb 2013 at 11:30

GoogleCodeExporter commented 8 years ago
Both accounts are standard, created in Czech republic (buy/sell). On both 
accounts are already bought applications and some applications were bought 
after this error occured. I didn't notice any other unusual thing.

I think that key is terms of services of Play Store. If TOS' are agreed on both 
accounts, it works. If only on one account, it fails.

Original comment by carn...@carnero.cc on 7 Feb 2013 at 12:54

GoogleCodeExporter commented 8 years ago
I see this problem if the first account is a Google Apps account and the second 
is a Gmail account.

Original comment by malac...@gmail.com on 22 Feb 2013 at 5:56

GoogleCodeExporter commented 8 years ago
I tested it on two Google Apps Accounts. Forget to mention it, sorry.

Original comment by carn...@carnero.cc on 22 Feb 2013 at 6:27

GoogleCodeExporter commented 8 years ago
You would think that LVL 
(http://code.google.com/p/marketlicensing/issues/detail?id=41) and IAB could 
both do a simple for loop instead of accounts[0].  Very amateur programming.

Original comment by malac...@gmail.com on 22 Feb 2013 at 6:47