You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I found a stack trace leading to a callback error of being called multiple times.
I narrowed it down where it happens in my code, and where it is happening should not be a problem on my side.
Checking the vimeo.js file I can see that on "Vimeo.prototype.request" it would call "_handleRequest" using the same callback as when it is checking for req.on('error").
If both were to run at the same request, that is a request that was sent and then received an error, this would cause the callback to be called twice causing the stacktrace.
Update:
I was able to reproduce the error by closing my internet connection right after the first request is sent.
Apparently, the line 138 gets called twice. That is caused by a retry on the "request" module, making the callback function with the error message to run twice.
Adding a req.abort after the first error seems to avoid the problem, preventing the default retry behavior.
Hello, I found a stack trace leading to a callback error of being called multiple times.
I narrowed it down where it happens in my code, and where it is happening should not be a problem on my side.
Checking the vimeo.js file I can see that on "Vimeo.prototype.request" it would call "_handleRequest" using the same callback as when it is checking for req.on('error").
If both were to run at the same request, that is a request that was sent and then received an error, this would cause the callback to be called twice causing the stacktrace.
Version: [email protected]
The text was updated successfully, but these errors were encountered: