hls-downloader icon indicating copy to clipboard operation
hls-downloader copied to clipboard

Doesn't save downloaded video - error log included

Open zb-z opened this issue 5 years ago • 5 comments

It (apparently) assembles/downloads a video but doesn't auto-save it and trying to save it explicitly also doesn't produce any observable result.

Killing the process (so that Chrome restart it) and disabling/re-enabling didn't help. This started after I started 2 downloads that had the same page title (promoted to file name). Didn't expect it I to trash itself this much.

Don't know if this is going to have exactly deterministic repro (this is an "old session" - Chrome instance that has been running for about 3wks - I have killed all parasitic threads I saw but not going to kill the session "just to try" - it has swks worth of tabs in ~30 windows - no the laptop is not under stress :-) that's pretty normal count for me and hardly anything else is running [a few light editor sessions, 2 cmd and one PowerShell session] ).

Side-note: Chrome keeps grouping 5-6 extensions onto one process and just won't let it go (tried 5-6 times with a number of pages opened between uBlock reload and others and uBlock has to run otherwise streaming sites are too dangerous). So if someone has a way to force Chrome to place and keep HLS in a separate process that would be one good thing to think about.

Found this in error log for HLS 1.7.2 (Chrome 78.0.3904.108):

Error 1:

TypeError: Error in invocation of downloads.download(downloads.DownloadOptions options, optional function callback): Error at parameter 'options': Missing required property 'url'.

Context _generated_background_page.html

Stack Trace static/js/background.js:131 (m) static/js/background.js:135 (E) static/js/background.js:135 (u) static/js/background.js:135 (t.cont) static/js/background.js:135 (E) static/js/background.js:135 (u) static/js/background.js:135 (t.cont) static/js/background.js:135 (E) static/js/background.js:135 (u) static/js/background.js:135 (anonymous function) static/js/background.js:135 (d) static/js/background.js:135 (Y) static/js/background.js:135 (anonymous function) static/js/background.js:135 (h) static/js/background.js:135 (p) static/js/background.js:135 (i) static/js/background.js:135 (f) static/js/background.js:135 (M.t.put) static/js/background.js:135 (anonymous function) static/js/background.js:135 (s) static/js/background.js:135 (h) static/js/background.js:135 (l) static/js/background.js:135 (R.t.put) static/js/background.js:135 (anonymous function) static/js/background.js:108 (i)

L131: "use strict";Object.defineProperty(exports,"__esModule",{value:!0}), . . .

Error 2:

takeEvery(CHROME_DOWNLOAD, a) created by o created by d Tasks cancelled due to error: takeEvery(CHROME_DOWNLOAD, a) p c

Context _generated_background_page.html

Stack Trace ---- IDENTICAL TO THE ONE above ----

Note: if you are packing your scripts with webpack it would be good to leave them in normal state (not minified, not obfuscated). Applies even more to scripts loaded from disk in extensions. Chrome would have given much more precise error location if one "line" wasn't kilobytes long, I came across a site once that had whole jQuery lib sliced into small separate "files" and folders - under webpack - was pure joy to navigate :-) The best "self-documentation" for jQuery - ever. Lost the link latter.

zb-z avatar Feb 22 '20 20:02 zb-z

Do you still experience this issue on v2?

puemos avatar May 03 '20 08:05 puemos

I wouldn't know - mostly switched to "Stream Recorder" due to that other problem (mp4 files saved with "gaps" the cause havoc in VLC when you attach .srt) and as far as I remember that problem had random appearances which usually means - threading related.

If you have a time try to find out how people use/organize "source maps" with webpack - that leaves distribution in always well-debuggable state so ahy time something ugly happens and Chrome screams it becomes easier to step in and take look on a moment's notice.

I see that you switched to some kind of GUID for a file name which OK probably resolves the "uniqueness" problem, but leads to totally meaningless names => it should keep whatever name it van extracts and add a sequential number - doesn't have to be "unique in the universe :-)" and then work a bit on different tactics for extracting the name from different sites.

You will need a kind of config and a few JS functions, architectured as a kind of plugin to handle the variability - there's never, ever a "universal" way for these kinds of things. The site I kept referring to is a good example since it's a kind of "single page app" and the important part of the eventual meaningful name is hidden (season and episode, sometimes just episode if each season has separate page).

Also, v2 has a problem that is saves as .ts instead of .mp4. I think I left a bug for that but not separately - as a part of a crypto related problem.

I don't really have the time to play a tester, and I hate testing :-) I scream when something hurts :-)) and till that problem with gaps in mp4 is resolved I only touch this extension when the other hits a wall (like with that crypto) and then I dump whatever I saw into that one bug - sorry, but just don't have the time for anything more.

Before I forget - since now you keep the list of "all streams ever detected" you need a little UI to let people trim it - fast :-) On that site I mentioned a URL for a stream is valid like an hour or two and my Chrome lives on for days, weeks, even months (the portable version) => not being able to trim the list of "all streams ever detected" makes extension quite useless and dangerous (very easy to slick on a stale item, especially when it's all in GUID-s)

zb-z avatar May 04 '20 15:05 zb-z

@zb-z thank you for spending the time to answer

sorry, but just don't have the time for anything more.

I'm in the same situation, this extension was made for personal use and I decided to open-source it for everyone, and when I do have some free time to work on it I try to priorities things.

Thanks!

puemos avatar May 04 '20 15:05 puemos

BTW, in v2.1.1 you have clear all button.

puemos avatar May 04 '20 15:05 puemos

Ha, you do indeed :-) Will have to copy it to the portable side.

zb-z avatar May 04 '20 16:05 zb-z