mirego / accent

The first developer-oriented translation tool. True asynchronous flow between translators and your team.
https://www.accent.reviews
BSD 3-Clause "New" or "Revised" License
1.3k stars 97 forks source link

Runtime error in newly cloned demo #353

Open Rio517 opened 1 year ago

Rio517 commented 1 year ago

I was trying to check out the project, so ran

git clone git@github.com:mirego/accent.git
docker-compose up

The app starts, but the login doesn't render and the following runtme error is triggered.

Accent

 Server: localhost:4000 (http)
accent         | Request: GET /auth/sign-in
accent         | ** (exit) an exception was raised:
accent         |     ** (UndefinedFunctionError) function Accent.AuthController.request/2 is undefined or private
accent         |         (accent 1.16.2) Accent.AuthController.request(%Plug.Conn{adapter: {Plug.Cowboy.Conn, :...}, assigns: %{}, body_params: %{}, cookies: %Plug.Conn.Unfetched{aspect: :cookies}, halted: false, host: "localhost", method: "GET", owner: #PID<0.3796.0>, params: %{"provider" => "sign-in"}, path_info: ["auth", "sign-in"], path_params: %{"provider" => "sign-in"}, port: 4000, private: %{Accent.Router => [], :before_send => [#Function<1.76226013/1 in Plug.Logger.call/2>], :phoenix_action => :request, :phoenix_controller => Accent.AuthController, :phoenix_endpoint => Accent.Endpoint, :phoenix_format => "html", :phoenix_layout => %{_: {Accent.LayoutView, :app}}, :phoenix_router => Accent.Router, :phoenix_view => %{_: Accent.AuthView}}, query_params: %{}, query_string: "", remote_ip: {172, 20, 0, 1}, req_cookies: %Plug.Conn.Unfetched{aspect: :cookies}, req_headers: [{"accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"}, {"accept-encoding", "gzip, deflate, br"}, {"accept-language", "en-US,en;q=0.9"}, {"connection", "keep-alive"}, {"cookie", "__profilin=p%3Dt; _newco_session=QtvaWKguRsVHBONkSV4x1%2Bj%2BbVjdf6c9XRFD8Pcp9imXhbb1F16gBlbUzQEhe9eQ1WlWJ5%2BHsaOXhAYX%2BmzklcxjscmHdn4ZQqJZCTkAmowPSbGQ2GLn0xBY6MKkyoG3XBmU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5tAAAAILnYApFx9c_PB5iT1psNBDNtQEWhcXp7C628BIENHtwe.9NY2UrFD2rTkgdC598Laj6WFxMpicN_FXlKviToBkRg; locale=en; _demo_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYT210LTRmZ0dXZElVeXprcExHLTlCTU53.TjBrnXizmkkOt8iBlO-1PmRuktGjKPKkd6PRNAiynUQ; _petal_pro_key=SFMyNTY.g3QAAAAEbQAAAAtfY3NyZl90b2tlbm0AAAAYM1hobVhpbHEzWFhZMEJ3ZkNic05TdVhxbQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6SG1aSlZrTXhyb3RvN3d1YlJLZm8yUHdyajlJajZaWnFHSTJ0N1FLSUtoVT1tAAAABmxvY2FsZW0AAAACZW5tAAAACnVzZXJfdG9rZW5tAAAAIB5mSVZDMa6LaO8Lm0Sn6Nj8K4_SI-mWahiNre0CiCoV.11FHFww47MuO1UIxOEO9ZUNwVkl6xAmVHk2D7hCMJSQ"}, {"host", "localhost:4000"}, {"sec-ch-ua", "\"Chromium\";v=\"112\", \"Google Chrome\";v=\"112\", \"Not:A-Brand\";v=\"99\""}, {"sec-ch-ua-mobile", "?0"}, {"sec-ch-ua-platform", "\"Linux\""}, {"sec-fetch-dest", "document"}, {"sec-fetch-mode", "navigate"}, {"sec-fetch-site", "none"}, {"sec-fetch-user", "?1"}, {"upgrade-insecure-requests", "1"}, {"user-agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"}], request_path: "/auth/sign-in", resp_body: nil, resp_cookies: %{}, resp_headers: [{"cache-control", "max-age=0, private, must-revalidate"}, {"x-request-id", "F12e_9-6so7MpCcAAADB"}, {"referrer-policy", "strict-origin-when-cross-origin"}, {"x-content-type-options", "nosniff"}, {"x-download-options", "noopen"}, {"x-frame-options", ""}, {"x-permitted-cross-domain-policies", "none"}], scheme: :http, script_name: [], secret_key_base: nil, state: :unset, status: nil}, %{"provider" => "sign-in"})
accent         |         (accent 1.16.2) lib/web/controllers/auth_controller.ex:1: Accent.AuthController.action/2
accent         |         (accent 1.16.2) lib/web/controllers/auth_controller.ex:1: Accent.AuthController.phoenix_controller_pipeline/2
accent         |         (phoenix 1.7.2) lib/phoenix/router.ex:430: Phoenix.Router.__call__/5
accent         |         (accent 1.16.2) lib/web/router.ex:1: Accent.Router.call/2
accent         |         (accent 1.16.2) lib/accent/endpoint.ex:1: Accent.Endpoint.plug_builder_call/2
accent         |         (accent 1.16.2) lib/accent/endpoint.ex:1: Accent.Endpoint.call/2
accent         |         (plug_cowboy 2.6.1) lib/plug/cowboy/handler.ex:11: Plug.Cowboy.Handler.init/2

Looks like a great project!

simonprev commented 1 year ago

That’s weird, there are no mentions of sign-in anywhere in the codebase 🤔 The part after /auth/ should be the provider (like google, facebook, github, etc). I think we might need to add "DUMMY_LOGIN_ENABLED=1" in the env for the email login to appear.

cxnky commented 1 year ago

getting this on a brand new install also.