-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
AsyncResolver cannot resolve names if resolv.conf is not in the normal location #10519
Comments
That's not really a useful bug report. You'll need to report the issue to the project that is failing or provide an exception for us to know if there's any issue with aiohttp. The only obvious thing in the changelog is that cookie formats changed, so if they are storing cookies somewhere and then trying to use filter_cookies(), those cookies would need to be migrated to the new format (or simply recreated): |
I created a script to test the issue: from aiohttp.client import ClientSession
import asyncio
import httpx
async def proxy():
url = "https://i0.hdslb.com/bfs/face/member/noface.jpg"
print("aiohttp")
try:
async with ClientSession() as session:
async with session.get(url) as res1:
print(res1.status)
except Exception as e:
print(e)
print("httpx")
try:
async with httpx.AsyncClient() as client:
res2 = await client.get(url)
print(res2.status_code)
except Exception as e:
print(e)
if __name__ == '__main__':
asyncio.run(proxy()) The environment for running this script is: Python 3.12.9, aiohttp 3.11.13, aiodns 3.2.0. After reviewing the commit history, I believe this issue might be related to this commit: Commit 5a9e500. So, I tried removing the python test.py
aiohttp
200
httpx
200 |
Check that your |
The running environment is Termux-app on Android.
|
c-ares likely doesn't know how to find the resolv.conf on your platform since it's not in the normal place. You can workaround the issue by symlinking it or changing to ThreadedResolver It would be nice to open an issue for c-ares as well. We might be able to be a bit smarter about it an auto fallback to threaded resolver if async resolver can't find any servers |
It looks like google shot down exposing the nameserver list in https://issuetracker.google.com/issues/351660510#comment4 |
@Heporis What does the following show on your system? |
Describe the bug
I'm using a program biliup in termux.
The web content doesn't display with aiohttp > 3.9.5. when I downgrade aiohttp to 3.9.5, it appears.
It only occurs in termux.
1.mp4
To Reproduce
Expected behavior
appears
Logs/tracebacks
Python Version
3.12.9
aiohttp Version
3.11.13
multidict Version
6.1.0
propcache Version
0.3.0
yarl Version
1.18.3
OS
termux Android
Related component
Server
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: