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

CERT_HAS_EXPIRED #4619

Closed
Saalim95 opened this issue Jun 4, 2022 · 11 comments
Closed

CERT_HAS_EXPIRED #4619

Saalim95 opened this issue Jun 4, 2022 · 11 comments

Comments

@Saalim95
Copy link

Saalim95 commented Jun 4, 2022

How frequently does the bug occur?

All the time

Description

Hi, when I try to install all packages by "npm i" I am seeing the follwoing error. It was not happening before.

Stacktrace & log output

> Resolved requirements: { SYNC_SERVER_FOLDER: 'sync',
  SYNC_ARCHIVE: 'realm-sync-node-cocoa-4.7.3.tar.gz',
  SYNC_ARCHIVE_ROOT: 'realm-sync-node-cocoa-4.7.3' }
No lockfile found at the target, proceeding.
Download url: https://static.realm.io/downloads/sync/realm-sync-node-cocoa-4.7.3.tar.gz
{ FetchError: request to https://static.realm.io/downloads/sync/realm-sync-node-cocoa-4.7.3.tar.gz failed, reason: certificate has expired
    at ClientRequest.<anonymous> (/Users/developer/pd/shelfwatch_mobile_app/node_modules/react-native-queue/node_modules/node-fetch/index.js:133:11)
    at ClientRequest.emit (events.js:182:13)
    at TLSSocket.socketErrorListener (_http_client.js:392:9)
    at TLSSocket.emit (events.js:182:13)
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  name: 'FetchError',
  message:
   'request to https://static.realm.io/downloads/sync/realm-sync-node-cocoa-4.7.3.tar.gz failed, reason: certificate has expired',
  type: 'system',
  errno: 'CERT_HAS_EXPIRED',
  code: 'CERT_HAS_EXPIRED' }

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! realm@2.29.2 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the realm@2.29.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

Can you reproduce the bug?

Yes, always

Reproduction Steps

No response

Version

"realm": "^3.6.0"

What SDK flavour are you using?

Local Database only

Are you using encryption?

No, not using encryption

Platform OS and version(s)

MacOS

Build environment

Which debugger for React Native: ..

Cocoapods version

No response

@nirinchev
Copy link
Member

Hey Saalim, apologies for that - we must have overlooked renewing the certificate. The SRE team is looking into this, but it may be a couple of hours before the issue is resolved.

@Saalim95
Copy link
Author

Saalim95 commented Jun 4, 2022

Thanks for your prompt response. I just tried to install right now, it is now throwing a different error.

Resolved requirements: { SYNC_SERVER_FOLDER: 'sync',
SYNC_ARCHIVE: 'realm-sync-node-cocoa-4.7.3.tar.gz',
SYNC_ARCHIVE_ROOT: 'realm-sync-node-cocoa-4.7.3' }
No lockfile found at the target, proceeding.
Download url: https://static.realm.io/downloads/sync/realm-sync-node-cocoa-4.7.3.tar.gz
{ FetchError: request to https://static.realm.io/downloads/sync/realm-sync-node-cocoa-4.7.3.tar.gz failed, reason: write EPROTO 8630963712:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1407:SSL alert number 40

at ClientRequest.<anonymous> (/Users/developer/pd/shelfwatch_mobile_app/node_modules/react-native-queue/node_modules/node-fetch/index.js:133:11)
at ClientRequest.emit (events.js:182:13)
at TLSSocket.socketErrorListener (_http_client.js:392:9)
at TLSSocket.emit (events.js:182:13)
at onwriteError (_stream_writable.js:431:12)
at onwrite (_stream_writable.js:456:5)
at _destroy (internal/streams/destroy.js:40:7)
at TLSSocket.Socket._destroy (net.js:617:3)
at TLSSocket.destroy (internal/streams/destroy.js:32:8)
at WriteWrap.afterWrite [as oncomplete] (net.js:794:10)

name: 'FetchError',
message:
'request to https://static.realm.io/downloads/sync/realm-sync-node-cocoa-4.7.3.tar.gz failed, reason: write EPROTO 8630963712:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1407:SSL alert number 40\n',
type: 'system',
errno: 'EPROTO',
code: 'EPROTO' }

@thespacemanatee
Copy link
Contributor

Could this be related to #4618? There is a line that says

[stderr] 
prebuild-install WARN install write EPROTO 4576347648:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1546:SSL alert number 40
[stderr] 
prebuild-install WARN install 

@Saalim95
Copy link
Author

Saalim95 commented Jun 4, 2022

yes @thespacemanatee

@gabgagnon
Copy link

gabgagnon commented Jun 4, 2022

Download url: https://static.realm.io/downloads/sync/realm-sync-node-cocoa-4.9.5.tar.gz
FetchError: request to https://static.realm.io/downloads/sync/realm-sync-node-cocoa-4.9.5.tar.gz failed, reason: write EPROTO 4629386752:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:ssl/record/rec_layer_s3.c:1544:SSL alert number 40

Update: Resolved

@nirinchev
Copy link
Member

Hey folks, the certificate problem should be resolved now. Apologies for the disruption.

@MrFuentastic
Copy link

@nirinchev Hello! I know it's a Sunday night 6 months later but I'm experiencing this issue again. I made an EAS dev build and everything worked fine, then other builds started failing.
Tried building a dev build again to make sure I wasn't crazy and it failed, so I'm pretty sure it's this.

@adrian-skybaker
Copy link

curl -vI https://static.realm.io/
...
* SSL certificate problem: certificate has expired
* Closing connection 0
curl: (60) SSL certificate problem: certificate has expired

How frequently does the bug occur?

Roughly every six months.

@GitMurf
Copy link

GitMurf commented Jan 9, 2023

I opened a new issue for this (#5228) and just now noticed there were updates here too. Glad to know I'm not crazy. Although annoying that I have spent the last two hours troubleshooting something that is as simple as a cert renewal 😞

I really hope that the Realm team can put together an automated process that makes sure this doesn't happen again because it appears over the last couple years this has happened several times :(

@bmunkholm
Copy link
Contributor

Very sorry about this - it shouldn't happen of course. We are looking into this.

@GitMurf
Copy link

GitMurf commented Jan 9, 2023

FYI for future I posted a one liner to use with PowerShell (Windows) that should work with an expired certificate as a temporary workaround if needed: #5228 (comment)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants