I’m using Netlify Identity widget, and worked perfectly until I’ve asked webhook notifications.
After I’m turning on webhook notification for sign up’s and I’m trying to register an user, I’m getting the confirmation email, but I can’t confirm the account.
On the site widget:
There was an error verifying your account. Please try again or contact an administrator.
Developer console:
Failed to load resource: the server responded with a status of 422 ()
t: Failed to handle signup webhook
From the network tab:
Payload:
{token: "qgHIW9hd034x-p59qXMQBw", type: "signup"}
Response:
{"code":422,"msg":"Failed to handle signup webhook"}
Header:
"The request which passed had this cookie, the failed didn't"
nf_jwt
Why the identify and the widget handling the confirmation?
I thought this is an extra notification to the backend and the confirmation will be handled as usual.
The error is reproducable, because if I’m disable the Webhook Notification with Secret for the Sign Up events, the email confirmation is working again.
Okay my problem was my function which listened to the webhook not returned 200 and the user object.
My preconception was that the registration process and the webhook is totally paralell solutions and the webhook is triggered after the user is registered etc and the system can see the new entry.
Actually the webhook is part of the loop and if we are not returning 200 and the same data which the webhook gave to us we are causing the above error.
I thought my story ends with a found solution but I was wrong.
Yes it works with a http server but as soon as I put my backend server to https, the webhook fails again with error code 502.
{
"code": 502,
"msg": "Failed to connect to https://the url is correct I've checked just don't want to expose",
"error_id": "07515012-ebd3-4e03-a518-ace74e2b2efb"
}
If I’m turning off the https it works again. If I’m capturing the request and manually sending a post request from reqbin my backend works as expected.
I set the header values all the same which was in the captured message. So it shouldn’t be header problem. I put my backend in debug mode and it not even listing that any request arrived from Netlify.
What could cause this issue?
For the ID you provided, I don’t see anything more than what the log above shares. Can you confirm your server is not blocking Netlify?
No it wasn’t blocking.
I was able to solve it again. Seems like the Netlify’s server very sensitive and not have specific error message for SSL errors. Since it’s my first time building server and I’ve used actix, I’ve used the ssl certifucation wrong way. Seems like I have to combina the certification and the ca_bundle to one file and then read in as a chain in the program and now works. But hard to find this error cause reqbin and other forwarding methods sent the same payload and worked with them.
I think its a good feature if Netlify erroring out of not 100% sure in the certificate but a more detailed error in this case would be great so I could’ve find the cause of error sooner