Skip to content

[Bug] Missing hash key: "videoId" (KeyError) #5225

@Minecon724

Description

@Minecon724

Describe the bug

If there's a post in the posts tab that links to a deleted video the error will happen

Steps to Reproduce

"posts" in channel UC1ucDz-ArDQglclXamHkl7g (has only one post linking a deleted video)

Logs

Title: Missing hash key: "videoId" (KeyError)
Date: 2025-03-30T08:54:56Z
Route: /channel/UC1ucDz-ArDQglclXamHkl7g/community
Version: 2025.03.29-97e1474 @ master

Backtrace

Missing hash key: "videoId" (KeyError)
  from /usr/share/crystal/src/hash.cr:1151:9 in '??'
  from /usr/share/crystal/src/json/any.cr:249:3 in 'process'
  from src/invidious/yt_backend/extractors.cr:991:17 in 'parse_item'
  from src/invidious/channels/community.cr:139:21 in 'extract_channel_community:ucid:locale:format:thin_mode'
  from src/invidious/routes/channels.cr:248:26 in 'community'
  from lib/kemal/src/kemal/route.cr:13:9 in '->'
  from src/invidious/helpers/handlers.cr:31:37 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
  from lib/kemal/src/kemal/filter_handler.cr:21:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
  from src/invidious/helpers/handlers.cr:95:12 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
  from src/ext/kemal_static_file_handler.cr:106:14 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call'
  from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call'
  from /usr/share/crystal/src/http/server/request_processor.cr:51:11 in 'handle_client'
  from /usr/share/crystal/src/fiber.cr:143:11 in 'run'
  from ???

Screenshots

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions