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

Fix EEA SSL error #729

Merged
merged 3 commits into from
May 13, 2020
Merged

Fix EEA SSL error #729

merged 3 commits into from
May 13, 2020

Conversation

sruti
Copy link
Contributor

@sruti sruti commented May 13, 2020

Problem

The EEA source recently switched to https, but the certificate chain was misconfigured, resulting in this error, causing fetch to fail:

events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: unable to verify the first certificate
    at TLSSocket.onConnectSecure (_tls_wrap.js:1088:34)
    at TLSSocket.emit (events.js:198:13)
    at TLSSocket._finishInit (_tls_wrap.js:666:8)
Emitted 'error' event at:
    at Request.onRequestError (/Users/sruti/Desktop/openaq/openaq-fetch/node_modules/request/request.js:881:8)
    at ClientRequest.emit (events.js:203:15)
    at TLSSocket.socketErrorListener (_http_client.js:401:9)
    at TLSSocket.emit (events.js:198:13)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Fix

  • Added correct certificate chain and attached it to the request using ssl-root-cas module
  • Switched source urls to https

@sruti sruti merged commit 66708d4 into develop May 13, 2020
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

Successfully merging this pull request may close these issues.

1 participant