Closed Choomai closed 11 months ago
Hi, thanks for reporting it. I noticed it before, and I'm trying to fix it, but I can't replicate it reliably. Do you have any ideas how to improve my odds of encountering it?
It seems like that error will occur when trying to fetch the audio cover, or something like that. Have you tried disabling these two functions? It always happens when you change the track; even with songs like Rickroll, it still does that. Also, when running the bundled version, it doesn't exit; it just shows the error. The normal version plays the song for a few seconds and crashes with the same error.
Yeah, I think it's something of that kind. I think when the tracks are being switched, the metadata may not be properly loaded for a fraction of a second, and the code doesn't really expect that would be the case.
Again, I unfortunately have difficulties replicating it reliably, but if it's happening consistently to you and you'd be willing to help me test the code, I might be able to fix it rather quickly. (If so, hit me up on Discord)
Hey, I think I made a breakthrough today, perhaps completely fixed it in a way. I restructured the code so that it would be simpler to debug (also extend), and it seems to me the Youtube library is just faulty and crashes anytime it is called. I'll submit a patch as soon as possible.
@Choomai Would you be willing to check out the pull request (#21), to see if it solves the issue for you?
@Choomai Would you be willing to check out the pull request (#21), to see if it solves the issue for you?
Ok, wait
D:\Tools\vlc-rpc>start.bat
Did not detect node_modules directory; Installing modules...
Modules installed.
Starting script...
> vlc-rpc@1.1.9 start
> node ./src/app.js
node:internal/modules/cjs/loader:1080
throw err;
^
Error: Cannot find module 'vlc.js'
Require stack:
- D:\Tools\vlc-rpc\src\helpers\lager.js
- D:\Tools\vlc-rpc\src\app.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
at Module._load (node:internal/modules/cjs/loader:922:27)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object.<anonymous> (D:\Tools\vlc-rpc\src\helpers\lager.js:5:13)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'D:\\Tools\\vlc-rpc\\src\\helpers\\lager.js',
'D:\\Tools\\vlc-rpc\\src\\app.js'
]
}
Node.js v18.16.1
D:\Tools\vlc-rpc>npm i --production
npm WARN config production Use `--omit=dev` instead.
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command C:\Program Files\nodejs\node.exe C:\Users\nguye\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\nguye\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! > register-scheme@0.0.2 install
npm ERR! > node-gyp rebuild
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.4.0
npm ERR! gyp info using node@18.16.1 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.8 found at "C:\msys64\mingw64\bin\python3.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Users\nguye\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack at C:\Users\nguye\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\nguye\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:380:14)
npm ERR! gyp ERR! stack at C:\Users\nguye\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack at C:\Users\nguye\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:401:16
npm ERR! gyp ERR! stack at C:\Users\nguye\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Users\nguye\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:427:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1091:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\nguye\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\nguye\AppData\Local\npm-cache\_cacache\tmp\git-clonenUtmyq
npm ERR! gyp ERR! node -v v18.16.1
npm ERR! gyp ERR! node-gyp -v v9.4.0
npm ERR! gyp ERR! not ok
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path C:\Users\nguye\AppData\Local\npm-cache\_cacache\tmp\git-clonenUtmyq
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in: C:\Users\nguye\AppData\Local\npm-cache\_logs\2023-07-25T02_55_25_542Z-debug-0.log
npm ERR! A complete log of this run can be found in: C:\Users\nguye\AppData\Local\npm-cache\_logs\2023-07-25T02_55_23_365Z-debug-0.log
@sdasda7777
Huh, that's really strange 😅 @GreenDiscord, would you happen to know what this error could mean? 😅
I don't have VS installed, my C drive is low on space. I thought this won't require VS ?
Ah, interesting, it seems the Node does require Visual Studio if you're trying to build the plugins, or something like that 😅 I think getting the packaged version and applying the unreleased patches to it should not require VS, but I'm not completely sure 😅
Or maybe just copying the node_modules
folder from the released version to the cloned repo might work too 😅
Yeah looks like its trying to build, no idea why. Can you try doing npm install (on its own)?
Or maybe just copying the
node_modules
folder from the released version to the cloned repo might work too 😅
ok, wait
Yeah looks like its trying to build, no idea why. Can you try doing npm install (on its own)?
@sdasda7777 where is that node_modules
folder ?
Yeah looks like its trying to build, no idea why. Can you try doing npm install (on its own)?
@GreenDiscord what do you mean on its own?
@Choomai It should be in the root folder of the project, same as src/
and config/
Oh, forgot the non-bundled version
@sdasda7777 Working now, but it print a newline every time I change track
Do you mean the youtube error, or something else? Could you send a screenshot?
@sdasda7777 It didn't fetch, I don't see any button on discord rpc.
I see 😅 The thing is this is a video file, so it uses different metadata, iirc. I think @GreenDiscord would know more about that, I'm not completely sure what is intended to be supported 😅
It does leave a button, redirect me to the correct YT video, when run the bundled version without #21 .
I see, I think I do have an idea why that would be 😅 I'll look into it in, perhaps in an hour or so 😅
@Choomai Would you happen to know which release version is working correctly for you? 😅
@Choomai Would you happen to know which release version is working correctly for you? 😅
I don't really know.
Non-bundled V1.1.9.zip
w/o #21 crash after fetch.
Bundled V1.1.9-bundled.zip
just show error, it does show the button, with correct YT URL.
Bundled + #21 + node_modules
from V1.1.9.zip
don't fetch, no error, just output a newline.
Haven't test the non-bundled with #21 yet, I don't really know the diff between these 2 versions.
I'm not sure I understand, what exactly do you mean by 'bundled'? V1.1.9-bundled.zip
? 😅
@Choomai Could we get in touch on Discord, please? 😅 The main server is in the README 😅
It shows a lot of these when changing the track.