Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Circle Ci failure with phoenix and elixir
version: 2
jobs:
build:
working_directory: ~/digitalcakes
docker:
- image: trenpixster/elixir:1.4.0
- image: postgres:9.5.6
environment:
POSTGRES_USER: ubuntu
steps:
- checkout
- run: mix deps.get
- run: mix ecto.create
test:
override:
- mix coveralls.circle
mix ecto.create
Shell: /bin/bash -eo pipefail
==> connection
Compiling 1 file (.ex)
Generated connection app
==> fs (compile)
Compiled src/fs_app.erl
Compiled src/fs_event_bridge.erl
Compiled src/fs.erl
Compiled src/fs_sup.erl
Compiled src/fs_server.erl
Compiled src/sys/inotifywait_win32.erl
Compiled src/sys/fsevents.erl
Compiled src/sys/inotifywait.erl
==> gettext
Compiling 1 file (.yrl)
Compiling 1 file (.erl)
Compiling 20 files (.ex)
Generated gettext app
===> Compiling ranch
==> poolboy (compile)
Compiled src/poolboy_worker.erl
Compiled src/poolboy_sup.erl
Compiled src/poolboy.erl
==> decimal
Compiling 1 file (.ex)
Generated decimal app
==> poison
Compiling 4 files (.ex)
warning: HashDict.size/1 is deprecated, use maps and the Map module instead
lib/poison/encoder.ex:283
Generated poison app
==> earmark
Compiling 3 files (.erl)
Compiling 25 files (.ex)
Generated earmark app
==> ex_doc
Compiling 15 files (.ex)
warning: redefining module Mix.Tasks.Docs (current version defined in memory)
lib/mix/tasks/docs.ex:1
Generated ex_doc app
==> db_connection
Compiling 23 files (.ex)
Generated db_connection app
==> phoenix_pubsub
Compiling 12 files (.ex)
Generated phoenix_pubsub app
===> Compiling cowlib
src/cow_multipart.erl:392: Warning: crypto:rand_bytes/1 is deprecated and will be removed in a future release; use crypto:strong_rand_bytes/1
===> Compiling cowboy
==> mime
Compiling 1 file (.ex)
Generated mime app
==> plug
Compiling 44 files (.ex)
Generated plug app
==> phoenix_html
Compiling 8 files (.ex)
Generated phoenix_html app
==> phoenix
Compiling 60 files (.ex)
Generated phoenix app
==> phoenix_live_reload
Compiling 3 files (.ex)
Generated phoenix_live_reload app
==> postgrex
Compiling 62 files (.ex)
Generated postgrex app
==> ecto
Compiling 69 files (.ex)
Compiling lib/ecto/adapters/postgres/connection.ex (it's taking more than 10s)
Generated ecto app
==> ex_machina
Compiling 5 files (.ex)
Generated ex_machina app
==> phoenix_ecto
Compiling 4 files (.ex)
Generated phoenix_ecto app
==> digitalcakes
Compiling 16 files (.ex)
Generated digitalcakes app
20:10:56.540 [error] GenServer #PID<0.3775.0> terminating
** (KeyError) key :username not found in: [types: Postgrex.DefaultTypes, backoff_type: :stop, pool: DBConnection.Connection, database: "template1", otp_app: :digitalcakes, repo: Digitalcakes.Repo, adapter: Ecto.Adapters.Postgres, hostname: "localhost", pool_size: 10]
(elixir) lib/keyword.ex:343: Keyword.fetch!/2
(postgrex) lib/postgrex/protocol.ex:548: Postgrex.Protocol.startup/2
(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
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Last message: nil
State: Postgrex.Protocol
** (Mix) The database for Digitalcakes.Repo couldn't be created: an exception was raised:
** (KeyError) key :username not found in: [types: Postgrex.DefaultTypes, backoff_type: :stop, pool: DBConnection.Connection, database: "template1", otp_app: :digitalcakes, repo: Digitalcakes.Repo, adapter: Ecto.Adapters.Postgres, hostname: "localhost", pool_size: 10]
(elixir) lib/keyword.ex:343: Keyword.fetch!/2
(postgrex) lib/postgrex/protocol.ex:548: Postgrex.Protocol.startup/2
(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
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Exited with code 1
@fskinner

This comment has been minimized.

Copy link

commented Jan 3, 2018

im having the same issue... have you found a solution yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.