forcecraft/aion

Exceptions server side when hitting /api/ranking

Closed this issue · 0 comments

Type

Bug

Current behaviour
I've just got this error while running the platform locally and keep getting it when loading profile data. @jtkpiotr is it maybe connected to #195?

Request: GET /api/ranking
** (exit) an exception was raised:
    ** (Phoenix.Template.UndefinedError) Could not render "error.json" for Aion.RankingView, please define a matching clause for render/2 or define a template at "web/templates/ranking". No templates were compiled for this module.
Assigns:

%{conn: %Plug.Conn{adapter: {Plug.Adapters.Cowboy.Conn, :...}, assigns: %{guardian_failure: {:error, :no_session}, layout: false, message: "Authentication required"}, before_send: [#Function<4.21723367/1 in Phoenix.Controller.fetch_flash/2>, #Function<0.131660147/1 in Plug.Session.before_send/2>, #Function<1.16652719/1 in Plug.Logger.call/2>, #Function<0.46704327/1 in Phoenix.LiveReloader.before_send_inject_reloader/2>], body_params: %{}, cookies: %{"_xsrf" => "2|9b950cfc|eaaea1f51bed3439759e3b090361d674|1511471256", "username-localhost-8888" => "\"2|1:0|10:1512307461|23:username-localhost-8888|44:OTU2YmRjZTNlZTQxNGQ3NDk3ODAwNTI2YzZhNmMxOGI=|c3fff88b9de824bd4d856c3181ba51b8c9ccd8eb176c49944b4394c0376dea2f\""}, halted: true, host: "localhost", method: "GET", owner: #PID<0.2921.0>, params: %{}, path_info: ["api", "ranking"], path_params: %{}, peer: {{127, 0, 0, 1}, 40868}, port: 4000, private: %{Aion.Router => {[], %{}}, :guardian_default_resource => nil, :phoenix_action => :ranking, :phoenix_controller => Aion.RankingController, :phoenix_endpoint => Aion.Endpoint, :phoenix_flash => %{}, :phoenix_format => "json", :phoenix_layout => {Aion.LayoutView, :app}, :phoenix_pipelines => [:api, :api_auth], :phoenix_route => #Function<10.4218642/1 in Aion.Router.match_route/4>, :phoenix_router => Aion.Router, :phoenix_template => "error.json", :phoenix_view => Aion.RankingView, :plug_session => %{}, :plug_session_fetch => :done}, query_params: %{}, query_string: "", remote_ip: {127, 0, 0, 1}, req_cookies: %{"_xsrf" => "2|9b950cfc|eaaea1f51bed3439759e3b090361d674|1511471256", "username-localhost-8888" => "\"2|1:0|10:1512307461|23:username-localhost-8888|44:OTU2YmRjZTNlZTQxNGQ3NDk3ODAwNTI2YzZhNmMxOGI=|c3fff88b9de824bd4d856c3181ba51b8c9ccd8eb176c49944b4394c0376dea2f\""}, req_headers: [{"host", "localhost:4000"}, {"user-agent", "Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"}, {"accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"}, {"accept-language", "en-US,en;q=0.5"}, {"accept-encoding", "gzip, deflate"}, {"cookie", "_xsrf=2|9b950cfc|eaaea1f51bed3439759e3b090361d674|1511471256; username-localhost-8888=\"2|1:0|10:1512307461|23:username-localhost-8888|44:OTU2YmRjZTNlZTQxNGQ3NDk3ODAwNTI2YzZhNmMxOGI=|c3fff88b9de824bd4d856c3181ba51b8c9ccd8eb176c49944b4394c0376dea2f\""}, {"connection", "keep-alive"}, {"upgrade-insecure-requests", "1"}], request_path: "/api/ranking", resp_body: nil, resp_cookies: %{}, resp_headers: [{"cache-control", "max-age=0, private, must-revalidate"}, {"x-request-id", "fjc24c1vu8hk56jrjlbt7o9jigtf779q"}], scheme: :http, script_name: [], secret_key_base: "qILNWNsZ5dyZijpvocG45VG5ElYCLYSfSOAWVEiz+cloUiX177Dla1kbz3ZGrfbX", state: :unset, status: 401}, guardian_failure: {:error, :no_session}, message: "Authentication required", template_not_found: Aion.RankingView, view_module: Aion.RankingView, view_template: "error.json"}

        (phoenix) lib/phoenix/template.ex:364: Phoenix.Template.raise_template_not_found/3
        (phoenix) lib/phoenix/view.ex:335: Phoenix.View.render_to_iodata/3
        (phoenix) lib/phoenix/controller.ex:642: Phoenix.Controller.do_render/4
        (aion) web/controllers/ranking_controller.ex:1: Aion.RankingController.phoenix_controller_pipeline/2
        (aion) lib/aion/endpoint.ex:1: Aion.Endpoint.instrument/4
        (aion) lib/phoenix/router.ex:261: Aion.Router.dispatch/2
        (aion) web/router.ex:1: Aion.Router.do_call/2
        (aion) lib/aion/endpoint.ex:1: Aion.Endpoint.phoenix_pipeline/1
        (aion) lib/plug/debugger.ex:123: Aion.Endpoint."call (overridable 3)"/2
        (aion) lib/aion/endpoint.ex:1: Aion.Endpoint.call/2
        (plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4
        (cowboy) /home/maciej/Workspace/aion/aion/deps/cowboy/src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4