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]: Application fails to load in Safari (Docker Environment) #34490

Open
romankhomitskyi opened this issue Jan 27, 2025 · 5 comments
Open
Assignees
Labels

Comments

@romankhomitskyi
Copy link

Version

1.49.0

Steps to reproduce

The application does not load in Safari when run inside a Docker container. A console error is shown, and the page fails to render.

  1. docker pull mcr.microsoft.com/playwright:v1.49.0
  2. Create test
import { expect, test } from '@playwright/test';

test('Should visit the page', async ({ page }) => {
	await page.goto('https://app.tenantcloud.com/login');
	await expect(page.locator('[formcontrolname="email"]')).toBeVisible();
});
  1. Run the test inside container in Safari browser
    docker run -it --rm --ipc=host mcr.microsoft.com/playwright:v1.49.0 /bin/bash

Expected behavior

The application should load in Safari inside the docker container, everything works in Safari outside the container

Actual behavior

Console error is snown, which might be the cause of not loading the application, however, there is no error in Safari outside the container

'text/plain' is not a valid JavaScript MIME type.
TypeError: 'text/plain' is not a valid JavaScript MIME type.

Additional context

Image

Environment

System:
    OS: macOS 15.2
    CPU: (10) arm64 Apple M1 Max
    Memory: 297.30 MB / 32.00 GB
  Binaries:
    Node: 20.15.1 - ~/.nvm/versions/node/v20.15.1/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v20.15.1/bin/yarn
    npm: 10.7.0 - ~/.nvm/versions/node/v20.15.1/bin/npm
  IDEs:
    VSCode: 1.94.2 - /usr/local/bin/code
  Languages:
    Bash: 5.2.15 - /opt/homebrew/bin/bash
  npmPackages:
    @playwright/test: 1.49.0 => 1.49.0
@agg23 agg23 assigned agg23 and mxschmitt and unassigned agg23 Jan 27, 2025
@mxschmitt
Copy link
Member

I can repro but was so far not able to get a minimal reproducible out of it. It seems like if you load a zero-size .js file in a module it fails in WebKit on Linux but not on other platforms/Chrome.

@romankhomitskyi
Copy link
Author

I can repro but was so far not able to get a minimal reproducible out of it. It seems like if you load a zero-size .js file in a module it fails in WebKit on Linux but not on other platforms/Chrome.

Can you tell me which specific file?

I'll also add that the tests pass in this image on the same site on Pipelines, but there the servers have an AMD architecture.

@mxschmitt
Copy link
Member

mxschmitt commented Jan 29, 2025

Its https://cdn.tenantcloud.net/builds/v60.0.117/web/main.js requiring https://cdn.tenantcloud.net/builds/v60.0.117/web/chunk-QX3US56N.js

@mxschmitt
Copy link
Member

I was able to create a minimal reproducible out of it - filed upstream as https://bugs.webkit.org/show_bug.cgi?id=286734

@fonzi
Copy link

fonzi commented Jan 30, 2025

I'm getting the same behavior on 1.50. Assuming it's the same thing. Also inside docker only.

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

No branches or pull requests

4 participants