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] 500 Internal Server Error from .../api/v1/comments/k902ZoQRC-4?format=html&hl=es&thin_mode=false #2096

Closed
petterreinholdtsen opened this issue May 19, 2021 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@petterreinholdtsen
Copy link

petterreinholdtsen commented May 19, 2021

Describe the bug

When trying to watch .../watch?v=k902ZoQRC-4&local=true on several invidious instances, I get the message "The media playback was aborted due to a corruption problem or because the media used features your browser did not support" and am unable to view the video. Visiting the F12 browser debugger, I notice the request to .../api/v1/comments/k902ZoQRC-4?format=html&hl=es&thin_mode=false fail with 500 and this message:

{
  "error":"Missing hash key: \"likeCount\"",
  "errorBacktrace":"Missing hash key: \"likeCount\" (KeyError)\n  from /usr/share/crystal/src/hash.cr:1030:9 in '[]'\n  from /usr/share/crystal/src/json/builder.cr:250:3 in 'fetch_youtube_comments'\n  from src/invidious.cr:2048:18 in '->'\n  from lib/kemal/src/kemal/route.cr:13:9 in '->'\n  from /usr/share/crystal/src/primitives.cr:255:3 in 'call'\n  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call'\n  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'\n  from lib/kemal/src/kemal/filter_handler.cr:21:7 in 'call'\n  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'\n  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'\n  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'\n  from src/invidious/helpers/handlers.cr:158:7 in 'call'\n  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'\n  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'\n  from src/invidious/helpers/static_file_handler.cr:189:11 in 'call'\n  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call'\n  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call'\n  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'\n  from lib/kemal/src/kemal/init_handler.cr:12:7 in 'process'\n  from /usr/share/crystal/src/http/server.cr:498:5 in '->'\n  from /usr/share/crystal/src/primitives.cr:255:3 in 'run'\n  from ???\n"
}

I came across #602 which suggested adding &local=true to the watch link, but it did not help, making me believe this issue is different from the earlier one.

Looking at the 500 message, could it be that Invidious fail to handle a video with no comments in it?

Steps to Reproduce

Visit video id "k902ZoQRC-4" on any Invidious site, for example https://invidious.kavin.rocks/watch?v=k902ZoQRC-4. Try to watch video.

Logs

These are the entries in the javascript console:

Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). contentscript.js:1:118431
VIDEOJS: WARN: videojs.plugin() is deprecated; use videojs.registerPlugin() instead video.min.js:12:795
This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. watch
VIDEOJS: WARN: videojs.Hls is deprecated. Use videojs.Vhs instead. video.min.js:12:795
Media resource https://invidious.kavin.rocks/latest_version?id=k902ZoQRC-4&itag=18 could not be decoded. watch
VIDEOJS: ERROR: (CODE:3 MEDIA_ERR_DECODE) The media playback was aborted due to a corruption problem or because the media used features your browser did not support.
Object { code: 3, message: "The media playback was aborted due to a corruption problem or because the media used features your browser did not support." }
video.min.js:12:795
Media resource https://invidious.kavin.rocks/latest_version?id=k902ZoQRC-4&itag=18 could not be decoded, error: Error Code: NS_ERROR_DOM_MEDIA_DECODE_ERR (0x806e0004)
Details: virtual mozilla::MediaResult mozilla::FFmpegVideoDecoder<58>::DoDecode(mozilla::MediaRawData*, uint8_t*, int, bool*, mozilla::MediaDataDecoder::DecodedData&): avcodec_send_packet error: -1094995529 watch

@petterreinholdtsen petterreinholdtsen added the bug Something isn't working label May 19, 2021
@SamantazFox
Copy link
Member

This is related to #2092. As said there, this is probably a change on youtube's side.

@TheFrenchGhosty TheFrenchGhosty added duplicate This issue or pull request already exists and removed bug Something isn't working labels May 21, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants