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

Fatal error on SSL transport #3393

Closed
yjqiang opened this issue Nov 17, 2018 · 15 comments
Closed

Fatal error on SSL transport #3393

yjqiang opened this issue Nov 17, 2018 · 15 comments

Comments

@yjqiang
Copy link

yjqiang commented Nov 17, 2018

Fatal error on SSL transport
protocol: <asyncio.sslproto.SSLProtocol object at 0x114b81518>
transport: <_SelectorSocketTransport fd=132 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/private/var/mobile/Containers/Shared/AppGroup/383B28C1-6DCF-40D8-AB53-B5F7548B7F79/Pythonista3/Documents/site-packages-3/aiohttp/client.py", line 391, in _request
await resp.start(conn)
File "/private/var/mobile/Containers/Shared/AppGroup/383B28C1-6DCF-40D8-AB53-B5F7548B7F79/Pythonista3/Documents/site-packages-3/aiohttp/client_reqrep.py", line 770, in start
self._continue = None
File "/private/var/mobile/Containers/Shared/AppGroup/383B28C1-6DCF-40D8-AB53-B5F7548B7F79/Pythonista3/Documents/site-packages-3/aiohttp/helpers.py", line 673, in exit
raise asyncio.TimeoutError from None
concurrent.futures._base.TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/var/containers/Bundle/Application/84DF3BDF-B442-41B6-93B3-AB45EDA9E5FC/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/asyncio/sslproto.py", line 640, in _process_write_backlog
ssldata = self._sslpipe.shutdown(self._finalize)
File "/var/containers/Bundle/Application/84DF3BDF-B442-41B6-93B3-AB45EDA9E5FC/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/asyncio/sslproto.py", line 156, in shutdown
ssldata, appdata = self.feed_ssldata(b'')
File "/var/containers/Bundle/Application/84DF3BDF-B442-41B6-93B3-AB45EDA9E5FC/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/asyncio/sslproto.py", line 220, in feed_ssldata
self._sslobj.unwrap()
File "/var/containers/Bundle/Application/84DF3BDF-B442-41B6-93B3-AB45EDA9E5FC/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/ssl.py", line 692, in unwrap
return self._sslobj.shutdown()
ssl.SSLError: [SSL] called a function you should not call (_ssl.c:2299)

@yjqiang
Copy link
Author

yjqiang commented Nov 17, 2018

I used “try” and tried handle this exception, but I can’ catch it.

@aio-libs-bot
Copy link

GitMate.io thinks the contributor most likely able to help you is @asvetlov.

Possibly related issues are #3242 (Error), #3117 (Fatal read error on socket transport), #3141 (Fatal read error on socket transport ), #2822 (Unexpected SSL error (CERTIFICATE_VERIFY_FAILED)), and #272 (SSL documentation).

@asvetlov
Copy link
Member

What Python and aiohttp versions do yo use?

@yjqiang
Copy link
Author

yjqiang commented Nov 17, 2018

python 3.6.1 and aiohttp 3.4.4 by using pip

@asvetlov
Copy link
Member

The problem not in aiohttp itself but in Python asyncio.
Try to upgrade to Python 3.7.1 -- it has several asyncio SSL fixes.
I don't know if these fixes are enough for your case though.

@yjqiang
Copy link
Author

yjqiang commented Nov 17, 2018

I'm using Pythonista on ios, so I can't upgrade to 3.7.1 by myself. But if the author made it, I would try and give you the feedback.

@yjqiang
Copy link
Author

yjqiang commented Nov 17, 2018

Should I close it now or let it open until …?

@yjqiang
Copy link
Author

yjqiang commented Nov 17, 2018

By the way, I think I find the reason of #3117 and #3141 and #3202. Can I reopen #3202 , since I made that issue? And I left a message for you there, several days ago.

@asvetlov
Copy link
Member

Yes, better to report on upstream.
Regarding #3202 -- let's briefly discuss your findings with closed issue status and decide what to do after that.

@yjqiang
Copy link
Author

yjqiang commented Nov 17, 2018

@asvetlov I wrote something in #3202 few minutes ago.

@yjqiang
Copy link
Author

yjqiang commented Nov 17, 2018

Yes, better to report on upstream.
Regarding #3202 -- let's briefly discuss your findings with closed issue status and decide what to do after that.

Did you read that? I think that's important.

@yjqiang
Copy link
Author

yjqiang commented Nov 26, 2018

https://bz.apache.org/bugzilla/show_bug.cgi?id=58956
I think maybe it was a bug in OpenSSL 1.0.2f. But I'd like to keep it open until I'm sure about this, which means I have to wait until Pythonista upgrades OpenSSL.

@asvetlov
Copy link
Member

Let's close: nothing to do on aiohttp side.
SSL work is performed completely in standard ssl and asyncio modules.

@yjqiang
Copy link
Author

yjqiang commented Nov 26, 2018

Let's close: nothing to do on aiohttp side.
SSL work is performed completely in standard ssl and asyncio modules.

😂 Maybe you are right. Anyway, thanks a lot.

@lock
Copy link

lock bot commented Nov 26, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Nov 26, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Nov 26, 2019
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

3 participants