-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.security.InvalidKeyException: Not an EC key: ECDH #100
Comments
Can you post the arguments that you used to invoke the CLI application? |
|
any idea ? |
@zacoben @martijndwars Any luck with this? I'm stuck too on this for quite some time. |
@zacoben @iyashsoni if I run the the following:
It outputs:
Can you provide more info so I can reproduce the issue? |
I have the same issue as OP. When I run the same code with same vapid locally, everything works (only once appeared exception mentioned in original post). When I run it on the server, this exception appears every time code tries to send notification. I think there could be issue with some incompatible overlapping dependencies, but I'll have to do some further investigation. |
@Ersmipe how do you run the application locally vs. on your server? Do you build/package your application as a fat/uber/shadow JAR? I've seen reports where people packaged their application as a fat/uber/shadow JAR, which then breaks the signature on the BouncyCastle JAR. As a consequence, the JVM won't load the BouncyCastle provider, and hence won't be able to load ECDH keys. Another possibility: Java 7 and Java 8 require different versions of BouncyCastle. If you run Java 8 locally and Java 7 on the server, but don't change the version of BouncyCastle, you may run into this problem. See this report. |
Oh, yes I am using shaded jar on server, so this will be the issue. Thank you very much for pointing me to the right direction. Java version is the same on both. |
I tried using openjdk 13 and the problem went away, but I didn't understand why it throws an exception on jdk 17 |
I'm getting this error using the CLI send-notification 👍
any idea what could cause this ? (I checked all parameters)
The text was updated successfully, but these errors were encountered: