Updating profile image via API results in broken image on Twitter.com

325 views
Skip to first unread message

Bob

unread,
Jul 14, 2010, 7:45:34 AM7/14/10
to Twitter Development Talk
Whenever we update someones profile image using the API (from
Twibbon.com) it is resulting in a broken image on Twitter.com even
though the API is returning a HTTP 200 OK. The request and response
looks like:

--REQUEST: http://api.twitter.com
POST /1/account/update_profile_image.json HTTP/1.1
Authorization: OAuth
oauth_consumer_key="cmrjngkKmoHNaSG1OfWFA",oauth_token="57184902-
BgSM4dVrnqDsPyFXmU2lYwsAzb406dVWMQMU6YwWE",oauth_nonce="tvx5owtqfawild73",oauth_timestamp="1279107191",oauth_signature_method="HMAC-
SHA1",oauth_signature="5GP911M9Ej
%2FZV4O8VGRAU272aT8%3D",oauth_version="1.0"
Content-Type: multipart/form-data;
boundary=e750bd87-3bee-4a19-98e6-55fb254283ef
--e750bd87-3bee-4a19-98e6-55fb254283ef
Content-Disposition: file; name="image"; filename="jpfette.png"
Content-Type: image/png

[FILE DATA][System.Text.Latin1Encoding]
--e750bd87-3bee-4a19-98e6-55fb254283ef--

--RESPONSE: http://api.twitter.com/1/account/update_profile_image.json
HTTP/1.1 200 OK
Date: Wed, 14 Jul 2010 11:33:12 GMT
Server: hi
Status: 200 OK
X-Transaction: 1279107192-63482-30103
ETag: "23eefa77c91e270e9d96507216e06334"
Last-Modified: Wed, 14 Jul 2010 11:33:12 GMT
X-Runtime: 0.05593
Content-Type: application/json; charset=utf-8
Content-Length: 1332
Pragma: no-cache
X-Revision: DEV
Expires: Tue, 31 Mar 1981 05:00:00 GMT
Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-
check=0
Set-Cookie: k=84.19.234.238.1279107192043086; path=/; expires=Wed, 21-
Jul-10 11:33:12 GMT; domain=.twitter.com,guest_id=127910719241063792;
path=/; expires=Fri, 13 Aug 2010 11:33:12 GMT,lang=en;
path=/,_twitter_sess=BAh7CToPY3JlYXRlZF9hdGwrCGPWutApAToRdHJhbnNfcHJvbXB0MDoHaWQi
%250AJTFhNDgxMDkzYjk4NDhhZDkxOTNlNTM0YTE4YTM3OWM4IgpmbGFzaElDOidB
%250AY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--1622471acd43e84d39724f9f168f573c7fc8de4a;
domain=.twitter.com; path=/
Vary: Accept-Encoding
Connection: close

You can see the broken image on:

http://twitter.com/jpfette

As you can imagine this is causing us a serious problem at present,
any help would be greatly appreciated.

Thanks,

Bob

Founder
Twibbon.com

RayF

unread,
Jul 14, 2010, 12:47:10 PM7/14/10
to Twitter Development Talk
I see the same thing - a good response from the API, but the actual
image is missing on the web pages. The file name is correctly
processed and saved - but no image. If I upload the same image via the
Settings, Profile page, everything works fine. These results are very
consistent. I first observed the failure at 8 am MDT on 7/14/2010.

By the way, I have never been able to upload a PNG via the API, only
JPG or GIF.

Ray Franklin
Avionics Specialists LLC

On Jul 14, 5:45 am, Bob <movingforwa...@gmail.com> wrote:
> Whenever we update someones profile image using the API (from
> Twibbon.com) it is resulting in a broken image on Twitter.com even
> though the API is returning a HTTP 200 OK. The request and response
> looks like:
>
> --REQUEST:http://api.twitter.com
> POST /1/account/update_profile_image.json HTTP/1.1
> Authorization: OAuth
> oauth_consumer_key="cmrjngkKmoHNaSG1OfWFA",oauth_token="57184902-
> BgSM4dVrnqDsPyFXmU2lYwsAzb406dVWMQMU6YwWE",oauth_nonce="tvx5owtqfawild73",o­auth_timestamp="1279107191",oauth_signature_method="HMAC-
> path=/,_twitter_sess=BAh7CToPY3JlYXRlZF9hdGwrCGPWutApAToRdHJhbnNfcHJvbXB0MD­oHaWQi
> %250AJTFhNDgxMDkzYjk4NDhhZDkxOTNlNTM0YTE4YTM3OWM4IgpmbGFzaElDOidB
> %250AY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--1622471a­cd43e84d39724f9f168f573c7fc8de4a;

Bob

unread,
Jul 14, 2010, 1:02:09 PM7/14/10
to Twitter Development Talk
Thanks @RayF glad to know we're not alone in the wilderness here.

Our entire service is based around this function so as you can imagine
our users are screaming loudly at present.

What you describe is almost exactly the same as we are seeing other
than the fact we are usually able to upload PNG images.

To reiterate:

Calls to update_profile_image return a 200 OK
Images uploaded to Amazon S3 by Twitter
When the new image is shown on profiles it is broken
When trying to view one of these images in a browser e.g:

http://a0.twimg.com/profile_images/1078075804/8e9ccddf-ccd0-4ca2-9b66-8eea6dab27e5_bigger.png

Firefox reports "The image cannot be displayed becuase it contains
errors"
IE reports a 403 (access denied)

Looking at the HTTP request for the image using Fiddler shows that S3
is returning:

<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</
Message><RequestId>44DCE9951E7DD003</
RequestId><HostId>NhYnE6GUTSxSl8Ku3/
gCZvUNeMEhcbB8rbAg7qhbqqjaYDZCsnWnUryg8w16qvNh</HostId></Error>

Which can sometimes happen if the ACL permissions are set incorrectly
(or at least not to public) on S3.

I've not heard anything from Twitter yet on the issue, looks like they
have their hands somewhat full at the moment.

Thanks,

Bob

Matt Harris

unread,
Jul 14, 2010, 1:25:40 PM7/14/10
to twitter-deve...@googlegroups.com
Thanks for bringing this to our attention. It's definately not the correct behavior so we'll get somebody looking into this today. I've noticed uploading avatars through the website seems to be working fine so the issue seems isolated to the REST API.

I have filed a ticket on our issue tracker [1] which we'll update with any news and recommend you go there and star the issue so you get the email notifications.

Best,
Matt

--


Matt Harris
Developer Advocate, Twitter
http://twitter.com/themattharris

Bob

unread,
Jul 14, 2010, 1:34:09 PM7/14/10
to Twitter Development Talk
Thanks Matt, I have added what we know to the ticket.

Will update if we find anything else.

On Jul 14, 6:25 pm, Matt Harris <thematthar...@twitter.com> wrote:
> Thanks for bringing this to our attention. It's definately not the correct
> behavior so we'll get somebody looking into this today. I've noticed
> uploading avatars through the website seems to be working fine so the issue
> seems isolated to the REST API.
>
> I have filed a ticket on our issue tracker [1] which we'll update with any
> news and recommend you go there and star the issue so you get the email
> notifications.
>
> Best,
> Matt
>
> 1.http://code.google.com/p/twitter-api/issues/list?thanks=1745
>
>
>
> On Wed, Jul 14, 2010 at 10:02 AM, Bob <movingforwa...@gmail.com> wrote:
> > Thanks @RayF glad to know we're not alone in the wilderness here.
>
> > Our entire service is based around this function so as you can imagine
> > our users are screaming loudly at present.
>
> > What you describe is almost exactly the same as we are seeing other
> > than the fact we are usually able to upload PNG images.
>
> > To reiterate:
>
> > Calls to update_profile_image return a 200 OK
> > Images uploaded to Amazon S3 by Twitter
> > When the new image is shown on profiles it is broken
> > When trying to view one of these images in a browser e.g:
>
> >http://a0.twimg.com/profile_images/1078075804/8e9ccddf-ccd0-4ca2-9b66...

Bob

unread,
Jul 15, 2010, 4:13:53 AM7/15/10
to Twitter Development Talk
FYI, new uploads via the API appear to be working now. Existing
uploads that were made during the down period are still showing as
broken on Twitter.com.

3DTOPO

unread,
Jul 15, 2010, 2:41:47 AM7/15/10
to Twitter Development Talk

I would just add that I am seeing identical behavior here as well.

Matt Harris

unread,
Jul 15, 2010, 11:03:42 AM7/15/10
to twitter-deve...@googlegroups.com
This is a repeat answer of the other thread going on about this but:

Just wanted to say the image uploading should now be fixed but any broken images will need to be uploaded again.
If you're still getting 200 OK but broken images please leave a comment on the issue tracker: http://code.google.com/p/twitter-api/issues/detail?id=1745

Best,
Matt

On Wed, Jul 14, 2010 at 11:41 PM, 3DTOPO <jes...@3dtopo.com> wrote:

I would just add that I am seeing identical behavior here as well.



Reply all
Reply to author
Forward
0 new messages