sasa1977 / site_encrypt

Integrated certification via Let's encrypt for Elixir-powered sites
MIT License
462 stars 33 forks source link

Parent v0.11 breaks site_encrypt #21

Closed Hermanverschooten closed 3 years ago

Hermanverschooten commented 3 years ago

I just installed site_encrypt in a Phoenix 1.5 app, and it fails to boot with

** (Mix) Could not start application crafts_things: CraftsThings.Application.start(:normal, []) returned an error: shutdown: failed to start child: SiteEncrypt.Phoenix
    ** (EXIT) an exception was raised:
        ** (UndefinedFunctionError) function Parent.GenServer.start_child/1 is undefined or private
            (parent 0.11.0) Parent.GenServer.start_child(%{id: CraftsThingsWeb.Endpoint, start: {CraftsThingsWeb.Endpoint, :start_link, [[]]}, type: :supervisor})
            (site_encrypt 0.3.0) lib/site_encrypt/phoenix.ex:129: SiteEncrypt.Phoenix.start_child!/1
            (site_encrypt 0.3.0) lib/site_encrypt/phoenix.ex:115: SiteEncrypt.Phoenix.start_site/2
            (site_encrypt 0.3.0) lib/site_encrypt/phoenix.ex:85: SiteEncrypt.Phoenix.init/1
            (stdlib 3.13) gen_server.erl:417: :gen_server.init_it/2
            (stdlib 3.13) gen_server.erl:385: :gen_server.init_it/6
            (stdlib 3.13) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
cw789 commented 3 years ago

You could add {:parent, "== 0.10.0", override: true}, to your mix.exs - deps as a quick workaround. I guess Saša has already done some fixing within the branch upgrade-parent in this repo.

sasa1977 commented 3 years ago

Thanks for reporting it! I pushed 0.4.0 which adapts the code to the new parent.

sasa1977 commented 3 years ago

I also pushed 0.3.1 which fixes to Parent 0.10.0