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

FreeTube doesn't handle its protocol properly #373

Closed
maricn opened this issue Sep 5, 2019 · 12 comments
Closed

FreeTube doesn't handle its protocol properly #373

maricn opened this issue Sep 5, 2019 · 12 comments
Labels
Rewrite: questionablefeature A feature that is questionable in regards to practicability and implementability Rewrite: tobeclosed Might be closable before release of rewrite

Comments

@maricn
Copy link

maricn commented Sep 5, 2019

When using https://github.com/FreeTubeApp/freetube-redirect extension or when simply issuing command (on OSX terminal):

open 'freetube://https://www.youtube.com/watch?v=whatever'

The FreeTube app opens if closed or gets in focus if it's already open, but nothing else happens. Video doesn't load. Since the extension properly passes the URL to the FreeTube app, and since opening the protocol address outside of extension should also pass the URL to the app properly, I conclude the problem is the app doesn't handle received URL.

Originally observed at FreeTubeApp/freetube-redirect#6.
Documentation about protocol handlers in electron: https://github.com/electron/electron/blob/master/docs/api/app.md#appsetasdefaultprotocolclientprotocol-path-args.

@PrestonN
Copy link
Member

PrestonN commented Sep 9, 2019

The problem with this is that I simply don't own a Mac to do testing with. It's something that I'd like to do soon but I need to be in the right place financially before I get one as getting one would be bought solely for FreeTube testing. This is also why I don't currently provide .dmg builds of FreeTube.

This problem doesn't occur on Windows or Linux, so I am unable to reproduce the issue with the hardware that's available to me. Unfortunately I don't know when I will be able to fix this, but it's something that I'd like to do when I am able to.

@maricn
Copy link
Author

maricn commented Sep 9, 2019

@PrestonN Thanks for your reply and your effort on the FreeTube in general.
I'm limited with my knowledge and time to contribute, otherwise would look deeper into it.

But knowing this doesn't happen on Linux/Windows and the link/protocol handling works fine there is an indication it might not be related to electron in the trivial way I imagined (misuse of their API).

Anyways, I think it's good to track this issue here, as opposed to freetube-redirect because it belongs here.

@Mech0z
Copy link

Mech0z commented Sep 12, 2019

I have a similar problem on Win10, if the app is closed, clicking a youtube link in firefox and having the Freetube redirect addon simply opens Freetube, it does not load the specific video, if I then click the link again when the app is open it will play the video correctly

@sith-on-mars
Copy link
Contributor

I have the same issue on Manjaro Linux.

@GilgusMaximus GilgusMaximus added Rewrite: questionablefeature A feature that is questionable in regards to practicability and implementability Rewrite: tobeclosed Might be closable before release of rewrite labels Sep 30, 2020
@PrestonN
Copy link
Member

PrestonN commented Oct 4, 2020

This should be fixed now in the latest dev builds. Full release should be coming out sometime this week.

@PrestonN PrestonN closed this as completed Oct 4, 2020
@fabianski7
Copy link

As I understand it this problem happens with the portable or third party versions of freetube, like AUR?
I keep having the same problem: freetube opens but the video does not load.

I am using the Privacy Redirect extension, as recommended.

Any way to solve this?

@PrestonN
Copy link
Member

The solution is to use a non-portable version of the app. The AUR could be fixed if the maintainer made some small changes however I am not the maintainer and cannot make the fix. You will need to ask the maintainer to update the AUR package to work with the extension. Since you're likely running Arch, I can suggest the Flatpak version as that one supports the extension. The AUR version as well as the AppImage build is not supported.

@fabianski7
Copy link

The AUR could be fixed if the maintainer made some small changes however I am not the maintainer and cannot make the fix

Are you talking about the freetube.desktop file?
I modified the file according to what I found inside the release that is here on github.
Basically I added this line (as already suggested by other users here)

MimeType=x-scheme-handler/freetube;

the browser opens the FreeTube, but the video player does not open

@sith-on-mars
Copy link
Contributor

Seems the issue still persists with the extension like Privacy Redirect and Libredirect on Qt environment, but works fine on gtk environment like Gnome.

Could you improve Qt URL handling? Here is the bug reports I had with the Libredirect developer and with the SUSE developer, which provide some suggestions for the fix. Hope it helps!

@ssnor
Copy link

ssnor commented Jan 24, 2023

Seems the issue still persists with the extension like Privacy Redirect and Libredirect on Qt environment, but works fine on gtk environment like Gnome.

Could you improve Qt URL handling? Here is the bug reports I had with the Libredirect developer and with the SUSE developer, which provide some suggestions for the fix. Hope it helps!

Thank you for making these bug reports.

I also have this issue on openSUSE Tumbleweed KDE.
According to the SUSE developer the problem is that when Qt's QUrl parses the LibRedirect link a colon is lost.

SUSE will not fix this as they consider the URL FreeTube requires to be invalid and it seems like the LibRedirect developer shares this view.

Does anyone know of a possible workaround?

Would it be possible to reopen this issue as the problem persists and none of the other moving parts are willing to handle the problem?

I wish I could help solve it, but sadly I have no programming experience.

@ChunkyProgrammer
Copy link
Member

In the future, I'd recommend creating a new issue instead of commenting on a closed one, that way the issue is easier to find (the original issue is about the protocol not working for Mac OS while the issue you found is a bit different)

@ssnor
Copy link

ssnor commented Jan 27, 2023

In the future, I'd recommend creating a new issue instead of commenting on a closed one, that way the issue is easier to find (the original issue is about the protocol not working for Mac OS while the issue you found is a bit different)

I'm sorry, I'm quite new to engaging with free software projects and trying to get the hang of it.
Will try to be more attentive where I comment in the future.

Thank you so much for creating the fix, I will test it as soon as the pull request has been merged.
Your handle often pops up in the commits, I am thankful for you contributions to this program I use every day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rewrite: questionablefeature A feature that is questionable in regards to practicability and implementability Rewrite: tobeclosed Might be closable before release of rewrite
Projects
None yet
Development

No branches or pull requests

8 participants