Closed mhadad closed 7 years ago
the response doesn't seem to be in JSON, verify your configuration with back4app, perhaps the server URL is not the right one. What'S the result when you to:
curl -H 'X-Parse-Application-Id: YOUR_APP_ID' -H 'X-Parse-Rest-API-Key: YOUR_REST_KEY' https://parseapi.back4app.com/cat/kEVIRIy2xW
replacing YOUR_APP_ID / YOUR_REST_KEY with your keys.
Hi,
Thanks alot for your reply. I'm getting {"message":"Not Found","error":{}} though I have cat as a class in our Parse and the objectId exists in that collection
that's not a standard parse error, when you run with curl -vvv ...
what does it produce? be careful stripping your keys before posting.
` curl -X GET -vvv --insecure -H "X-Parse-Application-Id: appId" -H "X-Parse-REST-API-Key: restKey" https://parseapi.back4app.com/cat/kEVIRIy2xW
GET /cat/kEVIRIy2xW HTTP/1.1 User-Agent: curl/7.29.0 Host: parseapi.back4app.com Accept: / X-Parse-Application-Id: appId X-Parse-REST-API-Key: restId
< HTTP/1.1 404 Not Found < access-control-allow-credentials: true < access-control-allow-headers: DNT, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, X-Application-ID, X-Access-Token, X-Parse-Master-Key, X-Parse-REST-API-Key, X-Parse-Javascript-Key, X-Parse-Application-Id, X-Parse-Client-Version, X-Parse-Session-Token, X-Requested-With, X-Parse-Revocable-Session, X-CSRF-Token < access-control-allow-methods: GET, POST, PUT, PATCH, DELETE, OPTIONS < access-control-allow-origin: * < Content-Type: application/json; charset=utf-8 < Date: Sun, 03 Sep 2017 17:29:59 GMT < etag: W/"22-uMxdnnHYNrjyRB+IKewl8A" < Server: nginx < X-Content-Type-Options: nosniff < X-Frame-Options: SAMEORIGIN < x-powered-by: Express < X-XSS-Protection: 1; mode=block; < Content-Length: 34 < Connection: keep-alive <
even if I use the --insecure or -k arguments neither with the --cacert it does not work.
I'm not sure then you should probably reach back4app support as it doesn't seem to be an issue with the PHP SDK (Curl is not working as expected either)
Line 343 in ParseCurlHttpClient.php
Change
$headerSize = mb_strlen($this->response) - $match[1];
to
$headerSize = mb_strlen($this->response, '8bit') - $match[1];
Line 343 in ParseCurlHttpClient.php Change
$headerSize = mb_strlen($this->response) - $match[1];
to$headerSize = mb_strlen($this->response, '8bit') - $match[1];
This issue has seen after I moved to PHP 7 you save my day!!! Thank youuuuuuu.
Line 343 in ParseCurlHttpClient.php Change
$headerSize = mb_strlen($this->response) - $match[1];
to$headerSize = mb_strlen($this->response, '8bit') - $match[1];
Got same problem,this worked.
Hi,
I'm having an issue with ParseQuery it always returns empty array not even if i use a normal get by objectId.
ParseClient::setCAFile(__DIR__ . '/cacert.pem'); ParseClient::initialize( $app_id, $rest_key, $master_key ); ParseClient::setServerURL('https://parseapi.back4app.com','/'); try { $user = ParseUser::logIn($user, $pass); $cat_query = new ParseQuery("cat"); $cat_query->get("kEVIRIy2xW"); var_dump($cat_query->find(true)); } catch (ParseException $ex) { var_dump($ex->getMessage().' '.$ex->getCode()); }
This query returns string(59) "Bad Request. Could not decode Response: (4) Syntax error -1" while
try { $user = ParseUser::logIn($user, $pass); $cat_query = new ParseQuery("cat"); $cat->equalTo("ID", 3); $cat = $cat_query->find(); var_dump($cat_query->find()); } catch (ParseException $ex) { var_dump($ex->getMessage().' '.$ex->getCode()); }
returns an empty array...what am i doing wrong? even the REST API says parse.com has shutdown