dwyl / learn-heroku

:checkered_flag: Learn how to deploy your web application to Heroku from scratch step-by-step in 7 minutes!
153 stars 395 forks source link

(postgrex) lib/postgrex/utils.ex:67: anonymous fn/1 in Postgrex.Utils.parse_version/1 #21

Closed nelsonic closed 6 years ago

nelsonic commented 6 years ago

While attempting to connect to Heroku PostgreSQL we got the following error:

11:27:37.439 [error] GenServer #PID<0.205.0> terminating
** (ArgumentError) argument error
    (postgrex) lib/postgrex/utils.ex:67: anonymous fn/1 in Postgrex.Utils.parse_version/1
    (elixir) lib/enum.ex:1294: Enum."-map/2-lists^map/1-0-"/2
    (elixir) lib/enum.ex:1294: Enum."-map/2-lists^map/1-0-"/2
    (postgrex) lib/postgrex/utils.ex:67: Postgrex.Utils.parse_version/1
    (postgrex) lib/postgrex/protocol.ex:641: Postgrex.Protocol.bootstrap_send/6
    (postgrex) lib/postgrex/protocol.ex:475: Postgrex.Protocol.handshake/2
    (db_connection) lib/db_connection/connection.ex:134: DBConnection.Connection.connect/2
    (connection) lib/connection.ex:622: Connection.enter_connect/5
Last message: nil
** (exit) exited in: :gen_server.call(#PID<0.205.0>, {:checkout, #Reference<0.963189577.137101314.27724>, true, :infinity}, 5000)
    ** (EXIT) an exception was raised:
        ** (ArgumentError) argument error
            (postgrex) lib/postgrex/utils.ex:67: anonymous fn/1 in Postgrex.Utils.parse_version/1
            (elixir) lib/enum.ex:1294: Enum."-map/2-lists^map/1-0-"/2
            (elixir) lib/enum.ex:1294: Enum."-map/2-lists^map/1-0-"/2
            (postgrex) lib/postgrex/utils.ex:67: Postgrex.Utils.parse_version/1
            (postgrex) lib/postgrex/protocol.ex:641: Postgrex.Protocol.bootstrap_send/6
            (postgrex) lib/postgrex/protocol.ex:475: Postgrex.Protocol.handshake/2
            (db_connection) lib/db_connection/connection.ex:134: DBConnection.Connection.connect/2
            (connection) lib/connection.ex:622: Connection.enter_connect/5
    (db_connection) lib/db_connection/poolboy.ex:112: DBConnection.Poolboy.checkout/3
    (db_connection) lib/db_connection.ex:920: DBConnection.checkout/2
    (db_connection) lib/db_connection.ex:742: DBConnection.run/3
    (db_connection) lib/db_connection.ex:1133: DBConnection.run_meter/3
    (db_connection) lib/db_connection.ex:584: DBConnection.prepare_execute/4
    (ecto) lib/ecto/adapters/postgres/connection.ex:86: Ecto.Adapters.Postgres.Connection.execute/4
    (ecto) lib/ecto/adapters/sql.ex:256: Ecto.Adapters.SQL.sql_call/6
    (ecto) lib/ecto/adapters/sql.ex:198: Ecto.Adapters.SQL.query!/5

Found: https://github.com/elixir-ecto/postgrex/issues/370#issuecomment-365861721