snobu / destreamer

Save Microsoft Stream videos for offline enjoyment.
MIT License
2.37k stars 439 forks source link

Request failed with status code 400 #286

Closed FraH90 closed 3 years ago

FraH90 commented 3 years ago

Today, on some downloads, I'm getting this error:

Username: ***************************** Access token still good for 31 minutes. Parsing video/group urls [WARNING] HTTP code 400. Retrying request... [ERROR] Error: Request failed with status code 400 at createError (C:\destreamer\node_modules\axios\lib\core\createError.js:16:15) at settle (C:\destreamer\node_modules\axios\lib\core\settle.js:17:12) at IncomingMessage.handleStreamEnd (C:\destreamer\node_modules\axios\lib\adapters\http.js:236:11) at IncomingMessage.emit (events.js:326:22) at endReadableNT (_stream_readable.js:1252:12) at processTicksAndRejections (internal/process/task_queues.js:80:21)

PS Please forgive the weird formatting, this text is an output-log to a text file, since I'm automating the whole download process with a python script. But this is not interfering with the normal destreamer working, I've used this method since the start of the semester.

Coming back to us, the error does occur only for a few videos; other videos (always using the same method, with the python script) are downloaded.

What's happening?

snobu commented 3 years ago

The reason is in the 400 response body but for some reason we decided to only print that when you're passing -v to destreamer.

Make sure you have destreaner at latest commit and run again with -v.

FraH90 commented 3 years ago

The reason is in the 400 response body but for some reason we decided to only print that when you're passing -v to destreamer.

Make sure you have destreaner at latest commit and run again with -v.

Ok, I've run it with an updated version of destreamer (the latest, in master branch) and without -v I'm getting this:

Username: ************************ Access token still good for 59 minutes.  Parsing video/group urls  [WARNING] Got HTTP code 403. Retrying request... { error: { code: 'Forbidden', message: 'The authenticated user is not authorized to access this resource.' } }  [ERROR] Error: Request failed with status code 403 at createError (C:\destreamer\node_modules\axios\lib\core\createError.js:16:15) at settle (C:\destreamer\node_modules\axios\lib\core\settle.js:17:12) at IncomingMessage.handleStreamEnd (C:\destreamer\node_modules\axios\lib\adapters\http.js:236:11) at IncomingMessage.emit (events.js:326:22) at endReadableNT (_stream_readable.js:1252:12) at processTicksAndRejections (internal/process/task_queues.js:80:21)

What is there now that wasn't before is the line: { error: { code: 'Forbidden', message: 'The authenticated user is not authorized to access this resource.' }

But it's not true, I have access to the video which I'm trying to download. If I visit the group with the very same users credential I'm using, I can watch those videos. PS: I'm downloading the videos from groups, using the group URL for downloading all the videos, except the old ones that I already have. Till now it always has worked..

I need to run it with -v to get more info?

FraH90 commented 3 years ago

PS: moreover, now I see that the error isn't anymore a 400, but a 403. But this happens on the very same videos (on the very same group) on which I had the 400 before.

FraH90 commented 3 years ago

Today, on some downloads, I'm getting this error:

Username: ***************************** Access token still good for 31 minutes. Parsing video/group urls [WARNING] HTTP code 400. Retrying request... [ERROR] Error: Request failed with status code 400 at createError (C:\destreamer\node_modules\axios\lib\core\createError.js:16:15) at settle (C:\destreamer\node_modules\axios\lib\core\settle.js:17:12) at IncomingMessage.handleStreamEnd (C:\destreamer\node_modules\axios\lib\adapters\http.js:236:11) at IncomingMessage.emit (events.js:326:22) at endReadableNT (_stream_readable.js:1252:12) at processTicksAndRejections (internal/process/task_queues.js:80:21)

PS Please forgive the weird formatting, this text is an output-log to a text file, since I'm automating the whole download process with a python script. But this is not interfering with the normal destreamer working, I've used this method since the start of the semester.

Coming back to us, the error does occur only for a few videos; other videos (always using the same method, with the python script) are downloaded.

What's happening?

Ok... my fault. I've just seen that the errors were relative to a couple of teams where I've been kicked out XD Nothin more.

(I would close this thread but I don't know how to do it D:)