I’ve been using webhooks successfully without any issues for the past few days. Now when I try to publish to my webhook, I get a hook error after a hook sent (I have never seen the hook sent before in the output from the particle CLI).
Of course after 10 failed attempts, I have to delete the webhook and recreate it or else wait a minute to try again.
When I check the host that the webhook should be accessing, I see no attempts to access it from particle. I can curl the URL that the webhook should be accessing without issue. I’m using a self-signed cert for SSL.
It should be noted that I’m using a basic authentication protected URL. I’m also using the “auth” webhook option to encode the username and password.
Is something going on with the cloud at the moment?
@Dave, it looks like you’re the guy to ping about this since I’ve seen your name in other parts of the communities. Can you confirm if anything changed Sunday evening with regards to how your webhook client accesses hosts that use self-signed certificates for SSL? I’m more and more suspicious that’s what’s happening here. Thanks in advance!
It looks like I was wrong about the self-signed cert. I just bought a signed cert and I’m still having the same issues. I’ve also turned off authentication. Now I’m at a complete loss unless you’re blocking access to the host that the webhook is trying to access. My webhook is now dead simple and results in the same behavior as I posted originally.
Replied in a PM, but for anyone following along, it looks like this was a case of not having any devices claimed to the account. So claiming at least one device should fix it.
Hmm. @Dave, I do have two devices claimed with this particular account. At the moment, I’m testing purely from the particle CLI. There seems to be a problem with the specific URL that I forwarded along to you.
I’ve also reached out to particle support on this. They can reproduce the behavior to my specific URL. For anyone following along, I will update the post with whatever they manage to find. I’m curious if anyone else is experiencing the issue.
@Dave suggested in a PM that I add rejectUnauthorized=true in the webhook. I added it and everything started working again. Thanks, @Dave!
A couple of things that the particle team might want to consider:
- Perhaps you should update the webhook docs with this flag. I didn’t know that it existed and it would helped tremendously. Thanks for adding it here!
- Now that I am not using a self-signed cert, you might want to check the webhook server to ensure that you trust the root CA I’m using. I’ll send you the cert in a PM.