Invalid state after uninstalling the Vimeo API

Hope someone can help. I use jQuery dropzone.js to upload the video, and I can upload the video in order, but I cannot β€œcomplete” the process, so the video always remains in the processing / loading state. I am following the correct procedures as per the Vimeo API docs. Here are some headers / answers, if they help, I replaced some xxxx values:

Download request headers:

PUT /upload?ticket_id=xxxx&video_file_id=514311645&signature=acd2a6c4ba8c147651604793b081e053&v6=1 HTTP/1.1 Host: 1511923755.cloud.vimeo.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0 FirePHP/0.7.4 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate, br Content-Type: video/mp4 Referer: http://local.xxxx.co.uk/vimeo Content-Length: 29158540 Origin: http://local.xxxx.co.uk x-insight: activate Connection: keep-alive 

Download response headers:

 HTTP/1.1 200 OK Server: Vimeo/1.0 Content-Type: text/plain Access-Control-Allow-Origin: * Timing-Allow-Origin: * Access-Control-Expose-Headers: Range Access-Control-Allow-Headers: Content-Type, Content-Range, X-Requested-With X-Requested-With: XMLHttpRequest Access-Control-Allow-Methods: POST, PUT, GET, OPTIONS Content-Length: 0 Connection: close Date: Thu, 14 Apr 2016 08:05:19 GMT X-Backend-Server: kopiluwak 

Download answer:

 <pre>Array ( [body] => [status] => 308 [headers] => Array ( [] => [HTTP/1.1 308 Resume Incomplete] => [Server] => Vimeo/1.0 [Content-Type] => text/plain [Access-Control-Allow-Origin] => * [Timing-Allow-Origin] => * [Access-Control-Expose-Headers] => Range [Access-Control-Allow-Headers] => Content-Type, Content-Range, X-Requested-With [X-Requested-With] => XMLHttpRequest [Access-Control-Allow-Methods] => POST, PUT, GET, OPTIONS [Content-Length] => 0 [Connection] => close [Range] => bytes=0-29158540 [Date] => Thu, 14 Apr 2016 08 [X-Backend-Server] => kopiluwak ) ) </pre> 

CURL DELETE:

 <pre>Array ( [47] => 1 [10036] => DELETE [10015] => [10023] => Array ( [0] => Accept: application/vnd.vimeo.*+json; version=3.2 [1] => User-Agent: vimeo.php 1.0; (http://developer.vimeo.com/api/docs) [2] => Authorization: Bearer xxxx ) ) </pre> 

Reply from DELETE:

 <pre>Array ( [body] => Array ( [error] => Invalid state ) [status] => 500 [headers] => Array ( [Server] => nginx [Content-Type] => application/vnd.vimeo.error+json [Cache-Control] => no-cache, max-age=315360000 [Strict-Transport-Security] => max-age=15120000; includeSubDomains; preload [Expires] => Sun, 12 Apr 2026 08 [Accept-Ranges] => bytes [Via] => 1.1 varnish [Fastly-Debug-Digest] => 771e16bfeec90f734db73b1b0ee67af1dae1f86d0e6c56d4585eb9958a1684b7 [Content-Length] => 25 [Date] => Thu, 14 Apr 2016 08 [Connection] => keep-alive [X-Served-By] => cache-iad2138-IAD, cache-lcy1126-LCY [X-Cache] => MISS, MISS [X-Cache-Hits] => 0, 0 [X-Timer] => S1460621123.195320,VS0,VE593 [Vary] => Accept,Vimeo-Client-Id,Accept-Encoding ) ) </pre> 
0
php curl vimeo vimeo-api
source share
1 answer

I just answered the same topic on the Vimeo forum, and another SO thread I read - I had the same problem, and I just posted it here because there did not seem to be a solution for this particular thread.

Also, regarding your message, there is not much information in your post. Your deletion request is not all that is required - the assumption would be that you created a valid ticket request, loaded properly, THEN tried the sent del request.

Your answer is similar to mine below - if your script download tried to get a ticket AFTER you already received it on your server, this problem will pop up, as in my code.

Vimeo post: https://vimeo.com/forums/api/topic:278394

My solution: I solved my version of the question - I think Vimeo recently fixed some things in its APIs because my code did not have an error and then suddenly appeared recently. I would argue that they added a speed limit to their API gateway or potentially overwrite existing requests to clear old requests ...

Anyway, here is my fix:

There are 5 steps to completing a video download through Renewable HTTP downloads ( developer.vimeo.com/api/upload/videos ).

I do everything except download through my PHP server. I requested a ticket through PHP, so as not to expose any secret information through my modified JS interface ( github.com/websemantics/vimeo-upload ), but I did not edit correctly request a ticket through JS code, so the current error is probably triggered by to this second invalid request (i.e. rewriting or limiting the speed of my original valid request through PHP). As soon as I get around the JS "download" function correctly and jump directly to the JS "sendFile_", loading will work correctly again.

Hope someone helps!

0
source share

All Articles