Kratos: pq: value too long for type character varying(255)

Hi,

I’m POSTing to /self-service/browser/flows/verification/email/complete and run into some kind of database constraint. I have configured Kratos to use AWS SES, and my username and password are quite long, so the connection_uri parameter is 108 bytes long, but that’s still < 255, so what could cause this error?

Here’s part of the stack trace from the log:

kubectl logs ory-kratos-799478ff74-5xdkc -n ory --since=5m
time="2020-04-07T07:45:05Z" level=info msg="started handling request" method=POST name="public#http://127.0.0.1:4433" remote="127.0.0.1:41196" request="/self-service/browser/flows/verification/email/complete?request=9c0d9147-5f68-4201-9451-e24ca9d4ee70"
time="2020-04-07T07:45:05Z" level=debug msg="Sending out verification code." via=email
time="2020-04-07T07:45:05Z" level=debug msg="Sending out verification email." via=email
time="2020-04-07T07:45:05Z" level=warning msg="Encountered self-service verification error." details="pq: value too long for type character varying(255)\n
github.com/ory/x/sqlcon.HandleError\n\t
/go/pkg/mod/github.com/ory/[email protected]/sqlcon/error.go:47\n
github.com/ory/kratos/persistence/sql.(*Persister).AddMessage\n\t
/home/ory/persistence/sql/persister_courier.go:19\ngithub.com/ory/kratos/courier.(*Courier).QueueEmail\n\t
/home/ory/courier/courier.go:79\ngithub.com/ory/kratos/selfservice/flow/verify.(*Sender).sendCodeToKnownAddress.func1\n\t
/home/ory/selfservice/flow/verify/sender.go:81\n
github.com/ory/kratos/selfservice/flow/verify.(*Sender).run\n\t
/home/ory/selfservice/flow/verify/sender.go:99\ngithub.com/ory/kratos/selfservice/flow/verify.(*Sender).sendCodeToKnownAddress\n\t
/home/ory/selfservice/flow/verify/sender.go:80\ngithub.com/ory/kratos/selfservice/flow/verify.(*Sender).SendCode\n\t
/home/ory/selfservice/flow/verify/sender.go:63\ngithub.com/ory/kratos/selfservice/flow/verify.(*Handler).completeViaEmail\n\t
/home/ory/selfservice/flow/verify/handler.go:279\ngithub.com/ory/kratos/selfservice/flow/verify.(*Handler).complete\n\t
/home/ory/selfservice/flow/verify/handler.go:265\ngithub.com/julienschmidt/httprouter.(*Router).ServeHTTP\n\t
/go/pkg/mod/github.com/julienschmidt/[email protected]/router.go:334\ngithub.com/justinas/nosurf.(*CSRFHandler).handleSuccess\n\t
/go/pkg/mod/github.com/justinas/[email protected]/handler.go:187\n

Hi, this is resolved on master but I think not yet released…