Skip to content
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

Unexpected error occurred #5

Closed
brainz80 opened this issue Dec 7, 2021 · 9 comments
Closed

Unexpected error occurred #5

brainz80 opened this issue Dec 7, 2021 · 9 comments
Assignees

Comments

@brainz80
Copy link

brainz80 commented Dec 7, 2021

I keep getting Unexpected error occurred when trying to install e.g. minify-css-string

@brainz80
Copy link
Author

Decided to dig around the source abit, and went built this locally. The problem seems to be a expired certificate.

@brainz80
Copy link
Author

Made a pull-request #6

@MartinKolarik
Copy link
Member

Thanks for checking. An invalid certificate is not something to ignore. What certificate are you getting, exactly?

@brainz80
Copy link
Author

Looks like it's the one delivered by https://data.jsdelivr.com/

Here's the error:

code:'CERT_HAS_EXPIRED'
gotOptions:{path: '/v1/package/npm/lodash@4.17.21/flat', protocol: 'https:', hostname: 'data.jsdelivr.com', hash: '', search: '', …}
host:undefined
hostname:'data.jsdelivr.com'
method:'GET'
name:'RequestError'
path:'/v1/package/npm/lodash@4.17.21/flat'
protocol:'https:'
socketPath:undefined
url:'https://data.jsdelivr.com/v1/package/npm/lodash@4.17.21/flat'
message:'certificate has expired'
stack:'RequestError: certificate has expired\n    at ClientRequest.<anonymous> (d:\\Programming\\node.js\\vsode-jsdelivr\\node_modules\\got\\source\\request-as-event-emitter.js:178:14)\n    at Object.onceWrapper (events.js:422:26)\n    at ClientRequest.emit (events.js:327:22)\n    at ClientRequest.<anonymous> (d:\\Programming\\node.js\\vsode-jsdelivr\\node_modules\\@szmarczak\\http-timer\\source\\index.js:37:11)\n    at TLSSocket.socketErrorListener (_http_client.js:469:9)\n    at TLSSocket.emit (events.js:315:20)\n    at emitErrorNT (internal/streams/destroy.js:106:8)\n    at emitErrorCloseNT (internal/streams/destroy.js:74:3)\n    at processTicksAndRejections (internal/process/task_queues.js:80:21)'

This is what I get when querying the endpoint on Chrome:

image

I'm stumped. According to Chrome the credential should have been updated 12.12.2021 - yet the above error tells it's expired.

@MartinKolarik
Copy link
Member

This is usually an issue with an antivirus, or other security software on your machine, or possibly with clock configuration.

@brainz80
Copy link
Author

brainz80 commented Dec 14, 2021

I believe this issue is related to microsoft/vscode#102252
Which is related to electron/electron#25313

@brainz80
Copy link
Author

I ran command mentioned in microsoft/vscode#102252 openssl s_client -showcerts -servername <server> -connect <server:443>

Here's a snip of the cert-chain:

 0 s:CN = data.jsdelivr.com i:C = US, O = Let's Encrypt, CN = R3
 1 s:C = US, O = Let's Encrypt, CN = R3 i:C = US, O = Internet Security Research Group, CN = ISRG Root X1
 2 s:C = US, O = Internet Security Research Group, CN = ISRG Root X1 i:O = Digital Signature Trust Co., CN = DST Root CA X3
SSL handshake has read 4580 bytes and written 389 bytes
Verification: OK

@jimaek
Copy link
Member

jimaek commented Dec 28, 2021

Since this is unrelated to the addon itself I believe its safe to close this issue? :)

@jimaek jimaek closed this as completed Dec 28, 2021
@nuxodin
Copy link

nuxodin commented Feb 16, 2022

I also have this error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants