Rayrun
← Back to Discord Forum

Page.goto ERR_NAME_NOT_RESOLVED

Hello everyone,

I have a very simple playwright test that visits a page and checks for something in the page. I run this app using docker. However, when executing that test I'll often get the ERR_NAME_NOT_RESOLVED error and it breaks my tests. What's the solution here? I don't want the tests to stop.

Thank you in advance

This thread is trying to answer question "How can I resolve the ERR_NAME_NOT_RESOLVED error that occurs when running a playwright test using docker?"

0 replies

Answer

Troubleshooting ERR_NAME_NOT_RESOLVED Error in Docker

Facing ERR_NAME_NOT_RESOLVED error while running Playwright tests in Docker? Here's how you can fix it:

Check Network Configuration

First, ensure your Docker container can access the internet and resolve domain names. Test this by running a ping command inside the container.

Verify DNS Settings

Docker containers use the host machine's DNS settings by default. Make sure these are correct and functioning.

Use Explicit IP Addresses

If domain name resolution is still an issue, use explicit IP addresses in your Playwright tests. This bypasses DNS resolution issues.

Check Firewall or Proxy Settings

If Docker is behind a firewall or proxy server, ensure it allows outgoing connections from Docker containers and doesn't block necessary ports or protocols.

Update Playwright Version

Make sure you're using the latest version of Playwright and its dependencies in your Docker image.

Test Outside of Docker

To check if the issue is Docker-specific, try running your Playwright tests on your local machine. If they work fine, the issue is likely with Docker's networking.

Consult Playwright Documentation

The official Playwright documentation and community forums can provide additional help.

Remember, ERR_NAME_NOT_RESOLVED error can have multiple causes. Analyze your setup, network configuration, and error messages to identify the root cause.

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.