ftde0 / yt2009

2009 youtube frontend.
Apache License 2.0
171 stars 103 forks source link

Problems. #108

Closed Defreezer closed 1 month ago

Defreezer commented 1 month ago

Windows 7 64 bit with compatible dependencies installed: Node.js 12.9.0, Git 2.39.1, ffmpeg essentials 7.0.1, ImageMagick 6.9.13.12 x64. Powershell 5.1 1005. Installed imagemagick 6.9.13.12 x64 along with its legacy tools (convert.exe): https://imagemagick.org/archive/binaries/ Made sure Imagemagick's install folder was in Windows' PATH Environment Variables field and that said folder contains CORE_RL_magick_.dll, CORE_RL_wand_.dll and convert.exe. For the record, "convert not found!!" happens on Windows because "C:\Windows\System32\convert.exe" already exists, and Imagemagick's tool happens to have the same name, so YT2009 is trying to use the wrong convert.exe. This should be fixed.

Opened CMD, started Powershell, then:

git clone https://github.com/ftde0/yt2009
cd "C:\PATH\TO\yt2009"
npm install node-fetch@2
npm install --save readline-sync
npm install express
npm install ytdl-core
npm install google-protobuf
npm install maxmind-db-reader
npm install node-html-parser
npm install encoding
npm install bufferutil
npm install utf-8-validate
node yt2009setup.js
node post_config_setup.js
cd back
node backend.js

Then I ran it by typing the XXX.X.X.X:XX localhost IP + port set in "node yt2009setup.js" into my browser. When I tried to watch a video, the instance stopped with the following log:

RangeNotSatisfiableError: Range Not Satisfiable
    at createHttpError (C:\Users\User\yt2009\node_modules\send\index.js:984:7)
    at SendStream.error (C:\Users\User\yt2009\node_modules\send\index.js:270:31)
    at SendStream.send (C:\Users\User\yt2009\node_modules\send\index.js:666:19)
    at onstat (C:\Users\User\yt2009\node_modules\send\index.js:725:10)
    at FSReqCallback.oncomplete (fs.js:167:5)
retry_video video: Error: Status code: 403
retry_video audio: Error: Status code: 403
_http_outgoing.js:485
    throw new ERR_HTTP_HEADERS_SENT('set');
    ^

Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
 [90m    at ServerResponse.setHeader (_http_outgoing.js:485:11) [39m
    at ServerResponse.header (C:\Users\User\yt2009\node_modules\ [4mexpress [24m\lib\response.
js:795:10)
    at ServerResponse.contentType (C:\Users\User\yt2009\node_modules\ [4mexpress [24m\lib\resp
onse.js:625:15)
    at ServerResponse.sendStatus (C:\Users\User\yt2009\node_modules\ [4mexpress [24m\lib\respo
nse.js:374:8)
    at PassThrough.<anonymous> (C:\Users\User\yt2009\back\backend.js:2535:17)
 [90m    at PassThrough.emit (events.js:214:15) [39m
 [90m    at PassThrough.emit (events.js:209:13) [39m
    at ClientRequest.<anonymous> (C:\Users\User\yt2009\node_modules\ [4mminiget [24m\dist\inde
x.js:211:28)
 [90m    at Object.onceWrapper (events.js:297:20) [39m
 [90m    at ClientRequest.emit (events.js:209:13) [39m

 C:\Users\User\yt2009\back>

Not sure what's going on.

gohoski commented 1 month ago

Apply this pull by running npm install "git+ssh://git@github.com:khlevon/node-ytdl-core.git#v4.11.4-patch.2" and try another video (clear the cache in the assets folder if needed).

Defreezer commented 1 month ago

Apply this pull by running npm install "git+ssh://git@github.com:khlevon/node-ytdl-core.git#v4.11.4-patch.2" and try another video (clear the cache in the assets folder if needed).

Thanks for the reply. Unfortunately, I'm getting an access error.

npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t ssh://git@github.com/khlevon/node-ytdl-core.git
npm ERR!
npm ERR! Host key verification failed.
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\User\scoop\persist\nodejs12\cache\_logs\2024-07-12T16_55_09_642Z-debug.log

2024-07-12T16_55_35_936Z-debug.log

gohoski commented 1 month ago

Hm. Try to replace the

"ytdl-core": "latest",

line in the package.json file with this:

"ytdl-core": "git+ssh://git@github.com:khlevon/node-ytdl-core.git#v4.11.4-patch.2",

And run npm install

Defreezer commented 1 month ago
"ytdl-core": "git+ssh://git@github.com:khlevon/node-ytdl-core.git#v4.11.4-patch.2",

Edited it. npm install threw me this:

npm WARN Invalid version: "1.13.0.2"
npm WARN yt2009 No description
npm WARN yt2009 No repository field.
npm WARN yt2009 No README data
npm WARN yt2009 No license field.

audited 240 packages in 0.97s
found 19 vulnerabilities (3 low, 16 high)
  run `npm audit fix` to fix them, or `npm audit` for details

Most of these vulnerabilities are from npm modules YT2009 demanded of me during the initial installation process. The "invalid version" line has been there from the start no matter what. npm audit fix doesn't fix anything. This time, however, I also had to install:

npm install encoding
npm install bufferutil
npm install utf-8-validate

Before getting the same identical error log for npm install "git+ssh://git@github.com:khlevon/node-ytdl-core.git#v4.11.4-patch.2".

ftde0 commented 1 month ago

a commit was just released addressing some of the playback issues faced lately: https://github.com/ftde0/yt2009/commit/55faf2e1246f5716d5db3423ce45dbab124da3f8

try updating.

also, lines with npm WARN are - as the name implies - warnings. warnings that won't affect yt2009's functionality.

Defreezer commented 1 month ago

It appears to be working now, thanks. Will report back if something happens.

ftde0 commented 1 month ago

alright! closing for now, feel free to reopen when something does end up happening again relating to those.