question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Infura IPFS SSL certificate verification fails

See original GitHub issue

Hello!

I just updated to ipfshttpclient from py-ipfs-api and now all Infura IPFS requests are failing.

Infura IPFS multiaddr: self.base_uri = "/dns/ipfs.infura.io/tcp/5001/https" (I’ve also tried with /dns4/)

Connecting to Infura IPFS

self.client = ipfshttpclient.connect(self.base_uri)

Stack trace:

ethpm/backends/ipfs.py:60: in __init__
    self.client = ipfshttpclient.connect(self.base_uri)
venv/lib/python3.6/site-packages/ipfshttpclient/client/__init__.py:102: in connect
    assert_version(client.version()['Version'])
venv/lib/python3.6/site-packages/ipfshttpclient/client/base.py:15: in wrapper
    result = func(*args, **kwargs)
venv/lib/python3.6/site-packages/ipfshttpclient/client/miscellaneous.py:204: in version
    return self._client.request('/version', decoder='json', **kwargs)
venv/lib/python3.6/site-packages/ipfshttpclient/http.py:44: in wrapper
    return func(self, *args, **merged)
venv/lib/python3.6/site-packages/ipfshttpclient/http.py:364: in request
    files, headers, data, timeout=timeout)
venv/lib/python3.6/site-packages/ipfshttpclient/http.py:282: in _request
    timeout=timeout)
venv/lib/python3.6/site-packages/ipfshttpclient/http.py:249: in _do_request
    six.raise_from(exceptions.ConnectionError(error), error)
<string>:3: in raise_from
    ???
E   ipfshttpclient.exceptions.ConnectionError: SSLError: HTTPSConnectionPool(host='ipfs.infura.io', port=5001): Max retries exceeded with url: /api/v0/version?stream-channels=true (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))

I’m not sure what’s the cause for the SSL certificate verification failure. There doesn’t seem to be any problem with infura’s ssl certificates. It appears that the multiaddr is being correctly parsed, since the request is being made to https://ipfs.infura.io:5001/api/v0/version.

I’ve tried adding Infura’s CA to certifi’s cacert.pem without any luck. I’ve also tried hard-coding requests.request’s verify parameter to False just to see if it works, but no luck.

Any thoughts or ideas on get these requests working again would be great, cheers!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ntninjacommented, May 21, 2019

I have pushed version 0.4.12 just now that should resolve this issue. Thanks for reporting this!

0reactions
ntninjacommented, May 21, 2019

Fix is in the pipeline: #185

Read more comments on GitHub >

github_iconTop Results From Across the Web

Infura IPFS SSL certificate verification fails · Issue #184 - GitHub
There doesn't seem to be any problem with infura's ssl certificates. It appears that the multiaddr is being correctly parsed, since the request ......
Read more >
IPFS Authentication Error 403 - Forbidden - Infura Community
I input the details and now I am getting a 403 - Forbidden Error. ... Enable SSL certificate verification can be disabled in...
Read more >
IPFS Authentication Error 403 - Forbidden - Infura Community
I input the details and now I am getting a 403 - Forbidden Error. ... I can't access the link due to the...
Read more >
IPFS Authentication Error 403 - Forbidden - Infura Community
Been using the unauthenticated api until just recently just fine. Now the change to authenticated requested required me to authorize it.
Read more >
IPFS Authentication Error 403 - Forbidden - #64 by Kevin_Day
Been using the unauthenticated api until just recently just fine. Now the change to authenticated requested required me to authorize it.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found