Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test for video uploads longer than 30 seconds #956

wants to merge 1 commit into from


None yet
1 participant
Copy link

commented Jul 8, 2019

Uploading videos longer than 30 seconds seems to be broken in master and 6.2.0.

This PR adds a spec for that. Unfortunately it incorrectly does pass, because the request is stubbed. I'm not sure what the right approach here is?

Either way, running the code in production does lead to problems.

Uploading an image works fine:

image ="/…/image.jpg") # path abbreviated for readability
twitter_client.update_with_media "foobar 123", [image]

Uploading a video raises an exception:

video ="/…/video.mp4") # path abbreviated for readability
twitter_client.update_with_media "foobar 456", [video]

Result in 6.2.0 (latest stable):

Duration too long, maximum:30000, actual:36130 (MediaId: snf:1148158346190577664)"

Twitter does support videos longer than 30 seconds however, when using chunked uploading which seems to be implemented in master. However, running the same code in master returns a different error:

Not valid video

Specifically, the error code is 324. From the Twitter Docs:

The validation of media ids failed. | Corresponds with HTTP 400. There was a problem with the media ID submitted with the Tweet.

The video file passes all requirements. I tried uploading the same file through which worked fine.


This comment has been minimized.

Copy link

commented Jul 8, 2019

Looks like #937 addresses this same issue and actually fixes it. Closing this PR in favor of that one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.