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

[7.6.0] RuntimeError: ('[ASN1] nested asn1 error (_ssl.c:4145)\n--LONG TEXT--\nTraceback (most recent cal... #5816

Closed
sentry-for-tribler bot opened this issue Dec 7, 2020 · 6 comments · Fixed by #7302
Milestone

Comments

@sentry-for-tribler
Copy link

sentry-for-tribler bot commented Dec 7, 2020

Sentry Issue: TRIBLER-3F

RuntimeError: ('[ASN1] nested asn1 error (_ssl.c:4145)\n--LONG TEXT--\nTraceback (most recent call last):\n  File "lib\\asyncio\\events.py", line 81, in _run\n  File "ipv8\\taskmanager.py", line 131, in done_cb\n  File "ipv8\\taskmanager.py", line 18, in interval_runner\n  File "src\\tribler-core\\tribler_core\\modules\\versioncheck_manager.py", line 44, in check_new_version\n  File "lib\\asyncio\\tasks.py", line 483, in wait_for\n  File "src\\tribler-core\\tribler_core\\modules\\versioncheck_manager.py"...
Traceback (most recent call last):, 
  File "src\tribler-gui\tribler_gui\event_request_manager.py", line 108, in on_read_data, 
RuntimeError: ('[ASN1] nested asn1 error (_ssl.c:4145)\n--LONG TEXT--\nTraceback (most recent call last):\n  
File "lib\\asyncio\\events.py", line 81, in _run\n  
File "ipv8\\taskmanager.py", line 131, in done_cb\n  File "ipv8\\taskmanager.py", line 18, in interval_runner\n  
File "src\\tribler-core\\tribler_core\\modules\\versioncheck_manager.py", line 44, in check_new_version\n  
File "lib\\asyncio\\tasks.py", line 483, in wait_for\n  
File "src\\tribler-core\\tribler_core\\modules\\versioncheck_manager.py"...
@qstokkink
Copy link
Contributor

Not having the full stacktrace is a bit problematic. But, at first sight it seems like this:

https://stackoverflow.com/a/64596828

.. is happening here:

response = await session.get(version_check_url, timeout=ClientTimeout(total=VERSION_CHECK_TIMEOUT))

@drew2a
Copy link
Contributor

drew2a commented Dec 7, 2020

Here the full stacktrace: http://reporter.tribler.org/stacktrace/39349

@qstokkink
Copy link
Contributor

@drew2a could you paste it here? I don't have access to the error reporter 😃

@drew2a
Copy link
Contributor

drew2a commented Dec 7, 2020

Yes, sure:

Traceback (most recent call last):
 File \"lib\\asyncio\\events.py\", line 81, in _run
 File \"ipv8\\taskmanager.py\", line 131, in done_cb
 File \"ipv8\\taskmanager.py\", line 18, in interval_runner
 File \"src\\tribler-core\\tribler_core\\modules\\versioncheck_manager.py\", line 44, in check_new_version
 File \"lib\\asyncio\\tasks.py\", line 483, in wait_for
 File \"src\\tribler-core\\tribler_core\\modules\\versioncheck_manager.py\", line 53, in check_new_version_api
 File \"lib\\site-packages\\aiohttp\\client.py\", line 480, in _request
 File \"lib\\site-packages\\aiohttp\\connector.py\", line 523, in connect
 File \"lib\\site-packages\\aiohttp\\connector.py\", line 858, in _create_connection
 File \"lib\\site-packages\\aiohttp\\connector.py\", line 953, in _create_direct_connection
 File \"lib\\site-packages\\aiohttp\\connector.py\", line 914, in _get_ssl_context
 File \"lib\\site-packages\\aiohttp\\connector.py\", line 867, in _make_ssl_context
 File \"lib\\ssl.py\", line 750, in create_default_context
 File \"lib\\ssl.py\", line 574, in load_default_certs
 File \"lib\\ssl.py\", line 566, in _load_windows_store_certs
ssl.SSLError: [ASN1] nested asn1 error (_ssl.c:4145)

@qstokkink
Copy link
Contributor

@drew2a Thanks 👍

Seems like screwed up root certs: https://bugs.python.org/issue35665

I would consider trying to modify the offending root certificates on users' machines a big no-no. However - and this is a bit of a long shot - perhaps we could somehow provide users with the default_context that ssl attempts to use.

@drew2a
Copy link
Contributor

drew2a commented Feb 22, 2023

This behavior (the application crash because of wrong root certs) should be fixed in #7128

I added tests (#7302) to ensure that this is true.

@drew2a drew2a added this to the 7.13.0 milestone Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants