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

Program crashes upon verification #373

Closed
Hyruleh3ro opened this issue Jun 16, 2023 · 14 comments · Fixed by #376 or #382
Closed

Program crashes upon verification #373

Hyruleh3ro opened this issue Jun 16, 2023 · 14 comments · Fixed by #376 or #382
Labels
bug Something isn't working in-beta This issue is fixed in a beta version
Milestone

Comments

@Hyruleh3ro
Copy link

Hyruleh3ro commented Jun 16, 2023

Summary:

When I try to download a private playlist on youtube with the newly added feature of authentication the program crashes.

System specifications:

Windows 11
Windows-Subsystem Linux Version 2 (WSL2) (Current version of WSL2 as far as I can tell)
Current version of TubeConverter (2023.6.1)

Procedure:

I enter the link to the privately created youtube-playlist in the media URL space, then activate 'Authenticate' enter the email-address to my account (I even tried it without the @gmail.com ending as you can also do that normally when logging into a youtube account) and then finally add my password. After that I press verify and the button turns into a loading-symbol and shortly afterwards the entire program crashes. Shortly afterwards I attempted to intentionally cause an error/test another error-prone case by toggling authenticate and leaving every space empty, but this causes the program to crash as well. After further testing I was able to verify in which combinations the program does work and in which it doesn't (only regarding youtube):

Works:

-normal video link (with and without toggled authentication (username and password left blank))
-normal playlist link (with and without toggled authentication (username and password left blank))
-unlisted video (that even required age verification by youtube, but didn't require authentication in the downloader)

Crashes:

-Every space left blank (while authenticate is toggled)
-Private Playlist link (playlist created by me with my youtube account; authenticate toggled and login data for youtube entered)

(Annotation: I was able to see some type of control symbol in the youtube link during testing, but as this only happened twice and I am currently incapable of replicating the appearance of this symbol I don't know if this of any significance. The error certainly also happened in every situation without that symbol)
If needed I can provide additional photos and screenshots, but I think that these won't give any further insights.
Thank you for your time and efforts.

@nlogozzo nlogozzo added the bug Something isn't working label Jun 16, 2023
@nlogozzo nlogozzo added this to the V2023.6.2 milestone Jun 16, 2023
@nlogozzo
Copy link
Member

Private Playlist link (playlist created by me with my youtube account; authenticate toggled and login data for youtube entered)

So, with YouTube, because it uses Google OAuth, you can not just specify your Google username and password...it won't work. For YouTube authentication, you'd probably need to upload a cookies file in Preferences.

Alternatively, you could create a google app password (https://support.google.com/mail/answer/185833?hl=en) and use your email and that new app password in the authentication fields.
^ for that I'd also recommend also storing it in Tube Converter's keyring as the generated app password is usually a random string of characters that would be hard to remember.

@nlogozzo
Copy link
Member

Let me know if either of those options work for you.

@nlogozzo
Copy link
Member

@fsobolev maybe it would be good to create docs for this? And also move all our little tooltips everywhere into these new docs?

@Hyruleh3ro
Copy link
Author

Ok. I will check out that solution shortly, but from a development perspective I'd suggest, that those errors should still be catched to avoid a total crash of the program if possible.

@nlogozzo
Copy link
Member

Yes agreed. Do you happen to have the output from the terminal when it crashed? That should tell us the exact line of where to catch the error.

@Hyruleh3ro
Copy link
Author

So the first error message (all spaces left blank):

Unhandled exception. System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at System.Collections.Generic.List`1.get_Item(Int32 index)
at NickvisionTubeConverter.GNOME.Views.AddDownloadDialog.ValidateOptions() in /run/build/org.nickvision.tubeconverter/NickvisionTubeConverter.GNOME/Views/AddDownloadDialog.cs:line 498
at NickvisionTubeConverter.GNOME.Views.AddDownloadDialog.FinishSearchUrl() in /run/build/org.nickvision.tubeconverter/NickvisionTubeConverter.GNOME/Views/AddDownloadDialog.cs:line 482
at NickvisionTubeConverter.GNOME.Views.AddDownloadDialog.<.ctor>b__65_1(IntPtr x) in /run/build/org.nickvision.tubeconverter/NickvisionTubeConverter.GNOME/Views/AddDownloadDialog.cs:line 118

@Hyruleh3ro
Copy link
Author

Ok. It seems that the same error is triggered each time, so therefore I can't post any more error-messages as it is the same every time (the same as the one posted above).

@Hyruleh3ro
Copy link
Author

Hi. I just wanted to give you a quick update regarding your solution(s). I tried the first one with the extension that is recommended in the TubeConverter code (Annotation: The question mark in the program next to cookie file, which would lead you to the extension, doesn't work in my configuration/doesn't show any recommended extensions for the cookie file). I added the cookie-File and despite this, the program caused the same error (resulting in a crash) as mentioned before and therefore this solution unfortunately doesn't work. Despite this I just want to say that I circumvented the problem by creating a youtube channel, which enables me to set the playlist to unlisted. Afterwards I simply downloaded it with tube-converter without further problems.

@nlogozzo
Copy link
Member

nlogozzo commented Jun 18, 2023

Could you download and install the flatpak or snap artifact from this CI build (or if you built and installed manually, use this PR) and test if the program crashes anymore with the scenarios above? It shouldn't crash anymore and instead notify you that the credentials are invalid.

@nlogozzo nlogozzo added the in-beta This issue is fixed in a beta version label Jun 18, 2023
@nlogozzo
Copy link
Member

I've created a beta release to make it easier for you to test:
https://github.com/NickvisionApps/TubeConverter/releases/tag/2023.6.2-beta1

@Hyruleh3ro
Copy link
Author

@nlogozzo Hi. I tested the following use-cases with the beta:
-all spaces blank
-non-accessible url (without authentication active)
-non-accessible url (with authentication active and no authentication data)
-non-accessible url (with authentication active and wrong authentication data)

All of them resulted in the following error (and the program crashed as well each time):
(This error is not the same as before)

Unhandled exception. System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at System.Collections.Generic.List`1.get_Item(Int32 index)
at NickvisionTubeConverter.GNOME.Views.AddDownloadDialog.ValidateOptions() in /run/build/org.nickvision.tubeconverter/NickvisionTubeConverter.GNOME/Views/AddDownloadDialog.cs:line 505
at NickvisionTubeConverter.GNOME.Views.AddDownloadDialog.FinishSearchUrl() in /run/build/org.nickvision.tubeconverter/NickvisionTubeConverter.GNOME/Views/AddDownloadDialog.cs:line 489
at NickvisionTubeConverter.GNOME.Views.AddDownloadDialog.<.ctor>b__65_1(IntPtr x) in /run/build/org.nickvision.tubeconverter/NickvisionTubeConverter.GNOME/Views/AddDownloadDialog.cs:line 118

@nlogozzo nlogozzo reopened this Jun 18, 2023
@swick
Copy link

swick commented Jun 18, 2023

I currently get the some exception, even in the flathub-beta channel. It's reproducible easily with any input to the Media URL field which doesn't seem to get handled, e.g. empty, the string "x", whatever really.

This issue is much more general.

@nlogozzo
Copy link
Member

Ok @Hyruleh3ro and @swick you're crashing issues should be fixed in V2023.6.2-beta2 . (The build is currently being uploaded to flathub-beta...should be available within a half-an-hour. Make sure you are running beta2 before testing if the crashes have been fixed for good) :)

I also made it where the Validate button will be disabled until a URL is entered into the row:
image
image

@swick
Copy link

swick commented Jun 20, 2023

Thanks, the crash is fixed and the validate button behaves as explained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in-beta This issue is fixed in a beta version
Projects
None yet
3 participants