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

Issues due to YouTube changes #1241

Closed
iAmNoVa-UXX opened this issue Jun 15, 2020 · 46 comments
Closed

Issues due to YouTube changes #1241

iAmNoVa-UXX opened this issue Jun 15, 2020 · 46 comments
Labels
bug Something isn't working

Comments

@iAmNoVa-UXX
Copy link

image

The image is something I've never encountered before. Can anyone explain this please?

@tleydxdy
Copy link
Contributor

I'm seeing the same on my server, it worked a couple minutes ago, and it suddenly stopped working. probably some changes on the youtube end

@pyrox0
Copy link

pyrox0 commented Jun 15, 2020

Same here.

@Perflyst Perflyst added the bug Something isn't working label Jun 15, 2020
@magicalprivacy
Copy link

It has happened for me for more than an hour.

@Perflyst Perflyst pinned this issue Jun 15, 2020
@Perflyst Perflyst changed the title A new bug? (I think) Issues due to YouTube changes Jun 15, 2020
@TheAssassin
Copy link

I'm seeing different values, doesn't seem to depend on the video, just random offsets (some of them very high even). Among the highest values is 178204.

youtube-dl and NewPipe seem to be not affected by this change. Maybe just a small change is required to fix this.

@DillFletch
Copy link

seems that youtube have broken it, having the same issue on my residential IP.

@TheAssassin
Copy link

By the way, it seems like it's been confirmed more than enough that there is an issue. Let's not post any more "doesn't work for me" that don't add new information, folks. That's what the emoji stuff is in the original post. The team can then focus on bug fixing.

@tuxayo
Copy link

tuxayo commented Jun 15, 2020

What team? Omar Roth is the only guy working on it (I think?).

https://github.com/omarroth/invidious/graphs/contributors?from=2019-12-31&to=2020-06-15&type=c

That's indeed a matter worthy of discussion. But you should open another issue so both discussions stay on track.

@scharmach
Copy link

@scharmach Do you mean NewPipe is also broken for you?
What I meant in my message is that if another alternative way to access YouTube work, it's a valuable example to fix Invidious.

See above, @TheAssassin already commented on this and the issue you've linked now is already linked here. This is your fourth comment in a row in this issue.

@tuxayo
Copy link

tuxayo commented Jun 15, 2020

edit: non relevant message deleted

@B0pol
Copy link
Contributor

B0pol commented Jun 15, 2020

I think I know why, they probably dropped old design, aka polymer that Invidious is using. I can't get old design by adding &disable_polymer=1 or &app=desktop in url bar, it was working before.
NewPipe is fine, we switched to the new design in march (when they announced to drop support for old design).
I've tested v0.18.2 (last version with old design), it's pretty much like invidious: trending is working, search is broken, we can't get metadata (uploader picture, description, upload date…) on a video, but we can watch the video without problem, as with the main instance.

@liamengland1
Copy link

liamengland1 commented Jun 15, 2020

I think I know why, they probably dropped support for old design, aka polymer that invidious is using. I can't get old design by adding &disable_polymer=1 or &app=desktop in url bar, it was working before.

Grr, they did. 😢
See reddit discussion: https://old.reddit.com/h9kpbp/?sort=top

@deep-gaurav
Copy link

I'm not sure if this helps, but I recently ported newpipe extractor to rust to be used on web as webassembly and on desktop with quickjs.
It can be found here rusty_pipe noquickjs branch and it seems to be working fine. It can be treated as an example to move to newdesign if move is going to be based on newpipe

There is also a work in progress frontend available like invidio.us at rustypipe.deepraven.co (extraction is done on client side so it's much slower than invidious)

@omarroth
Copy link
Contributor

Should be fixed with 1eca969.

@Zero3K
Copy link

Zero3K commented Jun 16, 2020

I can confirm that it has been fixed.

@TheAssassin
Copy link

I would love to test it, but the Docker build is broken. Alpine doesn't ship crystal 0.35.0 yet. That's rather annoying right now, as I can't test the fix unfortunately. See https://pkgs.alpinelinux.org/package/edge/community/x86_64/crystal. Is there any easy way to work around? Otherwise, us Docker users probably just have to wait until Alpine has got to build the latest version.

It might be viable to build crystal yourself in Docker if you really need to live on the "bleeding edge", I guess.

@tleydxdy
Copy link
Contributor

at this time you could build with, say arch, and just copy the binary over
as long as you build static binary it should work

@diazepan
Copy link

didn't work for me

I'm using crystal 0.35 and I did the shards upgrade and install which uses these dependencies

Using pg (0.21.1)
Using sqlite3 (0.16.0)
Using kemal (0.26.1 at a8c0f09b858162bd13c96663febef5527b322a32)
Using pool (0.2.3)
Using protodec (0.1.3)
Using lsquic (0.1.9 at 5261034c0daa83e3062cd6e284ac3fdc5520b188)
Using db (0.9.0)
Using radix (0.3.9)
Using kilt (0.4.0)
Using exception_page (0.1.4)

but when I do crystal build src/invidious.cr --release it shows this

Warning: Zlib is deprecated, use Compress::Zlib
Showing last frame. Use --error-trace for full trace.

In lib/kemal/src/kemal/helpers/helpers.cr:143:7

143 | Gzip::Writer.open(env.response) do |deflate|
^
Error: undefined constant Gzip::Writer

I know it has to do with this bug,
kemalcr/kemal#574

but the shard.lock ponts to the commit that solves the kemal bug and still gives the error

@idanoo
Copy link

idanoo commented Jun 16, 2020

@diazepan Try pulling master. It was resovled in a recent commit d30a972

@LWFlouisa
Copy link

LWFlouisa commented Jun 16, 2020

"Looks like you've found a bug in Invidious. Feel free to open a new issue here or send an email to [provider email] " from the Invidio.us instance.

I was trying to open a songwriter topic.

@tleydxdy
Copy link
Contributor

here's a Dockerfile based on arch that currently works for me. (ipv6 is not working, just in case if you use that)

FROM archlinux/base
WORKDIR /invidious
RUN pacman -Sy --noconfirm base-devel shards crystal librsvg
COPY ./shard.yml ./shard.yml
RUN shards update && shards install && \
    curl -Lo ./lib/lsquic/src/lsquic/ext/liblsquic.a https://omar.yt/lsquic/liblsquic.a
COPY ./src/ ./src/
COPY ./.git/ ./.git/
RUN crystal build ./src/invidious.cr --release
RUN useradd invidious
COPY ./assets/ ./assets/
COPY --chown=invidious ./config/config.yml ./config/config.yml
RUN sed -i 's/host: \(127.0.0.1\|localhost\)/host: postgres/' config/config.yml
COPY ./config/sql/ ./config/sql/
COPY ./locales/ ./locales/

USER invidious
CMD [ "/invidious/invidious" ]

@diazepan
Copy link

@diazepan Try pulling master. It was resovled in a recent commit d30a972

In the end I cleaned all the folder, did a git clone and this time could compile

@SuperSandro2000
Copy link
Contributor

SuperSandro2000 commented Jun 16, 2020

Why can't we use the official crystal image as base?

https://hub.docker.com/layers/crystallang/crystal/0.35.0-alpine/images/sha256-fa5dea8c4a61246bb50fd901be3b6b19f71a32c6f625b3f2516b470ae83f1bc8?context=explore

ipv6 is not working

So Arch is also totally broken with new network tech.

@SuperSandro2000
Copy link
Contributor

I did a PR which fixes the Dockerfile #1247

@SuperSandro2000
Copy link
Contributor

Also I still receive errors and videos are not loaing.

2020-06-16T09:45:36.658750170Z Exception: unknown result set attribute: title (DB::MappingException)
2020-06-16T09:45:36.658786779Z   from src/invidious/videos.cr:752:3 in 'initialize'
2020-06-16T09:45:36.658813286Z   from src/invidious/videos.cr:752:3 in 'new'
2020-06-16T09:45:36.658817415Z   from lib/db/src/db/result_set.cr:74:7 in 'read'
2020-06-16T09:45:36.658821099Z   from lib/db/src/db/query_methods.cr:202:9 in 'query_one?:as'
2020-06-16T09:45:36.658824718Z   from src/invidious/videos.cr:911:15 in 'get_video'
2020-06-16T09:45:36.658828390Z   from src/invidious/videos.cr:910:1 in 'get_video:region'
2020-06-16T09:45:36.658832106Z   from src/invidious.cr:5295:11 in '->'
2020-06-16T09:45:36.658836167Z   from ../usr/share/crystal/src/primitives.cr:255:3 in '->'
2020-06-16T09:45:36.658839892Z   from ../usr/share/crystal/src/primitives.cr:255:3 in 'process_request'
2020-06-16T09:45:36.658843550Z   from lib/kemal/src/kemal/route_handler.cr:17:7 in 'call'
2020-06-16T09:45:36.658847203Z   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
2020-06-16T09:45:36.658851051Z   from lib/kemal/src/kemal/websocket_handler.cr:13:14 in 'call'
2020-06-16T09:45:36.658854895Z   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
2020-06-16T09:45:36.658858498Z   from lib/kemal/src/kemal/filter_handler.cr:21:7 in 'call'
2020-06-16T09:45:36.658862134Z   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
2020-06-16T09:45:36.658865967Z   from src/invidious/helpers/handlers.cr:212:5 in 'call'
2020-06-16T09:45:36.658869615Z   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
2020-06-16T09:45:36.658882908Z   from src/invidious/helpers/handlers.cr:94:12 in 'call'
2020-06-16T09:45:36.658886495Z   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
2020-06-16T09:45:36.658890164Z   from src/invidious/helpers/handlers.cr:145:12 in 'call'
2020-06-16T09:45:36.658893919Z   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
2020-06-16T09:45:36.658897729Z   from src/invidious/helpers/handlers.cr:70:5 in 'call'
2020-06-16T09:45:36.658901301Z   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
2020-06-16T09:45:36.658905389Z   from src/invidious/helpers/static_file_handler.cr:189:11 in 'call'
2020-06-16T09:45:36.658908920Z   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
2020-06-16T09:45:36.658912487Z   from lib/kemal/src/kemal/exception_handler.cr:8:7 in 'call'
2020-06-16T09:45:36.658916082Z   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
2020-06-16T09:45:36.658919629Z   from src/invidious/helpers/logger.cr:16:5 in 'call'
2020-06-16T09:45:36.658923225Z   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
2020-06-16T09:45:36.658926922Z   from lib/kemal/src/kemal/init_handler.cr:12:7 in 'call'
2020-06-16T09:45:36.658931487Z   from ../usr/share/crystal/src/http/server/request_processor.cr:50:11 in 'process'
2020-06-16T09:45:36.658938701Z   from ../usr/share/crystal/src/http/server.cr:513:5 in 'handle_client'
2020-06-16T09:45:36.658942426Z   from ../usr/share/crystal/src/http/server.cr:468:13 in '->'
2020-06-16T09:45:36.658946084Z   from ../usr/share/crystal/src/primitives.cr:255:3 in 'run'
2020-06-16T09:45:36.658949651Z   from ../usr/share/crystal/src/fiber.cr:92:34 in '->'
2020-06-16T09:45:36.658953174Z   from ???
2020-06-16T09:45:36.658966040Z
2020-06-16T09:45:36.658969454Z 2020-06-16T09:45:36.658735Z  ERROR - http.server: Unhandled exception on HTTP::Handler
2020-06-16T09:45:36.658973257Z Missing hash key: "preferences" (KeyError)
2020-06-16T09:45:36.667293278Z   from ../usr/share/crystal/src/hash.cr:1027:11 in '[]'
2020-06-16T09:45:36.667323190Z   from lib/kemal/src/kemal/ext/context.cr:51:7 in 'get'
2020-06-16T09:45:36.667326346Z   from src/invidious/views/template.ecr:2:17 in '->'
2020-06-16T09:45:36.667329044Z   from ../usr/share/crystal/src/primitives.cr:255:3 in '->'
2020-06-16T09:45:36.667331437Z   from ../usr/share/crystal/src/primitives.cr:255:3 in 'call_exception_with_status_code'
2020-06-16T09:45:36.667333763Z   from lib/kemal/src/kemal/exception_handler.cr:15:14 in 'call'
2020-06-16T09:45:36.667336079Z   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
2020-06-16T09:45:36.667338357Z   from src/invidious/helpers/logger.cr:16:5 in 'call'
2020-06-16T09:45:36.667340605Z   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
2020-06-16T09:45:36.667342938Z   from lib/kemal/src/kemal/init_handler.cr:12:7 in 'call'
2020-06-16T09:45:36.667345220Z   from ../usr/share/crystal/src/http/server/request_processor.cr:50:11 in 'process'
2020-06-16T09:45:36.667347502Z   from ../usr/share/crystal/src/http/server.cr:513:5 in 'handle_client'
2020-06-16T09:45:36.667349732Z   from ../usr/share/crystal/src/http/server.cr:468:13 in '->'
2020-06-16T09:45:36.667351953Z   from ../usr/share/crystal/src/primitives.cr:255:3 in 'run'
2020-06-16T09:45:36.667354401Z   from ../usr/share/crystal/src/fiber.cr:92:34 in '->'
2020-06-16T09:45:36.667357046Z   from ???
2020-06-16T09:45:36.667359264Z

@tleydxdy
Copy link
Contributor

tleydxdy commented Jun 16, 2020

So Arch is also totally broken with new network tech.

na, it's docker that's being the troubling kid, their ipv6 support is horrible

plain alpine image was much smaller, and I think this time it's causing trouble because of breaking change in 0.35 and this new polymer thing happened together, otherwise waiting for alpine to update wouldn't be such a big deal.

about the errors, are you using a fresh build?

@SuperSandro2000
Copy link
Contributor

SuperSandro2000 commented Jun 16, 2020

their ipv6 support is horrible

Oh, forgot about that. You are right with this one.

about the errors, are you using a fresh build?

I built my PR so I the image should be fresh.

Edit: Now it works. Strange... I did not change anything.

But I noticed that my trending page is empty and nothing loads. Really wanky today.

@TheAssassin
Copy link

Thanks @SuperSandro2000 for the PR, it works well that way, seems like a good idea to simply use the pre-built crystal images.

I see unknown result set attribute: title all the time when trying to access any video page. Is that just me? Does it work normally for you again?

@SuperSandro2000
Copy link
Contributor

I have/had the same issue. I already posted a log above. It went away after a while but I am not sure why cause I didn't change anything. Maybe the YouTube server are a bit wanky today.

@seonwoolee
Copy link

I had this problem yesterday on my personal invidious instance. I didn't update my it at all and it started working again today.

YouTube must've changed something.

@arnauldb
Copy link

I can't import my subscriptions from youtube anymore. Nothing happens after having uploaded the file in invidious.

@iAmNoVa-UXX
Copy link
Author

iAmNoVa-UXX commented Jun 16, 2020

Does anybody else realize how laggy all instances are after the patch? I've seen that its quite laggy. Or every video has that error code as well

Edit: also there are a lot of error's popping up whenever I try to watch a video as well. I'm not sure why but its on every instance

@TheAssassin
Copy link

@iAmNoVa-UXX cannot confirm that, mine is pretty responsive... but returns errors all the time.

Short excerpt (it's the same errors all the time):

invidious_1  | 2020-06-16T23:31:43.773492Z  ERROR - http.server: Unhandled exception on HTTP::Handler
invidious_1  | Missing hash key: "preferences" (KeyError)
invidious_1  |   from ../usr/share/crystal/src/hash.cr:1027:11 in '[]'
invidious_1  |   from lib/kemal/src/kemal/ext/context.cr:51:7 in 'get'
invidious_1  |   from src/invidious/views/template.ecr:2:17 in '->'
invidious_1  |   from ../usr/share/crystal/src/primitives.cr:255:3 in '->'
invidious_1  |   from ../usr/share/crystal/src/primitives.cr:255:3 in 'call_exception_with_status_code'
invidious_1  |   from lib/kemal/src/kemal/exception_handler.cr:15:14 in 'call'
invidious_1  |   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
invidious_1  |   from src/invidious/helpers/logger.cr:16:5 in 'call'
invidious_1  |   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
invidious_1  |   from lib/kemal/src/kemal/init_handler.cr:12:7 in 'call'
invidious_1  |   from ../usr/share/crystal/src/http/server/request_processor.cr:50:11 in 'process'
invidious_1  |   from ../usr/share/crystal/src/http/server.cr:513:5 in 'handle_client'
invidious_1  |   from ../usr/share/crystal/src/http/server.cr:468:13 in '->'
invidious_1  |   from ../usr/share/crystal/src/primitives.cr:255:3 in 'run'
invidious_1  |   from ../usr/share/crystal/src/fiber.cr:92:34 in '->'
invidious_1  |   from ???
invidious_1  | 
invidious_1  | Exception: unknown result set attribute: title (DB::MappingException)
invidious_1  |   from src/invidious/videos.cr:752:3 in 'initialize'
invidious_1  |   from src/invidious/videos.cr:752:3 in 'new'
invidious_1  |   from lib/db/src/db/result_set.cr:74:7 in 'read'
invidious_1  |   from lib/db/src/db/query_methods.cr:202:9 in 'query_one?:as'
invidious_1  |   from src/invidious/videos.cr:914:15 in 'get_video'
invidious_1  |   from src/invidious/videos.cr:913:1 in 'get_video:region'
invidious_1  |   from src/invidious.cr:5295:11 in '->'
invidious_1  |   from ../usr/share/crystal/src/primitives.cr:255:3 in '->'
invidious_1  |   from ../usr/share/crystal/src/primitives.cr:255:3 in 'process_request'
invidious_1  |   from lib/kemal/src/kemal/route_handler.cr:17:7 in 'call'
invidious_1  |   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
invidious_1  |   from lib/kemal/src/kemal/websocket_handler.cr:13:14 in 'call'
invidious_1  |   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
invidious_1  |   from lib/kemal/src/kemal/filter_handler.cr:21:7 in 'call'
invidious_1  |   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
invidious_1  |   from src/invidious/helpers/handlers.cr:212:5 in 'call'
invidious_1  |   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
invidious_1  |   from src/invidious/helpers/handlers.cr:94:12 in 'call'
invidious_1  |   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
invidious_1  |   from src/invidious/helpers/handlers.cr:145:12 in 'call'
invidious_1  |   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
invidious_1  |   from src/invidious/helpers/handlers.cr:70:5 in 'call'
invidious_1  |   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
invidious_1  |   from src/invidious/helpers/static_file_handler.cr:189:11 in 'call'
invidious_1  |   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
invidious_1  |   from lib/kemal/src/kemal/exception_handler.cr:8:7 in 'call'
invidious_1  |   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
invidious_1  |   from src/invidious/helpers/logger.cr:16:5 in 'call'
invidious_1  |   from ../usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
invidious_1  |   from lib/kemal/src/kemal/init_handler.cr:12:7 in 'call'
invidious_1  |   from ../usr/share/crystal/src/http/server/request_processor.cr:50:11 in 'process'
invidious_1  |   from ../usr/share/crystal/src/http/server.cr:513:5 in 'handle_client'
invidious_1  |   from ../usr/share/crystal/src/http/server.cr:468:13 in '->'
invidious_1  |   from ../usr/share/crystal/src/primitives.cr:255:3 in 'run'
invidious_1  |   from ../usr/share/crystal/src/fiber.cr:92:34 in '->'
invidious_1  |   from ???

Using latest git master, with the fixed Docker setup. My own instance hasn't been working ever since this YouTube change.

@omarroth
Copy link
Contributor

@TheAssassin

Check that you've run migrate-db-1eca969.sh in your docker container. You can alternatively set check_tables: true in your config, which should make the necessary changes automatically.

@TheAssassin
Copy link

D'oh! I haven't run any scripts nor have that option set. Docker containers usually handle migrations automatically.

I don't use any persistent storage features (private evaluation instance), so I could just as well have removed all data and started over. I would really recommend to add this config to the default docker-compose.yml. It's not really obvious, especially since most other Docker software just handles this automatically.

Anyway, just set the config, doesn't work, back to the Unexpected char 's' at 1:1. I don't see the script in the Docker container. So I went the cheap way, removed all data and stuff, and it just works fine again.

Thanks @omarroth for the tip!

@SuperSandro2000
Copy link
Contributor

You can alternatively set check_tables: true in your config, which should make the necessary changes automatically.

Exactly what I was looking for. Docker should apply that by default.

@SuperSandro2000
Copy link
Contributor

I created #1254 to change the default behavior.

Also I noticed while doing this that the tables I dropped in the migration where dropped again. I probably tried dropping them from the wrong database or something similar.

@raycheung
Copy link
Contributor

So I went the cheap way, removed all data and stuff, and it just works fine again.

The check_tables: true didn't work for me either, I've to went in the postgres and purge the videos table to get around: Unexpected char 's' at 1:1, as follows:

docker-compose exec postgres sh

# psql -U kemal -d invidious

invidious=> truncate table videos;

Then immediately without any further restart it magically works again!

@iAmNoVa-UXX
Copy link
Author

image

huh?

@couxx
Copy link

couxx commented Jun 18, 2020

same thing happened to me

@bitnol
Copy link

bitnol commented Jun 18, 2020

@omarroth
Requesting merge of fix to API-Only branch.

@cy8aer
Copy link

cy8aer commented Jun 19, 2020

i am actually running 0.20.1-1f43552 @ master (as invidio.us) but I cannot play any media (The media could not be loaded, either because the server or network failed or because the format is not supported.) though invidio.us is able to play. What can be the difference?

@cy8aer
Copy link

cy8aer commented Jun 19, 2020

hm, looks like check_tables: true - works again...

@iAmNoVa-UXX
Copy link
Author

image

Uh? What? I'm watching the video...but...what?

@iAmNoVa-UXX
Copy link
Author

image

@omarroth I'm confused on this one. I'm already signed in which is the odd part.

@unixfox
Copy link
Member

unixfox commented Jun 25, 2020

@omarroth I'm confused on this one. I'm already signed in which is the odd part.

It's a message that Invidious transferred from the actual YouTube website and not generated by Indivious itself.

@TheAssassin
Copy link

@unixfox yep, exactly that. IMO Invidious should communicate this more clearly. It's sometimes not easy to differentiate between errors in Invidious and ones it just forwards.

@Perflyst Perflyst unpinned this issue Jul 19, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests