-
Notifications
You must be signed in to change notification settings - Fork 20
Malformed Json Error #48
Comments
@bluntk thanks for reporting! We're going to need a bit more information of how and when you get this error. Can you add some steps to reproduce? Which piece of code are you running? Which methods are you calling? Thanks |
Of course.
Then i call image file and transform it to base64 `$base64 = base64_encode($data);
and after 1 succesfull pin result is like screenshot i uploaded for this issue. Thank you for reply |
Hi @bluntk Can you post the stacktrace of the exception you're getting? (Make sure to remove any personal details) |
Fatal error: Uncaught Pinterest\Http\Exceptions\MalformedJson in /var/www/html/pinterest/app/classes/vendor/hansott/pinterest-php/src/Pinterest/Http/Response.php:152 Stack trace: #0 /var/www/html/pinterest/app/classes/vendor/hansott/pinterest-php/src/Pinterest/Http/Response.php(83): Pinterest\Http\Response->parseJson('\x1F\x8B\x08\x00\x00\x00\x00\x00\x04\x03\xAAVJI,...') #1 /var/www/html/pinterest/app/classes/vendor/hansott/pinterest-php/src/Pinterest/Http/BuzzClient.php(88): Pinterest\Http\Response->__construct(Object(Pinterest\Http\Request), 201, '\x1F\x8B\x08\x00\x00\x00\x00\x00\x04\x03\xAAVJI,...', Array) #2 /var/www/html/pinterest/app/classes/vendor/hansott/pinterest-php/src/Pinterest/Http/BuzzClient.php(133): Pinterest\Http\BuzzClient::convertResponse(Object(Pinterest\Http\Request), Object(Buzz\Message\Response)) #3 /var/www/html/pinterest/app/classes/vendor/hansott/pinterest-php/src/Pinterest/Authentication.php(255): Pinterest\Http\BuzzClient->execute(Object(Pinterest\Http\Request)) #4 /var/www/html/pinterest/app/c in /var/www/html/pinterest/app/classes/vendor/hansott/pinterest-php/src/Pinterest/Http/Response.php on line 152 |
I'm able to reproduce! |
Glad to hear that. I heard many other people having this error. Maybe pinterest changed something in their backend. |
They seem to return some funky stuff if reach the rate limit... You will now receive a rate limited exception instead of a malformed JSON exception ;) |
Tagged a new release: https://github.com/hansott/pinterest-php/releases/tag/3.2.7 |
I dont think it is about rate limit because i have 1000 rate limit per hour. I will try and let you know if it is still exists |
I downloaded last patch and replaced old one still got the same error. Some people say it is about set xmlhttp = server.Createobject("Msxml2.ServerXMLHTTP.6.0") on windows. |
I have no clue why they send that weird stuff. Probably something to do with their backend I'm afraid (like you say)... Maybe you can try contacting Pinterest? https://developers.pinterest.com/support/contact/ My test application doesn't have 1000 API calls... I can't test properly with 10 calls/hour. 😢 About the XML part, I'm a mac user :) |
And i am linux :/ I can give you token if you want to try with more rate limit. Send me your email |
Hello i am getting malformed json error after one succesfull pin. I checked rawBody response and it look like a jpeg code.
I attached a screenshot which is shows how response is.
The text was updated successfully, but these errors were encountered: