6.0 alpha 4 not finding the yt-dlp.exe or youtube-dp.exe that is placed in the same folder as gropple.exe, while 5.5 was #25
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
where the 5.5-version didn't need the yt-dlp.exe to be added to the systems path on windows and just used the one that is sitting in the same folder as gropple's-executable, the 6.0 alpha v4 demands that it's added to the path or will not start the download.
error starting command 'yt-dlp': exec: "yt-dlp": cannot run executable found relative to current directory
Can this be reverted back to like 5.5 works ?
so that the 6.0 version is a drop-in replacement?
This was a security problem, fixed in the go compiler in version 1.19:
https://pkg.go.dev/os/exec#hdr-Executables_in_the_current_directory
You should be able to use
.\yt-dlp.exeor maybe./yt-dlp.exeinsteadcan confirm that replacing "yt-dlp" (which is working in the 5.5-config) to ".\yt-dlp.exe" in all profiles (and not just 1) allows the configuration to be saved with 6.0a4 without the error that yt-dlp can not be found in path.
however, trying to use it will still give the above error
error starting command './yt-dlp.exe': exec: "yt-dlp.exe": cannot run executable found relative to current directory
and
error starting command '.\yt-dlp.exe': exec: "yt-dlp.exe": cannot run executable found relative to current directory
because it will become a question:
yes yt-dlp.exe is in the same folder as gropple.
Directory of E:_gropple
15/09/2019 21:32 67.081.216 ffmpeg.exe
15/09/2019 21:32 66.966.528 ffplay.exe
15/09/2019 21:32 66.993.152 ffprobe.exe
09/04/2022 03:59 10.327.040 gropple-5.5.exe
14/03/2023 19:49 11.105.792 gropple-6.0.exe
21/01/2022 09:00 8.170.320 youtube-dl.exe
29/10/2023 15:35 13.848.884 yt-dlp.exe
reading the info in the linked doc:
----quote----
var ErrDot = errors.New("cannot run executable found relative to current directory")
ErrDot indicates that a path lookup resolved to an executable in the current directory due to ‘.’ being in the path, either implicitly or explicitly. See the package documentation for details.
Note that functions in this package do not return ErrDot directly. Code should use errors.Is(err, ErrDot), not err == ErrDot, to test whether a returned error err is due to this condition.
----end quote----
the note makes it sounds like this is not the case in the code of gropple?
The other statement in the doc:
Suggests that subverting the error should be unnecessary.
I will investigate, though I don't have easy access to a windows machine.
same problem persists in 1.1.0
error starting command './yt-dlp.exe': exec: "yt-dlp.exe": cannot run executable found relative to current directory
likewise if i use a \ instead of /
if i don't use the './' or '.' before ytdlp.exe, it keeps whaling about 'not found in path', and if i use them tte config can be saved without an error, but it doesn't execute and pops up the above error, while both executables are within the same folder.
why does yt-dlp or youtube-dl have to be in the path anyway?
if it's not a full path or relative path given - for which the current workdir has to be known as well,
why can't it just first search in the workdir, or same folder as were gropple.exe itself is located ?
if that fails, go check $PATH
I know it still persists in 1.1.0, that's why I didn't close the bug.
As I said above, I do not have easy access to a windows machine for testing, or a lot of personal motivation to support windows as a platform. You will have to be patient.
I may be able to change it to work as you suggest, however the reason why looking in the current directory for executables was removed from go is because it is a security problem, and I'm not in the business of making software with deliberately introduced security problems.
Hi @soulmaestro, there is a test release v1.1.1-alpha.1 that may fix your problem.
Please be aware that I have not validated this entirely - it may break non-portable mode and may need rework or reverting at least temporarily.
oh sorry for that, that was indeed my fault, i didn't look at the full patchnotes of 1.1.0.
I just noticed it not longer being an alpha-version and as such tested it, and gave the above update/feedback.
thanks for looking into it and i understand your stance on it.
testing with 1.1.1 alpha does seem to work (again) as 0.5.5 does/did with youtube-dl.exe and yt-dlp.exe in the same folder as gropple.exe
it's just that it has always been a drop-in update and it kept working like before, while all of the sudden it didn't anymore.
ps: my stance is that only looking at $path can be the same security risk as not doing it, as a malicious app or version of yt-dlp.exe or youtube-dl.exe can add itself to or overwrite $PATH and be used instead of the non-malicious version in the same dir as gropple.exe.
once again: tyvm for looking into it, finding a workable solution, and for the other QoL updates added to this very handy tool.
Good to know, thanks.
I'll leave this open until I've run some tests and made sure it doesn't break non-portable mode.
Hi @soulmaestro ,
I've just released v1.1.1-alpha.2 which should still work correctly for you and also in non-portable mode (as I suspected I needed to fix some more things there to remain compatible).
I'd be appreciative if you could give it a try and make sure it's still working well for your setup.
Assuming still fixed.