0

I am using Rails 7.0.4 and gem 'omniauth-google-oauth2', '~> 1.1', '>= 1.1.1' After the consent screen of Omniauth Google, when it's responding to my local server, I am getting this error for the object image.

And the weird thing is, sometimes it's working perfectly fine and then again throws an error while logging in.

Full error:

Image could not download file: SSL_connect returned=1 errno=0 peeraddr=[2404:6800:4002:807::2001]:443 state=error: certificate verify failed (self signed certificate)

I have already tried to update my SSL cert as far as I think.

openssl s_client -showcerts -host valid-isrgrootx1.letsencrypt.org -port 443

Above command is returning:

CONNECTED(00000005)
depth=2 C = US, O = Internet Security Research Group, CN = ISRG Root X1
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = R3
verify return:1
depth=0 CN = origin.letsencrypt.org
verify return:1
write W BLOCK
---
Certificate chain
 0 s:/CN=origin.letsencrypt.org
   i:/C=US/O=Let's Encrypt/CN=R3
-----BEGIN CERTIFICATE-----
XXXX
-----END CERTIFICATE-----
 1 s:/C=US/O=Let's Encrypt/CN=R3
   i:/C=US/O=Internet Security Research Group/CN=ISRG Root X1
-----BEGIN CERTIFICATE-----
XXXX
-----END CERTIFICATE-----
 2 s:/C=US/O=Internet Security Research Group/CN=ISRG Root X1
   i:/O=Digital Signature Trust Co./CN=DST Root CA X3
-----BEGIN CERTIFICATE-----
XXXX
-----END CERTIFICATE-----
---
Server certificate
subject=/CN=origin.letsencrypt.org
issuer=/C=US/O=Let's Encrypt/CN=R3
---
No client certificate CA names sent
Server Temp Key: ECDH, P-256, 256 bits
---
SSL handshake has read 4696 bytes and written 413 bytes
---
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES128-GCM-SHA256
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
XXXX
    Verify return code: 0 (ok)
Piyush Chaudhary
  • 183
  • 2
  • 12
  • I assume that is not the full error and that you're including just the one line. Full errors include the context in which they were raised, and when raising an exception will include a stack trace. Please include more information about the context of the error. Additionally, if it works some of the time but not other times then don't gloss over that casually. Include the specific context and logs when it works and the specific context and logs when it does not work so that we can compare success to failure. I've voted to close this question because it does not have debugging details. – anothermh Feb 28 '23 at 17:12

0 Answers0