Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nothing downloads with latest version 1.9.23 #238

Open
complexevil opened this issue Mar 7, 2024 · 22 comments
Open

Nothing downloads with latest version 1.9.23 #238

complexevil opened this issue Mar 7, 2024 · 22 comments

Comments

@complexevil
Copy link

After downgrading to 1.9.22 everything seems to work as intended. But in latest version it will go through the whole song and dance of downloading but nothing ends up in the destination folder.

@cristianst85
Copy link
Contributor

I am not the maintainer, but can you provide a link for testing? I want to make sure that I am looking at the same issue. It's a link for a single video?

@cristianst85
Copy link
Contributor

cristianst85 commented Mar 7, 2024

When entering a simple video link within the Search page, it fails with an uncaught System.ArgumentException saying "Invalid YouTube playlist ID or URL ''." (not shown in the UI) when calling the new constructor of PlaylistVideo that accepts a PlaylistId as the first argument.

VideoList = new List<PlaylistVideo> { new(playlistId, video.Id, video.Title, video.Author, video.Duration, video.Thumbnails) };

This was introduced with 3b50aab.

L.E. Link used for testing https://www.youtube.com/watch?v=qK-QBm73QJw.

@complexevil
Copy link
Author

I am not the maintainer, but can you provide a link for testing? I want to make sure that I am looking at the same issue. It's a link for a single video?

I was trying several playlists, trying to back up some rooster teeth content before warner bros shuts it all down.

https://www.youtube.com/watch?v=jL80tyQGxO4&list=PLTur7oukosPGB_dwpCuRwuJEBK63XJ-FU

https://www.youtube.com/watch?v=38m7SA04pr4&list=PL1cXh4tWqmsG242NXyGhjRkcFxP0ax7oY

https://www.youtube.com/watch?v=p43yDBXX0bI&list=PL1cXh4tWqmsHGpOm7zUhEsf0gildE072z

I didn't get any error messages, it would act as if it were downloading, taking the full time to do it, and then it would say job complete. But when I looked at the selected destination folder there was nothing there. I also searched the default folder and some other locations but nothing.

Like I said, reverting back one version fixed this issue, so it's not a huge deal.

@cristianst85
Copy link
Contributor

Those are some big files videos and I don't have enough space to test them. I will try to reproduce it with some other playlists that have smaller videos. Another aspect is that I am no sure from which commit version 1.9.23 was released, I assume it's either 9160bf1 or 3aaf816 (and not 4fc2549) since it comes with YoutubeExplode.dll version 6.3.12.

Either way I am fixing some issues that I found. Would you be willing to test a development version if I will provide one for you?

@complexevil
Copy link
Author

I'm not really a programmer, the only feed back I would be able to give you is "it worked" or "it didn't work"

But if that's enough for you I'd be willing to test it out when I get a chance.

@drlucozade
Copy link

drlucozade commented Mar 11, 2024

I'm having the same issue...it behaves as if you're downloading the files, but then the destination folder is empty...where did they go?!

@shaked6540
Copy link
Owner

I plan to release the fix tonight

I'm having the same issue...it behaves as if you're downloading the files, but then the destination folder is empty...where did they go?!

Try to run it as administrator, it might help

@cjbeaver
Copy link

I was facing this issue as well. Assuming permissions issue. Running as admin solved the problem.

@RevontuletCXVII
Copy link

Still having this issue on the supposed bugfix release (1.9.24). Running as admin fixed it but I'm not giving this program full control over my computer every time I want to download something. Would be safer to just download it from my phone with Seal and transfer it.

@shaked6540
Copy link
Owner

Still having this issue on the supposed bugfix release (1.9.24). Running as admin fixed it but I'm not giving this program full control over my computer every time I want to download something. Would be safer to just download it from my phone with Seal and transfer it.

You can change the folder settings to let regular users write files into it if you dont want to run it as admin. The need to run it as administrator is because windows is over protective of the C drive and only administrator can write files into it, except for some selected folders (for example, the %temp% folder can be used by any user).
Of course you can always just save it under another drive, like D.

@RevontuletCXVII
Copy link

RevontuletCXVII commented Apr 22, 2024

I work in IT myself and I can tell you beyond a shadow of a doubt that is not how file permissions work at all. My entire user folder on the C drive is owned by me, down to the registry level. Not to mention, I'm using the exact same folder layout I was with previous versions of the program which worked perfectly fine without admin permissions. Something broke in your app between an update that made it incapable of writing to certain folders that it had no issue dealing with before.

Edit: Your program, when ran, is not inheriting permissions from the current user profile, it is running itself as a generic User-class program, which means it is incapable of writing to any folder which does not SPECIFICALLY have standard User R/W access - which is the vast majority of them in the Userdata folder, and, in fact, includes newly-created folders made on any drive.. This can be fixed on your end by making the application be owned by the current user profile when it's ran.

@cristianst85
Copy link
Contributor

It also might be because the .exe file provided within the installer is not signed, etc.
But does it work (w/o admin privileges) if you use C:\Users\{CurrentUser}\Videos folder?

@RevontuletCXVII
Copy link

It also might be because the .exe file provided within the installer is not signed, etc. But does it work (w/o admin privileges) if you use C:\Users\{CurrentUser}\Videos folder?

C:\Users\{CurrentUser}\Videos doesn't have the User permission group by default, either. The only files and folders that are given the User permission group by default are ones used and created by a standard User; as in, only people who don't own the computer they're on and have been given a standard account, or people that use a non-admin account on their computer for whatever reason.

image

@cristianst85
Copy link
Contributor

cristianst85 commented Apr 22, 2024

You did not answer my question. Does it work or not if you use the Videos folder? Is my understanding that the current user has full control (by default) over that folder anyway (as in your screenshot).

@RevontuletCXVII
Copy link

I did answer your question, by way of explaining to you how the permissions system works. The Downloads folder has the same permissions as the Videos folder; both are in the userdata folder, and both are controlled by the user. Until I added the User permissions group to the Downloads folder, the downloader did not work as it did not have permission to read or write as it's running as a Generic User.

@cristianst85
Copy link
Contributor

cristianst85 commented Apr 22, 2024

This can be fixed on your end by making the application be owned by the current user profile when it's ran.

I am genuine curious about this, can you give more details on it?

P.S. I don't use the installer since I am building the app myself. I understand that this is not what a regular user should or want to do.

@RevontuletCXVII
Copy link

Not something I have the time to do today. I have a large project I need to start focusing on, but I did grab a video capture to show that it's not working in the default location the program itself sets for downloads.

2024-04-22.16-29-53.mp4

@shaked6540
Copy link
Owner

I work in IT myself and I can tell you beyond a shadow of a doubt that is not how file permissions work at all. My entire user folder on the C drive is owned by me, down to the registry level. Not to mention, I'm using the exact same folder layout I was with previous versions of the program which worked perfectly fine without admin permissions. Something broke in your app between an update that made it incapable of writing to certain folders that it had no issue dealing with before.

Edit: Your program, when ran, is not inheriting permissions from the current user profile, it is running itself as a generic User-class program, which means it is incapable of writing to any folder which does not SPECIFICALLY have standard User R/W access - which is the vast majority of them in the Userdata folder, and, in fact, includes newly-created folders made on any drive.. This can be fixed on your end by making the application be owned by the current user profile when it's ran.

How do you check which user the program is running as? In task manager I see that its using the current user on my machine:
image

@cristianst85
Copy link
Contributor

cristianst85 commented Apr 23, 2024

So...

  1. I've built my own installer (from the latest commit of the master branch; actually I did some minor changes to the .iss file which I am gonna push later);
  2. I've uploaded the installer to the "Internet" (my own server, but just to simulate that the installer file comes from the Internet);
  3. In Windows 10 I've created a new local user account (not an admin!) named DevUser. This user is added automatically to the Users group;
  4. Logged into to the new user I've just created;
  5. Using Edge I've downloaded the installer from the "Internet" (I had to click three or four times to confirm that the file is safe because the installer is not signed);
  6. Launched the installer. I was prompted to enter an Admin password since the normal user does not have permissions to install things and maybe also because the installer is not signed? The YoutubePlaylistDownloader installs into C:\Program Files (x86)\YoutubePlaylistDownloader\;
  7. After the installer completes it launches YoutubePlaylistDownloader. Using the default settings I tried to download a video, but the download failed without any visible errors (not sure why);
  8. Closed the current instance of YoutubePlaylistInstaller and used the shortcut from the Desktop to launch it again.
  9. Attempted to download the same video file again with success into the C:\Users\DevUser\Videos folder.

The only unexpected finding here is that it failed at step 7.

@RevontuletCXVII
Copy link

So...

1. I've built my own installer (from the latest commit of the master branch; actually I did some minor changes to the .iss file which I am gonna push later);

2. I've uploaded the installer to the "Internet" (my own server, but just to simulate that the installer file comes from the Internet);

3. In Windows 10 I've created a new local user account (not an admin!) named `DevUser`. This user is added automatically to the Users group;

4. Logged into to the new user I've just created;

5. Using Edge I've downloaded the installer from the "Internet" (I had to click three or four times to confirm that the file is safe because the installer is not signed);

6. Launched the installer. I was prompted to enter an Admin password since the normal user does not have permissions to install things and maybe also because the installer is not signed? The `YoutubePlaylistDownloader` installs into `C:\Program Files (x86)\YoutubePlaylistDownloader\`;

7. After the installer completes it launches `YoutubePlaylistDownloader`. Using the default settings I tried to download a video, but the download failed without any visible errors (not sure why);

8. Closed the current instance of `YoutubePlaylistInstaller` and used the shortcut from the Desktop to launch it again.

9. Attempted to **download the same video file again with success** into the `C:\Users\DevUser\Videos` folder.

The only unexpected finding here is that it failed at step 7.

Check the folder permissions for where the video downloaded successfully to.

@cristianst85
Copy link
Contributor

cristianst85 commented Apr 23, 2024

That folder (Videos) has the default permissions. I've not messed with that. Not sure what you getting at.

1
2

@cristianst85
Copy link
Contributor

cristianst85 commented Apr 23, 2024

Most of the issues come from the fact that the installer and the application executable (including maybe also ffmpeg.exe) are not signed. The only solution I can think of (except code signing) is that for the application to check if it has write permissions to the configured Saved video to folder before starting any downloads and if it has not then to display an error/message to the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants