GithubHelp home page GithubHelp logo

Comments (34)

Dashron avatar Dashron commented on May 30, 2024

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.

Dashron avatar Dashron commented on May 30, 2024

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.

Dashron avatar Dashron commented on May 30, 2024

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.

yosavital avatar yosavital commented on May 30, 2024

still get the same problem with [email protected]

from vimeo.js.

johnnycrab avatar johnnycrab commented on May 30, 2024

When calling which api request exactly do you still get the error?

from vimeo.js.

yosavital avatar yosavital commented on May 30, 2024

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.

johnnycrab avatar johnnycrab commented on May 30, 2024

and the error you are getting is this "sorry, vimeo will be right back" html page?

from vimeo.js.

yosavital avatar yosavital commented on May 30, 2024

yes

from vimeo.js.

johnnycrab avatar johnnycrab commented on May 30, 2024

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.

yosavital avatar yosavital commented on May 30, 2024

yes, I got an upload ticket

from vimeo.js.

Dashron avatar Dashron commented on May 30, 2024

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.

johnnycrab avatar johnnycrab commented on May 30, 2024

I can't replicate the 503 anymore either...

from vimeo.js.

Dashron avatar Dashron commented on May 30, 2024

Also, from within the directory of your script, can you send me the contents of npm list

from vimeo.js.

yosavital avatar yosavital commented on May 30, 2024

@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.

Dashron avatar Dashron commented on May 30, 2024

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.

johnnycrab avatar johnnycrab commented on May 30, 2024

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.

yosavital avatar yosavital commented on May 30, 2024

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.

yosavital avatar yosavital commented on May 30, 2024

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.

johnnycrab avatar johnnycrab commented on May 30, 2024

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.

Dashron avatar Dashron commented on May 30, 2024

Nice catch, fixing now.

from vimeo.js.

johnnycrab avatar johnnycrab commented on May 30, 2024

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.

yosavital avatar yosavital commented on May 30, 2024

now it's work well in windows 8.1 and Ubuntu 14.04.2 both with node v0.12.0
thanks!!!

from vimeo.js.

Dashron avatar Dashron commented on May 30, 2024

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.

Dashron avatar Dashron commented on May 30, 2024

Just published 1.1.4. Should solve the issue with empty deletes

from vimeo.js.

johnnycrab avatar johnnycrab commented on May 30, 2024

👍

from vimeo.js.

apatinoyu avatar apatinoyu commented on May 30, 2024

Has it been fixed? I got same issues with vimeo 1.1.4 and 1.1.3 version

from vimeo.js.

johnnycrab avatar johnnycrab commented on May 30, 2024

It should be. My production apps haven't experienced this issue since then. Can you elaborate on your problems?

from vimeo.js.

apatinoyu avatar apatinoyu commented on May 30, 2024

I'll let you know, I am trying with vimeo 1.2.0

from vimeo.js.

apatinoyu avatar apatinoyu commented on May 30, 2024

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.

johnnycrab avatar johnnycrab commented on May 30, 2024

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.

apatinoyu avatar apatinoyu commented on May 30, 2024

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.

apatinoyu avatar apatinoyu commented on May 30, 2024

Well.. the web https://developer.vimeo.com/api/spec is down too :/

from vimeo.js.

tommypenner avatar tommypenner commented on May 30, 2024

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.

johnnycrab avatar johnnycrab commented on May 30, 2024

Good to know! Thanks for the update!

from vimeo.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.