Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Strange error when running the 'make' command. - crystal 1.12 error #4578

Closed
Ultragliass opened this issue Apr 11, 2024 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@Ultragliass
Copy link

Describe the bug
During the steps of setting up invidious, the make command exits with an error Error: expected argument #2 to 'Hash(Symbol, Float64 | Nil)#[]=' to be (Float64 | Nil), not (Time::Span | Nil).

Steps to Reproduce
Just the normal invidious install process.

  1. Install the Debian/Ubuntu dependencies.
  2. Add the user invidious and clone the git repository.
  3. Set up PostgresSQL.
  4. Change to the invidious user, cd to the invidious folder, and run the make command.

Logs

$ cd invidious
$ make
shards install --production
Resolving dependencies
Fetching https://github.com/will/crystal-pg.git
Fetching https://github.com/jeromegn/kilt.git
Fetching https://github.com/crystal-lang/crystal-sqlite3.git
Fetching https://github.com/athena-framework/negotiation.git
Fetching https://github.com/iv-org/protodec.git
Fetching https://github.com/kemalcr/kemal.git
Fetching https://github.com/crystal-lang/crystal-db.git
Fetching https://github.com/luislavena/radix.git
Fetching https://github.com/crystal-loot/exception_page.git
Fetching https://github.com/sija/backtracer.cr.git
Installing db (0.10.1)
Installing pg (0.24.0)
Installing sqlite3 (0.18.0)
Installing radix (0.4.1)
Installing backtracer (1.2.1)
Installing exception_page (0.2.2)
Installing kemal (1.1.2)
Installing kilt (0.6.1)
Installing protodec (0.1.5)
Installing athena-negotiation (0.1.1)
crystal build src/invidious.cr --release --debug --progress --stats --error-trace
Parse:                             00:00:00.000464305 (   1.16MB)
[2/13] Semantic (top level)              
Checking player dependencies, this may take more than 20 minutes... If it is stuck, check your internet connection.
Resolving player dependencies
Fetched videojs-contrib-quality-levels
Fetched videojs-overlay
Fetched videojs-markers
Fetched videojs-http-source-selector
Fetched videojs-vtt-thumbnails
Fetched videojs-mobile-ui
Fetched videojs-share
Fetched videojs-vr
Fetched video.js

Done checking player dependencies, now compiling Invidious...
Semantic (top level):              00:00:03.773630675 ( 370.02MB)
Semantic (new):                    00:00:00.002340888 ( 370.02MB)
Semantic (type declarations):      00:00:00.036031941 ( 386.02MB)
Semantic (abstract def check):     00:00:00.020010678 ( 402.02MB)
Semantic (restrictions augmenter): 00:00:00.010312287 ( 402.02MB)
Semantic (ivars initializers):     00:00:01.205096429 ( 498.15MB)
Semantic (cvars initializers):     00:00:00.017351421 ( 498.15MB)
In src/invidious.cr:188:17

 188 | Invidious::Jobs.start_all
                       ^--------
Error: instantiating 'Invidious::Jobs.start_all()'


In src/invidious/jobs.cr:37:19

 37 | spawn { job.begin }
                  ^----
Error: instantiating 'Invidious::Jobs::BaseJob+#begin()'


In src/invidious/jobs/refresh_channels_job.cr:14:5

 14 | loop do
      ^---
Error: instantiating 'loop()'


In src/invidious/jobs/refresh_channels_job.cr:14:5

 14 | loop do
      ^---
Error: instantiating 'loop()'


In src/invidious/jobs/refresh_channels_job.cr:16:13

 16 | PG_DB.query("SELECT id FROM channels ORDER BY updated") do |rs|
            ^----
Error: instantiating 'DB::Database#query(String)'


In src/invidious/jobs/refresh_channels_job.cr:16:13

 16 | PG_DB.query("SELECT id FROM channels ORDER BY updated") do |rs|
            ^----
Error: instantiating 'DB::Database#query(String)'


In src/invidious/jobs/refresh_channels_job.cr:17:12

 17 | rs.each do
         ^---
Error: instantiating 'DB::ResultSet+#each()'


In src/invidious/jobs/refresh_channels_job.cr:17:12

 17 | rs.each do
         ^---
Error: instantiating 'DB::ResultSet+#each()'


In src/invidious/jobs/refresh_channels_job.cr:33:25

 33 | channel = fetch_channel(id, pull_all_videos: CONFIG.full_refresh)
                ^------------
Error: instantiating 'fetch_channel(String, pull_all_videos: Bool)'


In src/invidious/channels/channels.cr:198:44

 198 | videos, continuation = IV::Channel::Tabs.get_videos(channel)
                                                ^---------
Error: instantiating 'Invidious::Channel::Tabs.get_videos(InvidiousChannel)'


In src/invidious/channels/videos.cr:90:12

 90 | return get_videos(
             ^---------
Error: instantiating 'get_videos(String, String, continuation: Nil, sort_by: String)'


In src/invidious/channels/videos.cr:98:31

 98 | initial_data = YoutubeAPI.browse(continuation: continuation)
                                ^-----
Error: instantiating 'YoutubeAPI.browse(continuation: String)'


In src/invidious/yt_backend/youtube_api.cr:367:17

 367 | return self._post_json("/youtubei/v1/browse", data, client_config)
                   ^---------
Error: instantiating 'YoutubeAPI._post_json(String, Hash(String, Hash(String, Hash(String, Int64 | String)) | String), Nil)'


In src/invidious/yt_backend/youtube_api.cr:623:20

 623 | body = YT_POOL.client(client_config.proxy_region) do |client|
                      ^-----
Error: instantiating 'YoutubeConnectionPool#client((String | Nil))'


In src/invidious/yt_backend/connection_pool.cr:29:14

 29 | conn = make_client(url, region, force_resolve = true)
             ^----------
Error: instantiating 'make_client(URI, String, Bool)'


In src/invidious/yt_backend/connection_pool.cr:75:25

 75 | PROXY_LIST[region]?.try &.sample(40).each do |proxy|
                          ^--
Error: instantiating '(Array(NamedTuple(ip: String, port: Int32)) | Nil)#try()'


In src/invidious/yt_backend/connection_pool.cr:75:25

 75 | PROXY_LIST[region]?.try &.sample(40).each do |proxy|
                          ^--
Error: instantiating '(Array(NamedTuple(ip: String, port: Int32)) | Nil)#try()'


In src/invidious/yt_backend/connection_pool.cr:78:16

 78 | client.set_proxy(proxy)
             ^--------
Error: instantiating 'HTTPClient#set_proxy(HTTPProxy)'


In src/invidious/yt_backend/proxy.cr:74:81

 74 | @io = proxy.open(host: @host, port: @port, tls: @tls, connection_options: proxy_connection_options)
                                                                                ^-----------------------
Error: instantiating 'proxy_connection_options()'


In src/invidious/yt_backend/proxy.cr:87:26

 87 | opts[:dns_timeout] = @dns_timeout
                           ^-----------
Error: expected argument #2 to 'Hash(Symbol, Float64 | Nil)#[]=' to be (Float64 | Nil), not (Time::Span | Nil)

Overloads are:
 - Hash(K, V)#[]=(key : K, value : V)
make: *** [Makefile:45: invidious] Error 1

Additional context
I often install and run Invidious manually on my Debian server, and I wanted to install it again after nuking it. Never encountered this error before, or any errors, for that matter. Haven't done anything differently. No idea what to do. I tried uninstalling everything and reinstalling, same error.

@Ultragliass Ultragliass added the bug Something isn't working label Apr 11, 2024
@unixfox unixfox added question Further information is requested and removed bug Something isn't working labels Apr 11, 2024
@unixfox
Copy link
Member

unixfox commented Apr 11, 2024

Hello, this sounds like a configuration issue on your side.

As maintainers, we do not have a lot of free time so you should ask your question on our matrix channel or IRC.

Closing as it's a configuration issue on your side.

@unixfox unixfox closed this as completed Apr 11, 2024
@unixfox unixfox changed the title [Bug] Strange error when running the 'make' command. [Question] Strange error when running the 'make' command. Apr 11, 2024
@kzarist
Copy link

kzarist commented Apr 25, 2024

@Ultragliass do you figure out what's wrong already?
I encountered the same error today.
Crystal 1.12.1

@syeopite
Copy link
Member

Crystal 1.12 isn't supported just yet but support is pending in #4599 and/or #4570. For now please downgrade to an earlier version of Crystal

@unixfox unixfox added bug Something isn't working and removed question Further information is requested labels Apr 29, 2024
@unixfox unixfox changed the title [Question] Strange error when running the 'make' command. [Bug] Strange error when running the 'make' command. - crystal 1.12 error Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants