Error Sending Web Request to Discord Webhook


#1

1) Give a description of the problem
I am sending a web request to a Discord Webhook and getting the following error message:

Error executing external web request: javax.net.ssl.SSLException: java.security.ProviderException: java.security.InvalidKeyException: EC parameters error

2) What is the expected behaviour?
I am currently just testing to see if the webhook will work at all. So right now I"m just trying to get something to be posted to the discord channel.

3) What is happening/not happening?
Getting this error message:

Error executing external web request: javax.net.ssl.SSLException: java.security.ProviderException: java.security.InvalidKeyException: EC parameters error

**4) Post a Green Snapshot of the piston!

5) Attach logs after turning logging level to Full
|+1ms|╔Received event [Kitchen].switch = on with a delay of 82ms|
|—|---|
|+97ms|║RunTime Analysis CS > 16ms > PS > 71ms > PE > 10ms > CE|
|+100ms|║Runtime (37831 bytes) successfully initialized in 71ms (v0.3.110.20191009) (97ms)|
|+101ms|║╔Execution stage started|
|+108ms|║║Comparison (enum) on changes_to (string) on = true (0ms)|
|+110ms|║║Cancelling condition #2’s schedules…|
|+111ms|║║Condition #2 evaluated true (6ms)|
|+112ms|║║Cancelling condition #1’s schedules…|
|+113ms|║║Condition group #1 evaluated true (state changed) (8ms)|
|+115ms|║║Cancelling statement #3’s schedules…|
|+129ms|║║Sending external web request to: discordapp.com/api/webhooks/REDACTED|
|+146ms|║║Error executing external web request: javax.net.ssl.SSLException: java.security.ProviderException: java.security.InvalidKeyException: EC parameters error|
|+147ms|║║Executed virtual command httpRequest (25ms)|
|+150ms|║╚Execution stage complete. (50ms)|
|+151ms|╚Event processed successfully (151ms)|


#2

Does your “real” link have the http:// in it? It needs to in order to work correctly. If that doesn’t work, try curl from command line or terminal to see if that works.
curl -X POST http://your.url.here

That will tell you if the url is bad of if you’re not entering it right.


#3

The real link is an https:// link. I tried with http:// and it gave this error:

|+139ms|║║Error executing external web request: java.lang.IllegalArgumentException: Response does not have a content-type header|

Tested with curl using https:// and it works. However when I try with http it doesn’t work at all. No error message just the message does not come through to my discord channel.


#4

Yes, but your link in your log doesn’t show the https://, so I was just making sure that you had it in the link in your piston.

Is this a self-signed certificate? I don’t believe that is going to work.


#5

I don’t see any problems with the SSL certificate for the discordapp.com api. It could be that the ST platform does not trust the root certificate but I want to dig a bit deeper before jumping to that conclusion. When you test the normal webhook URL, is there any sort of redirect to a different web site?

Normally we see issues like this when the certificate is expired or being used with the wrong domain. I can’t see for sure with the redacted link but it doesn’t appear that discord is misconfigured here.


#6

I have been using external web requests for a while from webCoRE and never had this problem before. So it’s gotta either be the HTTPS or Discourse that’s doing it.