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

[BUG] net::ERR_TUNNEL_CONNECTION_FAILED #34252

Closed
amar-dare opened this issue Jan 8, 2025 · 4 comments
Closed

[BUG] net::ERR_TUNNEL_CONNECTION_FAILED #34252

amar-dare opened this issue Jan 8, 2025 · 4 comments

Comments

@amar-dare
Copy link

amar-dare commented Jan 8, 2025

System info
Playwright Version: v1.49.1
Operating System: Debian GNU/Linux 11 (bullseye)
Browser: Default version of Chromium installed in the image mcr.microsoft.com/playwright:v1.49.1-noble
NOTE: - the same code works when run locally on Windows 11 in PyCharm. The error below is when run in a kubernetes pod from a docker image.
- the same connection in the same environment works when using requests.get(url, proxies=proxy) instead of playwright
- the same error happens when using no proxy
- I tried using playwright with Chrome instead of Chromium and I got chrome_crashpad_handler: --database is required
- I tried using playwright with Firefox and the browser fails to start, with no error message. It just times out after a minute

Source code

async with async_playwright() as p:
            logging.debug('Entered async with async_playwright() as p')
            body_texts = {}
            try:
                logging.debug('Attempting to launch browser with proxy settings')
                browser = await p.chromium.launch(
                    proxy={
                    'server': 'proxyserver',
                    'username': 'username',
                    'password': 'password'
                    }
                )

Steps
Try to launch browser

Expected
It launches successfully

Actual
It gives this error:

'''
DEBUG:root:Response: https://en.wikipedia.org/wiki/Manx_language - 407
DEBUG:root:Request failed: https://en.wikipedia.org/wiki/Manx_language - net::ERR_TUNNEL_CONNECTION_FAILED
'''

@Skn0tt
Copy link
Member

Skn0tt commented Jan 8, 2025

It's hard for us to debug what exactly is going on based on what you shared. Please provide us with a reproducible example that we can run on our end, to see what's going on. Ideally keep Kubernetes out of it, and reproduce it with Docker.

@amar-dare
Copy link
Author

Would it work if I sent you the full function that you can run on your end? I can also send you the dockerfile if you want to see the config.

If something else, please let me know what you need.

As for Kubernetes, I was thinking it could be part of the problem, seeing as the same code runs locally with no errors.

@Skn0tt
Copy link
Member

Skn0tt commented Jan 9, 2025

I'd prefer to not debug your application, just from a security perspective. Please create a minimal reproduction.

@amar-dare
Copy link
Author

Thank you, I will create another post when I have the example. In the meantime, I have another lead I want to check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants