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

[Bug] Redirect from short youtu.be URLs does not work #3933

Open
Trit34 opened this issue Jun 23, 2023 · 6 comments · May be fixed by #3990
Open

[Bug] Redirect from short youtu.be URLs does not work #3933

Trit34 opened this issue Jun 23, 2023 · 6 comments · May be fixed by #3990
Labels
bug Something isn't working

Comments

@Trit34
Copy link

Trit34 commented Jun 23, 2023

Describe the bug
youtu.be/××××× short URLs are usually converted as [Invidious]/××××× and they used to be redirected to the full URLs [Invidious]/watch?v=×××××.
As of today (but I don’t know since when exactly), it does not work anymore and such shortened URLs lead to the homepage of the instance instead.

Steps to Reproduce
Tested on FDN’s Invidious instance (updated each Sunday):

  1. Go to https://invidious.fdn.fr/yWsS5UJf8yU (for example)
  2. Instead of redirecting to https://invidious.fdn.fr/watch?v=yWsS5UJf8yU, it loads https://invidious.fdn.fr/feed/popular, the homepage.

Additional context

  • Browser (if applicable): Vivaldi
  • OS (if applicable): Arch Linux
@Trit34 Trit34 added the bug Something isn't working label Jun 23, 2023
@unixfox
Copy link
Member

unixfox commented Jun 23, 2023

Closing as it works fine on instances that are officially published on https://instances.invidious.io

@unixfox unixfox closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2023
@unixfox unixfox added invalid This doesn't seem right and removed bug Something isn't working labels Jun 23, 2023
@Trit34
Copy link
Author

Trit34 commented Jun 23, 2023

Closing as it works fine on instances that are officially published on https://instances.invidious.io

Not all of them, then: it works with yewtu.be (last updated on 11th June), but not with https://yt.artemislena.eu/, nor https://invidious.projectsegfau.lt/ (both last updated to 21st June, and both are instances on this list).

Maybe you don’t want to hear about it anymore since it (still?) works on the instances you tested with (and it’s good to hear, but how long will it last for them?), but I wonder if there was a commit that break this redirect (since it seems to affect only instances updated circa after mid-June), and I’m not a programmer. Luckily, it’s a minor (but annoying) bug, but I guess that if other people notice it on their side, they will report it too.

@unixfox
Copy link
Member

unixfox commented Jun 23, 2023

Reopening as I can reproduce the issue on the test instance: https://test.invidious.io/yWsS5UJf8yU

I did close the issue before because it was working on an up to date instance: https://vid.puffyan.us/yWsS5UJf8yU

@unixfox unixfox reopened this Jun 23, 2023
@unixfox unixfox added bug Something isn't working and removed invalid This doesn't seem right labels Jun 23, 2023
@unnamed25
Copy link

unnamed25 commented Jun 25, 2023

Yes, there is indeed such a problem with some instances.
For example, on the yt.artemislena.eu instance, any attempt to enter a short video ID (example https://yt.artemislena.eu/kwrKVY72iSk) only results in a redirect to the site root.
There are suspicions that this is due to some kind of incorrect web server settings, but I don’t know with which ones.

@unixfox
Copy link
Member

unixfox commented Jun 25, 2023

There are suspicions that this is due to some kind of incorrect web server settings, but I don’t know with which ones.

No I don't think it's that. It used to work in the past and invidious never required any special configuration.

It could be that youtube is doing some A/B testing and an endpoint that we are using for detecting short URLs doesn't work anymore.

@johackim
Copy link

johackim commented Jul 12, 2023

I have this bug too.

I use this invidious configuration on my instance https://invidious.ethibox.fr.

The format https://invidious.ethibox.fr/watch?v=fmsoym8I-3o works correctly.

But when I try to access a YouTube video with the https://invidious.ethibox.fr/fmsoym8I-3o format, it doen't work, it redirects to the homepage.

rnek0 added a commit to rnek0/invidious that referenced this issue Jul 13, 2023
About issue : iv-org#3933

I think it should be reviewed here: https://github.com/rnek0/invidious/blob/507bed6313b49564e53b69a5c9b4d072d1e05e4b/assets/js/player.js#L40 

short_url will be used here : https://github.com/rnek0/invidious/blob/507bed6313b49564e53b69a5c9b4d072d1e05e4b/assets/js/player.js#L119

since get embedCode() a little further down returns a correct code by calling the same function on line 127

I would suggest changing this: "var short_url = location.origin + '/' + video_data.id + embed_url.search;" 
to this "var short_url = location.origin + '/watch?v=' + video_data.id + embed_url.search;"
@SamantazFox SamantazFox linked a pull request Jul 16, 2023 that will close this issue
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.

4 participants