galen / PHP-Instagram-API

PHP 5.3+ wrapper for the Instagram API
338 stars 159 forks source link

ApiException: Problem (2) in the Chunked-Encoded data #20

Closed neemzy closed 11 years ago

neemzy commented 11 years ago

Hi galen,

First, thanks a bunch for this library. I'm finding myself using it every once in a while through Composer and it's really nice.

I'm currently back working on a project I left aside for a couple of weeks, and found out my code using your library isn't working anymore :

$i = new Instagram\Instagram();
$i->setClientID('myclientid');
$test = $i->getTag('mytag')->getMedia()->getData();

This ends up with an "ApiException: Problem (2) in the Chunked-Encoded data". This exact same snippet used to work like a charm a couple weeks ago as I said ; I update my project's dependencies (including your library) through Composer on a regular basis, so I assume it's related to some change that occured in the meantime. Of course, I've tried various tags (no weird characters included, it's all [a-z]+) for the same result.

I can also tell you I already used your library on a previous project that went live before I start encountering this issue (which means I don't update its dependencies anymore), and it's still working, so I'm really positive this is caused by some recent change.

Could you please look into this ?

Regards,

galen commented 11 years ago

why are you using getData()?

neemzy commented 11 years ago

Hi,

I thought I had to... If I'm not mistaken, getData() gives me an array of objects I can use at my convenience (that is to say, on which I can call methods such as getCreatedTime(), getLikesCount(), getStandardRes()...).

Isn't it the right way to use the lib ?

Regards

galen commented 11 years ago

no, its not. check out the examples

neemzy commented 11 years ago

Not calling getData() on getMedia() doesn't fix the issue, I'm still getting the same error.

galen commented 11 years ago

It's working fine in all my tests. Im guessing it's a server issue.

neemzy commented 11 years ago

Well, might be... thanks for your time anyway, I'll close this.

neemzy commented 11 years ago

(For the record, it was indeed server-related, the lib works fine)

galen commented 11 years ago

(:

On Monday, July 15, 2013, Tom Panier wrote:

(For the record, it was indeed server-related, the lib works fine)

— Reply to this email directly or view it on GitHubhttps://github.com/galen/PHP-Instagram-API/issues/20#issuecomment-20971800 .

lukamacun commented 10 years ago

Hi @neemzy @galen , I'm having the same issue, would you mind sharing your solution to this problem?

neemzy commented 10 years ago

@morphsd Unfortunately, this was an issue I only encountered while developing locally on Windows ; my solution was to just ignore it as the lib worked fine once on a Linux machine. Which OS are you experiencing this on ?

lukamacun commented 10 years ago

I had it on Windows, but now I deployed it to server that runs Ubuntu 12.04 and nginx server. And now it throws Unknown error exception time to time. :(