Issue 24 in android-market-api-php: Uncaught exception 'HTTP request returned code 400' in MarketSession.php

185 views
Skip to first unread message

android-mar...@googlecode.com

unread,
Feb 20, 2011, 10:13:16 AM2/20/11
to android-mar...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 24 by vasiljko...@gmail.com: Uncaught exception 'HTTP request
returned code 400' in MarketSession.php
http://code.google.com/p/android-market-api-php/issues/detail?id=24

What steps will reproduce the problem?
1. Checkout code from trunk
2. Update local.php with correct device id and credentials
3. Try to run examples/test_search.php

What is the expected output? What do you see instead?
Search should return some data, instead there is exception mentioned in the
summary.

Complete Stack Trace follows:


Fatal error: Uncaught exception 'Exception' with message 'HTTP request
returned code 400' in D:\xampp\htdocs\market2\Market\MarketSession.php:212
Stack trace: #0 D:\xampp\htdocs\market2\Market\MarketSession.php(160):
MarketSession->executeRawHttpQuery('??????DQAAAJwAA...') #1
D:\xampp\htdocs\market2\Market\MarketSession.php(147):
MarketSession->executeProtobuf(Object(Request)) #2
D:\xampp\htdocs\market2\examples\test_search.php(23):
MarketSession->execute(Object(Request_RequestGroup)) #3 {main} thrown in
D:\xampp\htdocs\market2\Market\MarketSession.php on line 212


android-mar...@googlecode.com

unread,
Mar 8, 2011, 4:17:45 PM3/8/11
to android-mar...@googlegroups.com

Comment #1 on issue 24 by vekexa...@gmail.com: Uncaught exception 'HTTP
request returned code 400' in MarketSession.php
http://code.google.com/p/android-market-api-php/issues/detail?id=24

I'm receiving this too :(

android-mar...@googlecode.com

unread,
Mar 14, 2011, 9:38:26 PM3/14/11
to android-mar...@googlegroups.com

Comment #2 on issue 24 by jimr.c...@gmail.com: Uncaught exception 'HTTP
request returned code 400' in MarketSession.php
http://code.google.com/p/android-market-api-php/issues/detail?id=24

I am also having this problem, did either of you guys figure out a
resolution for this error?

android-mar...@googlecode.com

unread,
May 17, 2011, 9:54:29 AM5/17/11
to android-mar...@googlegroups.com
Updates:
Status: Accepted

Comment #3 on issue 24 by splitfeed: Uncaught exception 'HTTP request

Are all of you using IDs fetched using the market_checkin method?

android-mar...@googlecode.com

unread,
May 30, 2011, 9:33:12 AM5/30/11
to android-mar...@googlegroups.com

Comment #4 on issue 24 by guptnee...@gmail.com: Uncaught exception 'HTTP
request returned code 400' in MarketSession.php
http://code.google.com/p/android-market-api-php/issues/detail?id=24

When i try to run example test_search.php it show following error:-

Fatal error: Call to undefined function curl_init() in
C:\wamp\www\android\Market\MarketSession.php on line 81

android-mar...@googlecode.com

unread,
May 30, 2011, 2:51:58 PM5/30/11
to android-mar...@googlegroups.com

Comment #5 on issue 24 by splitfeed: Uncaught exception 'HTTP request

Call to undefined function curl_init() means that you need to activate the
cURL extension for PHP, that's a requirement for the API

android-mar...@googlecode.com

unread,
Jun 14, 2011, 7:37:03 PM6/14/11
to android-mar...@googlegroups.com

Comment #6 on issue 24 by kp.k...@gmail.com: Uncaught exception 'HTTP
request returned code 400' in MarketSession.php
http://code.google.com/p/android-market-api-php/issues/detail?id=24

You have not entered a correct Android Device ID in the local.example.php
file

android-mar...@googlecode.com

unread,
Jun 21, 2011, 9:08:01 AM6/21/11
to android-mar...@googlegroups.com

Comment #7 on issue 24 by aaforti...@gmail.com: Uncaught exception 'HTTP
request returned code 400' in MarketSession.php
http://code.google.com/p/android-market-api-php/issues/detail?id=24

It is worth noting that the device ID in local.php is the phone's IMEI.
Not the "deviceId" argument sent in the HTTP GET to the market URL...

With a correct device Id, this fixes the pb.

Guru moorthi

unread,
May 14, 2014, 8:44:29 AM5/14/14
to android-mar...@googlegroups.com, codesite...@google.com, android-mar...@googlecode.com

My local.php looked like,

define('GOOGLE_EMAIL','emil id);
define('GOOGLE_PASSWD','pwd');
define('ANDROID_DEVICEID','xxxx');

what is the android_deviceid?

I'm getting this error... 

Fatal error: Uncaught exception 'Exception' with message 'Required fields are missing' in //proto/market.proto.php:2680 Stack trace: #0 //proto/market.proto.php(3419): RequestContext->write(Resource id #7) #1 //Market/MarketSession.php(178): Request->write(Resource id #7) #2 /google/Market/MarketSession.php(165): MarketSession->protobufToStr(Object(Request)) #3 /Market/MarketSession.php(152): MarketSession->executeProtobuf(Object(Request)) #4 /examples/test_top.php(21): MarketSession->execute(Object(Request_RequestGroup)) #5 {main} thrown in /proto/market.proto.php on line 2680

Reply all
Reply to author
Forward
Message has been deleted
0 new messages