peburrows / goth

Elixir package for Oauth authentication via Google Cloud APIs
http://hexdocs.pm/goth
MIT License
284 stars 108 forks source link

unknown registry Goth.Registry #144

Closed alexanderttalvarez closed 2 years ago

alexanderttalvarez commented 2 years ago

Hello!

After upgrading to Goth 1.3, and following the instructions here, we are receiving an error unknown registry Goth.Registry. Looks like the registry is never started. Is there anything missing in the docs?

Captura de Pantalla 2022-08-06 a las 8 59 30

Thank you!

wojtekmach commented 2 years ago

This is very odd, it seems the goth app wasn't properly started. Do you have by any chance either:

def deps do
  [
    # ...
    {:goth, ..., runtime: false}
    # ...
  ]
end

or

def application do
  [
    applications: [...] # the list does _not_ contain goth
  ]
end

?

alexanderttalvarez commented 2 years ago

Oh I see! We have the runtime: false one. We are only using Goth inside a Script, we don't want to use it during runtime. How can we keep using the runtime: false flag?

Thank you!

wojtekmach commented 2 years ago

Do:

{:ok, _} = 
  Application.ensure_all_started(:goth)

at the beginning of the script!