-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Regular http requests via UrlRequest fail on Android #6946
Comments
Thanks for the report. Please share the full stacktrace as it often helps developers to spot the exact issue more quickly. |
It is the same for v2.0.0rc3. I omitted the try-exception around result, resp = self._fetch_url(url, req_body, req_headers, q) and added 'win' to line 219 in urlrequest to simulate the error on desktop and get a traceback. kivy/kivy/network/urlrequest.py Line 219 in ab58fbe
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Program Files (x86)\Python38-32\lib\threading.py", line 932, in _bootstrap_inner
self.run()
File "C:\Program Files (x86)\Python38-32\lib\site-packages\kivy\network\urlrequest.py", line 253, in run
result, resp = self._fetch_url(url, req_body, req_headers, q)
File "C:\Program Files (x86)\Python38-32\lib\site-packages\kivy\network\urlrequest.py", line 360, in _fetch_url
req = cls(host, port, **args)
TypeError: __init__() got an unexpected keyword argument 'context' |
Thanks for the trace, from quick checking I think the problem occurs with From reading the code, I think this is happening because we no always provide the CA file, refs #6703 then we enter in this case https://github.com/kivy/kivy/blob/2.0.0rc3/kivy/network/urlrequest.py#L337 which generates the context. So probably an easy fix would be to also check for |
Don't pass a `context` keyword argument for `HTTPConnection`. The error was: ``` TypeError: __init__() got an unexpected keyword argument 'context' ```
…_file_non_https_scheme Ignore ca_file on http scheme, fixes #6946
Software Versions
Describe the bug
Since #6703, regular http requests via urlrequest no longer work on android. The on_error function of urlrequest is called, while on desktop it is successful. Going back to kivy v2.0.0rc1 fixes it, but this version has broken https.
Expected behavior
Successful regular http requests.
To Reproduce
Code and Logs and screenshots
The text was updated successfully, but these errors were encountered: