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 Register it's Protocol Correctly on Mac #618

Closed
360fun opened this issue Oct 8, 2020 · 24 comments · Fixed by #669
Closed

FreeTube Doesn't Register it's Protocol Correctly on Mac #618

360fun opened this issue Oct 8, 2020 · 24 comments · Fixed by #669
Labels
bug Something isn't working

Comments

@360fun
Copy link

360fun commented Oct 8, 2020

Since I love FreeTube very much, I would like to use it to open automagically YT links in any kind of situation. I use Mac OS but I think can be applied to Linux and Windows as well.

ANALYSIS
I can identify 3 kinds of "open a link" situations:

  1. inside the browser in the address bar
  2. inside the browser when I click on a link
  3. outside the browser

CHALLENGES/PROBLEMS

  1. needs an extension to stop loading the video and ask me what I want to do or get the option to always convert the link to freetube:// (like https://github.com/SimonBrazell/privacy-redirect)
  2. needs an extension like https://github.com/FreeTubeApp/freetube-redirect (currently I get the "TypeError: Cannot read property 'simpleText' of undefined" error)
  3. needs an app like https://github.com/will-stone/browserosaurus or https://github.com/johnste/finicky to catch the interaction and manage it. Currently FreeTube doesn't seems to manage the http protocol in the first place, so I cannot see the App in browserosaurus menu.

image

Any solution/fix?

Thank you! 🙏

@360fun 360fun added the enhancement New feature or request label Oct 8, 2020
@GilgusMaximus
Copy link
Contributor

Hi. Thanks that you identified the situations so closely.

  1. This could probably be implemented into the freetube-redirect as well, although I did not take a single look into it yet
  2. As far as I am aware, the rewrite does not handle it correctly at the moment, that is why the addon is not working. However there were already discussions over at the Matrix channel to fix it.
  3. That is something that was mentioned in an older issue FreeTube ignores default browser #474 . So thanks for bringing it up again. This should then be implemented correctly. However neither PrestoN nor I own a Apple devices, so testing for Mac is not possible for us at the moment. So any contributions from an Apple device owner are more than welcomed.

I think overall these are some good first issues for new contributors. In regards to the contribution guideline take a look here #566. I hope we can add it back soon

@360fun
Copy link
Author

360fun commented Oct 8, 2020

Thank you for the quick response! :)

1.2. Exactly what I imagined ;)
3. I'm not sure if they are correlated. I often click on YT links in Telegram and I would like them to open in FreeTube. If FreeTube could support the http/s protocol as well, would be very easy to use Browserosaurus or a similar app to handle the link.

I'm your "Mac tester" then! ;)

PS
thanks to point me to the guidelines 🙏

@GilgusMaximus
Copy link
Contributor

So in the next release, or if you want to use the automated releases that are under the actions tab, the plugin is already fixed.
So you can download that and install it and then the plugin should run again

@360fun
Copy link
Author

360fun commented Oct 8, 2020

So in the next release, or if you want to use the automated releases that are under the actions tab, the plugin is already fixed.
So you can download that and install it and then the plugin should run again

I'm sorry, I went to Actions but I don't understand what I should do... 🤔
I'm more into web dev so I'm kinda lost without a compiled App to download 😛
maybe you mean that I've to switch the FreeTube Helper (Plugin).app ? anyway that's a compiled file as well... 🙄

@PrestonN
Copy link
Member

PrestonN commented Oct 8, 2020

If you follow this link and click on the first build, you'll see downloadable binaries for your device.

Assuming FreeTube is installed on your machine, it should enable the freetube:// protocol to properly handle opening of links. You should be able to add freetube:// in front of any YouTube URL to have it open into FreeTube.

This is already working and enabled in the latest dev builds, so I'll go ahead and close this issue.

@PrestonN PrestonN closed this as completed Oct 8, 2020
@360fun
Copy link
Author

360fun commented Oct 8, 2020

I don't see any build...are you sure they are public?

this is what I see:
image

@PrestonN
Copy link
Member

PrestonN commented Oct 8, 2020

Each commit message you see is a new build. For example, the first build in that picture is the build with the message "Update README.md"

Click on that and you'll find the download links.

@360fun
Copy link
Author

360fun commented Oct 8, 2020

I did it but links were not active, now they are, no idea what happened... 🤔

Anyway I downloaded the 0.9.0 and I tested it with the Chrome extension: the FreeTube app is called but shows the same "TypeError: Cannot read property 'simpleText' of undefined" problem as before. 😞

image

@PrestonN
Copy link
Member

PrestonN commented Oct 8, 2020

That sounds like a different issue. I'd need to know what video you're trying to open that's causing that error. If FreeTube is opening properly, then it's not a problem with the extension and needs to be a new issue.

@360fun
Copy link
Author

360fun commented Oct 8, 2020

That sounds like a different issue. I'd need to know what video you're trying to open that's causing that error. If FreeTube is opening properly, then it's not a problem with the extension and needs to be a new issue.

Actually is the same error I put in my first message, but you're right it's something else: I get that error every time I open the App! I mistakenly associated the error with the video opening, but they are probably not correlated.

The behaviour I see when I click on a YT link (whatever) is:

  • the FreeTube app opens or gets the focus
  • that's it...no video starts playing, no errors, nothing happens at all!

This still needs to be fixed, so please re-open the issue. 🙏

@360fun
Copy link
Author

360fun commented Oct 8, 2020

I found the real cause of the "TypeError: Cannot read property 'simpleText' of undefined" error and opened another issue: #622

@360fun
Copy link
Author

360fun commented Oct 8, 2020

I tried to open freetube://www.youtube.com/watch?v=WHATEVER, I get the request to choose the FreeTube app but the behaviour is the same described: app opens or gets in focus but no video loaded.

@PrestonN
Copy link
Member

PrestonN commented Oct 9, 2020

Can you confirm that when FreeTube automatically opens up that it's using v0.9.0? If I had to guess, your Mac might still be using v0.8.0 to open the link, which wouldn't have the logic in it.

@360fun
Copy link
Author

360fun commented Oct 9, 2020

@PrestonN
Copy link
Member

PrestonN commented Oct 9, 2020

Alright. This is starting to be strange.

If you have the app opened up before you click on a link, does it redirect properly? I'm curious if it's maybe a timing issue with how the app is setup. If this works then this should help narrow it down.

@360fun
Copy link
Author

360fun commented Oct 9, 2020

No, in no case the video is loaded, the app just opens or switch focus but nothing else. 😢 It loads the default view with recent videos.
I've tested the latest build...same. 👐

@timharek
Copy link

timharek commented Oct 9, 2020

Same case for me as well, on macOS.

@PrestonN
Copy link
Member

PrestonN commented Oct 9, 2020

Going to re-purpose this issue since there's still a problem going on. Please know that I don't have access to a Mac and it's much harder for me to test for one, so this may be a while before I can get a proper look at it.

@PrestonN PrestonN reopened this Oct 9, 2020
@PrestonN PrestonN changed the title Open "youtube" links directly with FreeTube in different situations FreeTube Doesn't Register it's Protocol Correctly on Mac Oct 9, 2020
@PrestonN
Copy link
Member

Could one of you please try out this build and see if this fixes the issue? I haven't tested this so it might not work, but after some reading up the change I made should have done something. Let me know if anything is different.

@360fun
Copy link
Author

360fun commented Oct 10, 2020

Could one of you please try out this build and see if this fixes the issue? I haven't tested this so it might not work, but after some reading up the change I made should have done something. Let me know if anything is different.

It looks the same behaviour to me 😞
FreeTube is called but nothing is loaded, the content remains the same whatever it is. I tried to play a video and see if it gets at least interrupted...nope. All I get is the switch of focus from Brave to FreeTube. 👐

Maybe you can make a build with some debugging output that I can send you back to analyse?

@PrestonN PrestonN added bug Something isn't working and removed enhancement New feature or request labels Oct 11, 2020
@pqhf5kd
Copy link

pqhf5kd commented Oct 14, 2020

Also have the same problem with the latest build (the latest build includes all commits correct?).

@cmf
Copy link
Contributor

cmf commented Oct 15, 2020

I've implemented a fix for this in the linked PR. The custom protocol handling in macOS is different to Win/Linux. Those flows also changed a bit but I don't have a Win/Linux machine to test them on, so if someone could do a sanity check on those too that would be much appreciated.

@360fun
Copy link
Author

360fun commented Oct 15, 2020

I've implemented a fix for this in the linked PR. The custom protocol handling in macOS is different to Win/Linux. Those flows also changed a bit but I don't have a Win/Linux machine to test them on, so if someone could do a sanity check on those too that would be much appreciated.

waiting the build to test it! 😄

@timharek
Copy link

@cmf , can confirm that this works on my MBP 16". Good job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants