Skip to content

[Bug] Nil assertion failed (NilAssertionError) #5386

@DarkTankist

Description

@DarkTankist

Describe the bug
"Copyrighted" videos won't display

Steps to Reproduce

  1. On the search bar write: "Beatles"
  2. Open the first video

Logs

Title: `Nil assertion failed (NilAssertionError)
Date: `2025-07-16T08:58:52Z`
Route: `/watch?v=n2PNRTP49sk`
Version: `2025.05.17-f07859e @ (HEAD detached at v2.20250517.0)`

<details>
<summary>Backtrace</summary>
<p>

Nil assertion failed (NilAssertionError)
  from /usr/share/crystal/src/nil.cr:113:7 in 'not_nil!'
  from /usr/share/crystal/src/nil.cr:109:3 in 'not_nil!'
  from src/invidious/http_server/utils.cr:12:24 in 'proxy_video_url'
  from src/invidious/routes/watch.cr:128:32 in 'handle'
  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 ???
</p>
</details>

Screenshots

Image

Additional context

  • Browser (if applicable): Firefox 140.0.4 (64-bit)
  • OS (if applicable): Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions