Comments (34)
We're working on fixing the server to actually allow these requests, but this is a great temporary fix. Specifically the following fix the issue:
master...johnnycrab:master#diff-a5a4dd424b43c7cb37c123a90263d75aR105
through
master...johnnycrab:master#diff-a5a4dd424b43c7cb37c123a90263d75aR130
The idea is that the response body needs to be built before the request is made, so that the Content-Length header can be updated.
Then you can write the request body later.
from vimeo.js.
We're still working on the server side fix. I'll be monitoring my email throughout the night and will update this thread when everything is back to normal.
from vimeo.js.
Unfortunately the server fix is taking longer than expected. I've made some small changes to the library (thanks for example code @johnnycrab) that will resolve the problem until everything is back to normal.
Make sure you are running at least 1.1.3 if you are encountering this problem.
from vimeo.js.
still get the same problem with [email protected]
from vimeo.js.
When calling which api request exactly do you still get the error?
from vimeo.js.
var Vimeo = require('vimeo').Vimeo;
var lib = new Vimeo('--------', -------', '-------');
lib.streamingUpload(files[0].fd, function (err, body, status_code, headers) {
if (err) {
// here I get the error
console.log(err);
return res.serverError("Server Error");
}
....
from vimeo.js.
and the error you are getting is this "sorry, vimeo will be right back" html page?
from vimeo.js.
yes
from vimeo.js.
Can you run this code and tell me if you get an upload ticket?
var https = require('https');
var req = https.request({
protocol : 'https:',
hostname: 'api.vimeo.com',
path: '/me/videos',
port : 443,
method : 'POST',
headers : {
'Accept': "application/vnd.vimeo.*+json;version=3.2",
'Content-Type': 'application/json',
'User-Agent': 'whatever',
'Content-Length': 20,
'Authorization': 'bearer HERE_YOUR_ACCESS_TOKEN'
}
}, function (res) {
res.on('data', function (d) {
console.log(d.toString());
});
});
req.write('{"type":"streaming"}');
req.end();
from vimeo.js.
yes, I got an upload ticket
from vimeo.js.
I'm noticing timeouts (we're restarting the upload server 1511655188.cloud.vimeo.com soon), but I can't replicate the 503 error anymore.
Try the above code from @johnnycrab and then try the following, the same request from within the library:
var Vimeo = require('vimeo').Vimeo;
var lib = new Vimeo(client_id, client_secret)
lib.access_token = your_token;
lib.request({
method: "POST",
path: "/me/videos",
query: {type: "streaming"}
}, function (err, resp) {
console.log(err);
console.log(resp);
});
from vimeo.js.
I can't replicate the 503 anymore either...
from vimeo.js.
Also, from within the directory of your script, can you send me the contents of npm list
from vimeo.js.
@Dashron your code is also working, but I don't understand where I should actually uploading the video.
My npm list is too long i'm afraid, is there anything that interest you in particular?
from vimeo.js.
I wanted to double check the version of the vimeo
package. That list is the most accurate way to tell exactly which version your current code is accessing, because npm can look in a couple of different locations for the library.
So the upload ticket works, but the streamingUpload
method doesn't? Can you send me the exact output you receive from that method?
from vimeo.js.
Furthermore, if I may add two things:
1.) Do you get the error right away, or is it already uploading?
2.) The code you posted passes in files[0].fd
to the upload method. It should throw an error much earlier, but just to be sure: Are you passing in a path? Because fd
implies some sort of file descriptor...
from vimeo.js.
in npm list it says: [email protected]
the error that I get is the html error with:
<title>Sorry. Vimeo will be right back.</title> ...Something is weird in the magical forest.
We’ll be back in a jiffy.
I don't get the error right away, it's takes sometime.
I'm passing a path, of course.
this code worked for me two weeks ago, in windows and in ubuntu, now it doesn't.
from vimeo.js.
I tried to run it now in ubuntu and I got:
/home/git/moula/api/v1/node_modules/vimeo/lib/vimeo.js:114
request_options.headers['Content-Length'] = Buffer.byteLength(request_option
^
TypeError: Argument must be a string
at Vimeo.vimeo_request as request
at FileStreamer._user_ready (/home/git/moula/api/v1/node_modules/vimeo/lib/vimeo.js:396:19)
at /home/git/moula/api/v1/node_modules/vimeo/lib/filestreamer.js:78:19
at /home/git/moula/api/v1/node_modules/vimeo/lib/filestreamer.js:220:20
at IncomingMessage. (/home/git/moula/api/v1/node_modules/vimeo/lib/filestreamer.js:263:17)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:943:16
at process._tickDomainCallback (node.js:463:13)
from vimeo.js.
Ah, alright. Can you try the code in my fork, please: https://github.com/johnnycrab/vimeo.js . The library is doing a DELETE request without any data, so maybe something weird is getting passed to Buffer.byteLength? My code's doing a check for the body.
from vimeo.js.
Nice catch, fixing now.
from vimeo.js.
What node version are you running on ubuntu? node v0.12 for example returns '9' when calling Buffer.byteLength with undefined. So effectively the DELETE request is being called with Content-Length: 9
from vimeo.js.
now it's work well in windows 8.1 and Ubuntu 14.04.2 both with node v0.12.0
thanks!!!
from vimeo.js.
I'm on iojs 1.6.1 and can reproduce his error. I get the feeling that a non-zero content length (I get 9 on undefined here too), but with no content sent is dying on our intermediate services
from vimeo.js.
Just published 1.1.4. Should solve the issue with empty deletes
from vimeo.js.
👍
from vimeo.js.
Has it been fixed? I got same issues with vimeo 1.1.4 and 1.1.3 version
from vimeo.js.
It should be. My production apps haven't experienced this issue since then. Can you elaborate on your problems?
from vimeo.js.
I'll let you know, I am trying with vimeo 1.2.0
from vimeo.js.
I got an issue :
<title>Sorry. Vimeo will be right back.</title>
<style>
body {
margin: 0;
padding: 0;
background: #34454E url('http://a.vimeocdn.com/images_v6/ins_down_illustration.png') bottom repeat-x fixed;
color: #ffffff;
font: 36px/1.3 Helvetica, Arial, sans-serif;
text-align: center;
}
...
..
with vimeo: "1.2.0"
I am doing many requests to the method : "get", path : '/users/'
Wich version are you using?
from vimeo.js.
I am currently using my own fork (https://github.com/johnnycrab/vimeo.js) (which needs to be updated to the current upstream version though). My in-production projects that are currently running are basically uploading and editing videos around the clock and I experience no issues. So maybe you'd like to try my fork, and if it works, I can figure out the problem and maybe file a pull request?
from vimeo.js.
Yes, is weird . sometimes It doesnt throw the error and sometimes yes.
But I am going to try to install again the module. let's see . :)
from vimeo.js.
Well.. the web https://developer.vimeo.com/api/spec is down too :/
from vimeo.js.
Response times from the Vimeo API are currently slow or timing out. Vimeo engineers are investigating, updates here:
https://vimeo.com/forums/api/topic:280946
https://twitter.com/vimeoapi
from vimeo.js.
Good to know! Thanks for the update!
from vimeo.js.
Related Issues (20)
- Multiple iFrame end listener event only works for the first video HOT 1
- error: connect ECONNREFUSED 127.0.0.1:80 HOT 2
- Vimeo uploads stopped working
- Upload videos from an SPA (Angular 12) - Which is the best approach? HOT 3
- Can't use the repo to upload any video. HOT 3
- require is not defined HOT 1
- adding thumbnail to video HOT 9
- How to use Vimeo in ViteJS? HOT 1
- Upload fails when video smaller than 0.5s HOT 1
- Compilation Error 'Module not found: Error:' HOT 3
- Error in documention : Pull approach
- player not fullscreen capable on Android HOT 1
- Vimeo Client ignores any upload paramaters HOT 2
- How to add markers to vimeo video HOT 4
- vimeo sdk 2.x support HOT 1
- Document passing `body` via `client.request()` (using `query` and `headers['Content-Type']`) HOT 4
- Node Express - Vimeo upload file size problem
- Sorry, but where is the typescript support? HOT 3
- Function `access_token` returns bad request
- Encountering TLS CERT_HAS_EXPIRED Error Despite Previous Functionality HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vimeo.js.