trenpixster / addict

User management lib for Phoenix Framework
MIT License
645 stars 99 forks source link

Update Ecto and Fix Response Being Sent Twice #64

Closed mchavezi closed 8 years ago

mchavezi commented 9 years ago

Issue: When running $ cd addict/installer/addict/example_app/ $ mix deps.get This error occurred:

Running dependency resolution Looking up alternatives for conflicting requirements on ecto Activated version: 1.0.6 From phoenix_ecto v0.9.0: ~> 0.15 or ~> 0.14.3 From /Applications/MAMP/htdocs/phoenixes/addict/installer/addict/mix.exs: ~> 1.0

\ (Mix) Hex dependency resolution failed, relax the version requirements or unlock dependencies

Fix: Ecto version bump in example-app/mix.exs

Issue: When submitting a form, this error was occurring: [error] #PID<0.2436.0> running ExampleApp.Endpoint terminated Server: localhost:4000 (http) Request: POST /register * (exit) an exception was raised: * (Plug.Conn.AlreadySentError) the response was already sent (plug) lib/plug/conn.ex:307: Plug.Conn.put_status/2 lib/addict/interactors/session_interactor.ex:6: Addict.SessionInteractor.register/2 lib/addict/controller.ex:95: Addict.Controller.register/2 lib/addict/controller.ex:89: Addict.Controller.phoenix_controller_pipeline/2 (example_app) lib/phoenix/router.ex:265: ExampleApp.Router.dispatch/2 (example_app) web/router.ex:1: ExampleApp.Router.do_call/2 (example_app) lib/example_app/endpoint.ex:1: ExampleApp.Endpoint.phoenix_pipeline/1 (example_app) lib/plug/debugger.ex:90: ExampleApp.Endpoint."call (overridable 3)"/2

Fix: See http://blog.gazler.com/blog/2015/07/18/subdomains-with-phoenix/ Added halt.

ZJvandeWeg commented 8 years ago

:+1:

trenpixster commented 8 years ago

Thanks! :+1:

mchavezi commented 8 years ago

Thanks for accepting my pull request:)