Hey guys, I'm developing a software and I have a p...
# support-questions-legacy
d
Hey guys, I'm developing a software and I have a problem that I can't solve right now. Email verification works, but password reset does not work. When I call up the URL "/api/auth/user/password/reset/token" with the correct email via Insomnia, for example, I get an http 500 with the message "should never come here". I don't get anything in the logs that would help. Does anyone have any ideas where I should look?
r
hey @dbone1154 do you have a global error handler in your app which is sending a 500 back to the client?
d
Yes I have a global error handler, but it sends a 404 and I get a http 200 with an ok if I enter a wrong email.
r
so we do not send back a 500 error from our sdk. We already throw an error.
Which means you must be catching the error and sending a 500
so when you do that, you should log the error out so you can see the full error stack
and share that with me
d
Ok now i get a stacktrace
r
which versinon of our sdk are you using?
d
Fail I made a mistike
r
?
d
Supertokens sdk version is v0.17.3
r
can you enable backend debug logs for supertokens and show the output of that?
d
ok
r
alos, is this happening for the dev env? Or prod env? Are you using our managed service or self hosted?
d
dev enviroment & selfhosted
r
right. Can you enable backend debug logs and show the output?
d
its building
[GIN] 2024/02/15 - 17:16:35 | 404 | 31.651663ms | 10.244.0.202 | POST "/api/auth/user/password/reset/token" github.com/gin-gonic/gin.(*Context).Next /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 github.com/Innovaitec0/erp-backend/internal/app/routes.(*Server).registerMiddlewares.Ginzap.GinzapWithConfig.func4 /go/pkg/mod/github.com/gin-contrib/zap@v0.2.0/zap.go:59 github.com/gin-gonic/gin.(*Context).Next /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/recovery.go:102 github.com/gin-gonic/gin.(*Context).Next /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 github.com/gin-gonic/gin.LoggerWithConfig.func1 /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/logger.go:240 github.com/gin-gonic/gin.(*Context).Next /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 github.com/gin-gonic/gin.serveError /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:656 github.com/gin-gonic/gin.(*Engine).handleHTTPRequest /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:649 github.com/gin-gonic/gin.(*Engine).ServeHTTP /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:576 net/http.serverHandler.ServeHTTP /usr/local/go/src/net/http/server.go:3137 net/http.(*conn).serve /usr/local/go/src/net/http/server.go:2039 2024-02-15T17:16:35.030Z INFO zap@v0.2.0/zap.go:91 /api/auth/user/password/reset/token {"status": 404, "method": "POST", "path": "/api/auth/user/password/reset/token", "query": "", "ip": "10.244.0.202", "user-agent": "HTTPie", "latency": "31.607545ms", "time": "2024-02-15T17:16:35Z"}
r
thats not our debug logs
can you enable our debug logs? Search our docs for debug logs
d
there is mor
i make a txt
I just updated to 0.17.4 version
r
whats your emaildelivery config in emailpassword.init?
i mean can you paste your backend supertokens.init here?
d
email verification does work for me
r
right. So you are using emailverification.MakeSMTPService for emailpassword. Thats wrong. You should use emailpassword.MakeSMTPService instead in the emailpassword.init
d
Ah thank you ! I will try it
This time I get "tls: failed to verify certificate: x509: certificate signed by unknown authority". It seems that the ssl certificate from the smtp server has expired ... I'll fix it later. Thank you!