iv-org / invidious

Invidious is an alternative front-end to YouTube
https://invidious.io
GNU Affero General Public License v3.0
16.46k stars 1.85k forks source link

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

Closed bannert1337 closed 1 month ago

bannert1337 commented 1 month ago

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

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.

unixfox commented 1 month ago

https://github.com/iv-org/invidious/issues/4069