snobu / destreamer

Save Microsoft Stream videos for offline enjoyment.
MIT License
2.36k stars 440 forks source link

Expiration of access token #239

Closed vleveris closed 3 years ago

vleveris commented 3 years ago

Hello. I have an issue with access token expiration. It seems that access token does not get refreshed. If I run destreamer with an argument of video URLs file, it crashes in 1 hour with the following error message: [WARNING] Got HTTP code 401. Retrying request...

[VERBOSE] Here is the error message: '

[ERROR] Error: Request failed with status code 401 at createError (c:\Users\vytau\Downloads\destreamer\node_modules\axios\lib\core\createError.js:16:15) at settle (c:\Users\vytau\Downloads\destreamer\node_modules\axios\lib\core\settle.js:17:12) at IncomingMessage.handleStreamEnd (c:\Users\vytau\Downloads\destreamer\node_modules\axios\lib\adapters\http.js:244:11) at IncomingMessage.emit (events.js:327:22) at endReadableNT (_stream_readable.js:1220:12) at processTicksAndRejections (internal/process/task_queues.js:84:21)

[FATAL ERROR] Unhandled error or uncaught exception! Please check your download directory/directories and try again. If this keep happening please report it on github "https://github.com/snobu/destreamer/issues"

As I understand from the source, application tries to refresh session after finishing each video download and convert process, but perhaps it failes.

lukaarma commented 3 years ago

Are you using the -k option when running Destreamer? If so did you click yes when asked to 'remember the credential'?

vleveris commented 3 years ago

Yes I'm using -k option and "remember me" is checked.

2020-10-02 17:05 GMT+03:00, lukaarma notifications@github.com:

Are you using the -k option when running Destreamer? If so did you click yes when asked to 'remember the credential'?

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/snobu/destreamer/issues/239#issuecomment-702753544

lukaarma commented 3 years ago

After each download did a chromium window pop up for a couple of seconds or after the first login no windows were spawned?

vleveris commented 3 years ago

No, Chromium pops up only once at the beginning.

2020-10-02 17:30 GMT+03:00, lukaarma notifications@github.com:

After each download did a chromium window pop up for a couple of seconds or after the first login no windows were spawned?

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/snobu/destreamer/issues/239#issuecomment-702767092

lukaarma commented 3 years ago

Mhhh ok I'll take a look and I'll let you know, but since I have little free time it will take time

lukaarma commented 3 years ago

Oh and just to make sure, you are running the latest commits on master branch?

vleveris commented 3 years ago

Yeah, latest. :)

2020-10-02 18:30 GMT+03:00, lukaarma notifications@github.com:

Oh and just to make sure, you are running the latest commits on master branch?

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/snobu/destreamer/issues/239#issuecomment-702800914

lukaarma commented 3 years ago

Could you please run it adding the --verbose flag and then copy here the output?

vleveris commented 3 years ago

destreamer_output.txt

lukaarma commented 3 years ago

Thanks, found the bug

We have to pass the new session to the API class, fixing it tomorrow

lukaarma commented 3 years ago

You can work around this bug for now by adding the '-x' option at launch

vleveris commented 3 years ago

OK, thanks.

2020-10-05 3:32 GMT+03:00, lukaarma notifications@github.com:

You can work around this bug for now by adding the '-x' option at launch

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/snobu/destreamer/issues/239#issuecomment-703339568

lukaarma commented 3 years ago

closing keep track of the bug in #244