[BUG] playwright throwing SSL while ignoreHTTPSErrors is true
Context:
- Playwright Version: 1.14.1
- Operating System: Linux
- Node.js version: 16
- Browser: Chromium
- Extra: running in docker-compose
Code Snippet
import { expect, test } from '@playwright/test';
const testUrl = process.env.TEST_URL;
test('Smoke test', async ({ page }) => {
await page.goto(testUrl);
const title = page.locator('h1');
await expect(title).toHaveText('Login');
});
Describe the bug
I have some trouble with playwright and docker compose. So i run my app in one docker container and my playwright tests from another container. I connect to my app using docker routing so http://[container-name]:[port-number] in my case: http://app:3000. I always get a page.goto: net::ERR_SSL_PROTOCOL_ERROR at http://app:3000/ . Any other way I run my tests (with no docker container, with running the app in a container and the tests just from my mac….) works like expected.
In my config I have ignoreHTTPSErrors: true but still get these errors.
Is there a script I can run or steps I can follow to reproduce this issue? I am not too familiar with docker compose.
We found the solution, it is because our docker compose service was called app just renaming it something else works :shrug:
When the solution was found one of my teammates remembered they had the same problem before with another framework. So it’s not related to playwright!
Thx for the quick responses anyway!
I had the same problem when i tried to connect to a container named dev in my docker-compose setup.
I suspect this is because of the https TLD restrictions by google for .app and .dev, see
https://help.dreamhost.com/hc/en-us/articles/360025832811--dev-and-app-domains-force-HTTPS-by-default
Maybe worth a try to get it fixed in Chromium because I think Google is unlikely to host anything on https://app or https://dev and their restriction clearly seems to be aiming at subdomains.
I had the same problem when i tried to connect to a container named dev in my docker-compose setup.
I suspect this is because of the https TLD restrictions by google for .app and .dev, see
https://help.dreamhost.com/hc/en-us/articles/360025832811--dev-and-app-domains-force-HTTPS-by-default
Thanks, you saved my day!
For whatever reason this issue was happening now for me after upgrading from playwright 1.58.2 to 1.59.1. Thanks @mkbrechtel for the workaround !!