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] Webkit forces https on localhost #12975

Closed
maxibri opened this issue Mar 23, 2022 · 3 comments
Closed

[BUG] Webkit forces https on localhost #12975

maxibri opened this issue Mar 23, 2022 · 3 comments

Comments

@maxibri
Copy link

maxibri commented Mar 23, 2022

Context:

  • Playwright Version: 1.20.0
  • Operating System: Ubuntu 20.04
  • Node.js version: v14.19.0
  • Browser: Webkit

Code Snippet

Here is my webkit config

//playwright.config.js

const config = {
// ...
  projects: [
      {
        name: 'safari',
        use: {
          ...devices['Desktop Safari'],
          bypassCSP: true,
          headless: false,
          ignoreHTTPSErrors: true,
        },
      },
  ],
// ...
}

Describe the bug

When running tests on Webkit, i get the following errors:
webkit_tls_error
I don't use SSL on localhost. It seems like Webkit automatically forces HTTPS. All other browsers are working fine.

@maxibri maxibri changed the title Webkit forces https on localhost [BUG] Webkit forces https on localhost Mar 23, 2022
@dgozman
Copy link
Contributor

dgozman commented Mar 23, 2022

@maxibri Could you please share more details? What is the page url you use in page.goto()? Looking at the screenshot, it is https://localhost:3000, and I guess it should not be? Sharing the config/test would be ideal, so we can reproduce the issue locally.

@maxibri
Copy link
Author

maxibri commented Mar 24, 2022

Hi @dgozman,
inside my *.spec.js files i'm using the beforeEach() hook with HTTP:

test.beforeEach(async ({ page }) => {
  await page.goto(`http://localhost:3000/stories`);
});

Webkit also routes correctly to http://localhost:3000, but then tries to load the resources with HTTPS
image

Routing with page.locator('.class').click() on links forces HTTPS as well.
All other browsers are working fine.

@dgozman
Copy link
Contributor

dgozman commented Mar 24, 2022

This seems like webkit-specific behavior. Here is a similar StackOverflow question.

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