Skip to content

[Bug] Index out of bounds (IndexError) #4982

@bannert1337

Description

@bannert1337

Describe the bug
When attempting to import a YouTube "Watch Later" playlist into Invidious, the import process fails with an "Index out of bounds (IndexError)" error. This occurs consistently across different Invidious instances and with different playlists.

Steps to Reproduce

  1. Log in to an Invidious account
  2. Navigate to the Invidious settings
  3. Access the Import page
  4. Select a YouTube playlist CSV file (in this case, "Watch later-Videos.csv")
  5. Click the Import button
  6. Observe the error page with "Index out of bounds (IndexError)"

Logs

Index out of bounds (IndexError)
  from src/invidious/routes/preferences.cr:284:14 in 'update_data_control'
  from lib/kemal/src/kemal/route.cr:12:9 in '->'
  from src/invidious/helpers/handlers.cr:30: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:94: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:112:11 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:141:11 in 'run'
  from ???

(Full stack trace as provided in the original error message)

Additional context

  • Browser: Floorp version 11.19.0 (64-bit)
  • OS: Windows 11
  • The issue occurs with a Watch Later playlist CSV file of 19 KB, containing 501 entries
  • The same error occurs when trying to import other playlists
  • The issue has been reproduced on multiple Invidious instances, including self-hosted and public ones
  • User was logged into their Invidious account during the import attempt

This error prevents users from importing their YouTube playlists into Invidious, which is a significant feature for those transitioning from YouTube to Invidious. The consistency of the error across different instances and playlists suggests a potential issue in the playlist import functionality of Invidious itself, rather than a problem with a specific instance or playlist.

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