** (RuntimeError) could not lookup Ecto repo App.Repo because it was not started or it does not exist

Hey all, I’m new to Elixir and am trying to run tests with mix.test, but most of the tests are failing with the error ** (RuntimeError) could not lookup Ecto repo APP.Repo because it was not started or it does not exist.

I have tried suggestions from other questions online, but haven’t been able to solve this issue. I tried running env MIX_ENV=test mix ecto.reset and mix deps|grep ecto, but neither have solved the issue. What can I do to get this error to go away?

Thanks!!

You need to provide some code, like the config files with sensitive info redacted and the full stack trace error, otherwise people will not be able to help you :slight_smile:

thanks! just updated my question with the config file

What happened when you ran this command?

  • if it completed successfully, that would cast suspicion on the test setup (versus a project-level issue)

  • if it fails with the same error, that means there’s a larger issue


Additional question: is the APP.Repo in that error message a redaction of the app name, or the actual name from the message?

1 Like