Open mikemilla opened 11 months ago
Anybody know what's going on here?
I can confirm that I've also observed the issue, on Node 18, but not on Node 16 or 14. It presumably exists since Node 17 due to the security deprecation of RC2, see https://github.com/nodejs/node/issues/40672 for more details.
This is a node 18 issue. Thanks @mtrezza. Downgrading to node 16 works.
Would still be nice to find a working solution for node 18
To be exact, it's more a certificate cipher issue than a Node issue. The certificate needs a more secure cipher because by default Node >=17 rejects RC2.
"An 'error: unsupported' message may occur in Node.js 17 RC2 because the legacy OpenSSL provider is disabled by default. If you enable the --openssl-legacy-provider flag, it should work as expected."
Ref:- https://github.com/nodejs/node/issues/40672
How to enable flag:- node --openssl-legacy-provider index.js(Root file)
Anybody know what's going on here?
You have to enable --openssl-legacy-provider
bad cert handling try easy-apn (npm) it should fix your problem. no deps! 7.7kb unpacked.
How do I fix this? What is going on here? What am I missing?
I am using a P12 generated the same way as this tutorial: https://youtu.be/jq42brrSg28
Here is what my code looks like:
I get the following error in the console when running:
Why is this error happening?