An error occurred while posting a particular image

media

#1

Hi,
An error occurred while posting tweet with a particular image (all other tested images published successfully).
Media has been successfully loaded on Twitter, but error occur on publish tweet with this image: Twitter response with status 500 and empty message.
Tweet contains image https://cdn.semrush.com/smm/api/media/data/image/5ab23de6410df800015308f3 (PNG, 1600x1066px, 594KB).
Media ID on Twitter side: 976416133711650818
Please, help up to understand the causes of this error.


#2

I’ve been unable to reproduce this, posting the image using our large video upload sample. What is your code doing?


#3

Hi Andy,
yes, today this small image works OK, but a bigger one still fails: https://prnt.sc/iup73t

We use Java to call Twitter API, but I’ve used https://github.com/twitterdev/large-video-upload-python as you suggested and got the following result:

INIT
Media ID: 976751140795797504
APPEND
2866113 of 2866113 bytes uploaded
Upload chunks complete.
FINALIZE
{u’media_id’: 976751140795797504, u’image’: {u’image_type’: u’image/png’, u’h’: 1283, u’w’: 1925}, u’media_id_string’: u’976751140795797504’, u’expires_after_secs’: 86400, u’media_key’: u’3_976751140795797504’, u’size’: 2866113}
{u’errors’: [{u’message’: u’Internal error’, u’code’: 131}]}

Please note that I use the following parameters for INIT command:

request_data = {
‘command’: ‘INIT’,
‘media_type’: ‘image/png’,
‘total_bytes’: self.total_bytes,
‘media_category’: ‘tweet_image’
}


#4

Hey all,

Here at HubSpot we’ve been running into this for a while, too. Chunked or unchunked. This also occurs when I try to upload a big, 2.9MB PNG image to the Twitter desktop app, which makes me think it’s a general system issue and not an API issue.

Here’s a sample image that fails: http://i.cubeupload.com/GPTZw4.png

I was able to fix this by resizing the PNG down to around 2.4MB or 2.5MB by an image library.


#5

We’ve been experiencing this for months and I could probably provide additional examples if it helps.


#6

And in fact, now this picture is published successfully, but others (larger ones as mentioned by @ilia_at_smrsh ) are not.


#7

Just did a test and still seeing the same error for the image even when posting directly to twitter.com on desktop Chrome.