iv-org / invidious

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

[Bug] Cast from Hash(String, JSON::Any) to Array(T) failed, at /usr/share/crystal/src/json/any.cr:262:5:262 (TypeCastError) #4801

Open bullkang opened 1 month ago

bullkang commented 1 month ago

Title: Cast from Hash(String, JSON::Any) to Array(T) failed, at /usr/share/crystal/src/json/any.cr:262:5:262 (TypeCastError) Date: 2024-07-20T23:09:00Z Route: /data_control?referer=%2Ffeed%2Fsubscriptions Version: 2024.05.27-1ae14cc2 @ master

Backtrace

``` Cast from Hash(String, JSON::Any) to Array(T) failed, at /usr/share/crystal/src/json/any.cr:262:5:262 (TypeCastError) from /usr/share/crystal/src/json/any.cr:261:3 in 'as_a' from src/invidious/user/imports.cr:226:19 in 'from_youtube_wh' from src/invidious/routes/preferences.cr:324:21 in 'update_data_control' from src/invidious/routing.cr:66:27 in '->' from lib/kemal/src/kemal/route.cr:12:26 in '->' from src/invidious/helpers/handlers.cr:30:5 in 'process_request' from lib/kemal/src/kemal/route_handler.cr:17:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from lib/kemal/src/kemal/websocket_handler.cr:13:14 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_next' from src/invidious/helpers/handlers.cr:157:5 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_next' from src/invidious/helpers/handlers.cr:146:5 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from src/invidious/helpers/handlers.cr:68:12 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_next' from lib/kemal/src/kemal/exception_handler.cr:8:7 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from src/invidious/helpers/logger.cr:17:35 in 'call' from /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next' from lib/kemal/src/kemal/init_handler.cr:12:7 in 'call' from /usr/share/crystal/src/http/server/request_processor.cr:51:11 in 'process' from /usr/share/crystal/src/http/server.cr:521:5 in 'handle_client' from /usr/share/crystal/src/http/server.cr:451:5 in '->' from /usr/share/crystal/src/fiber.cr:146:11 in 'run' from /usr/share/crystal/src/fiber.cr:98:34 in '->' from ??? ```

SamantazFox commented 1 month ago

Hello! Can you please provide the file that caused this error?

If you don't want this file to be public (which is totally fine), you can share it privately over on Matrix, or by e-mail, as you prefer :)