RoepStoep / lidraughts

lidraughts.org: the forever free, adless and open source draughts server
https://lidraughts.org
GNU Affero General Public License v3.0
105 stars 12 forks source link

Registering in a local development environment #6

Closed lw1990 closed 6 years ago

lw1990 commented 6 years ago

If I remember correctly, I was able to register/sign in in a local lichess development environment. Following the steps at the newly created Onboarding Wiki page for lidraughts (https://github.com/RoepStoep/lidraughts/wiki/Onboarding-Guide-(Windows)) I'm able to play games on a local development environment, but trying to register sends me to l.org/signup with a blank white page that just says "scheme" even though I have a MongoDB for lidraughts set up and running.

Does registering work for you @RoepStoep in your local development environment, or is a web server required?

In the command prompt where I ran .\bin\dev.bat, there is more error information:

[info] auth - test Signup fail: FormError(email,List(error.email_acceptable),WrappedArray()) [info] auth - test fp: Some(FingerPrint(86c728f9424085c425fca978648d0d00)) mustConfirm: YesBecauseIpSusp req:POST /signup [error] p.c.s.n.PlayDefaultUpstreamHandler - Cannot invoke the action java.lang.NullPointerException: scheme at com.ning.http.client.uri.Uri.(Uri.java:56) ~[async-http-client-1.9.40.jar:na] at com.ning.http.client.uri.Uri.create(Uri.java:32) ~[async-http-client-1.9.40.jar:na] at com.ning.http.client.uri.Uri.create(Uri.java:25) ~[async-http-client-1.9.40.jar:na] at com.ning.http.client.RequestBuilderBase.setUrl(RequestBuilderBase.java:307) ~[async-http-client-1.9.40.jar:na] at com.ning.http.client.RequestBuilder.setUrl(RequestBuilder.java:165) ~[async-http-client-1.9.40.jar:na] at play.api.libs.ws.ning.NingWSRequest.buildRequest(NingWS.scala:218) ~[play-ws_2.11-2.4.11.jar:2.4.11] at play.api.libs.ws.ning.NingWSRequest.execute(NingWS.scala:128) ~[play-ws_2.11-2.4.11.jar:2.4.11] at play.api.libs.ws.WSRequest$class.post(WS.scala:455) ~[play-ws_2.11-2.4.11.jar:2.4.11] at play.api.libs.ws.ning.NingWSRequest.post(NingWS.scala:81) ~[play-ws_2.11-2.4.11.jar:2.4.11] at lidraughts.security.Mailgun.send(Mailgun.scala:27) ~[classes/:na] [warn] http - 500 POST l.org/signup 127.0.0.1 origin:http://l.org referer:http://l.org/signup ua:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36 java.lang.NullPointerException: scheme at com.ning.http.client.uri.Uri.(Uri.java:56) ~[async-http-client-1.9.40.jar:na] at com.ning.http.client.uri.Uri.create(Uri.java:32) ~[async-http-client-1.9.40.jar:na] at com.ning.http.client.uri.Uri.create(Uri.java:25) ~[async-http-client-1.9.40.jar:na] at com.ning.http.client.RequestBuilderBase.setUrl(RequestBuilderBase.java:307) ~[async-http-client-1.9.40.jar:na] at com.ning.http.client.RequestBuilder.setUrl(RequestBuilder.java:165) ~[async-http-client-1.9.40.jar:na] at play.api.libs.ws.ning.NingWSRequest.buildRequest(NingWS.scala:218) ~[play-ws_2.11-2.4.11.jar:2.4.11] at play.api.libs.ws.ning.NingWSRequest.execute(NingWS.scala:128) ~[play-ws_2.11-2.4.11.jar:2.4.11] at play.api.libs.ws.WSRequest$class.post(WS.scala:455) ~[play-ws_2.11-2.4.11.jar:2.4.11] at play.api.libs.ws.ning.NingWSRequest.post(NingWS.scala:81) ~[play-ws_2.11-2.4.11.jar:2.4.11] at lidraughts.security.Mailgun.send(Mailgun.scala:27) ~[classes/:na]

lw1990 commented 6 years ago

More information: it turns out the register is sucessful, even though it definitely redirects to an error page and throws an error as shown above, I can then subsequently sign in with the account. Weird.

RoepStoep commented 6 years ago

The exception originates from lidraughts.security.Mailgun.send. It looks like the server wants to send you a confirmation e-mail, while there is no mailgun api setup in the default base.conf

lw1990 commented 6 years ago

in base.conf, changing

mailgun { api { url = "???" key = "???" } sender = "lidraughts.org noreply@lidraughts.org" reply_to = "lidraughts.org contact@lidraughts.org" }

to

mailgun { api { url = "" key = "" } sender = "lidraughts.org noreply@lidraughts.org" reply_to = "lidraughts.org contact@lidraughts.org" }

Has fixed the registration problem, I never would have known to try removing those three ??? from there without your insight, thank you so much.