playwright: [BUG] Only blank screen in UI Mode
System info
- Playwright Version: v1.40
- Operating System: macOS 13.2
- Browser: All
- Other info: We want to migrate from Cypress to Playwright. For evaluation we created a playright config, and made a pretty basic test of our application. The test runs fine in headless mode, but if we try to start the UI, we get a blank screen and a 404 Error in the browser console. There seems to be a script missing(look at images attached). We don’t really have any clue how to fix it or what the problem is.
Source code
- [ x] I provided exact source code that allows reproducing the issue locally.
Config file
import type { PlaywrightTestConfig } from '@playwright/test';
import { devices } from '@playwright/test';
const config: PlaywrightTestConfig = {
testDir: './integration/playwright/tests',
testMatch: /.*\.ts/,
timeout: 30 * 1000,
expect: {
timeout: 5000,
},
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: 'html',
use: {
actionTimeout: 0,
trace: 'on-first-retry',
baseURL: 'http://localhost:4200/xxx',
},
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
},
},
{
name: 'firefox',
use: {
...devices['Desktop Firefox'],
},
},
{
name: 'webkit',
use: {
...devices['Desktop Safari'],
},
},
webServer: [
{
command: 'yarn serve:bootRun xxx',
url: 'http://localhost:4200/xxx',
timeout: 120 * 1000,
reuseExistingServer: true,
},
{
command: 'yarn start:bootRunTesting xxx',
port: 8080,
timeout: 120 * 1000,
reuseExistingServer: true,
},
{
command: 'yarn start:wiremock xxx',
port: 1213,
timeout: 120 * 1000,
reuseExistingServer: true,
},
],
};
export default config;
Test file (self-contained)
Steps
- start the playwright-UI with yarn playwright test --ui
- wait for start
- see blank screen
Expected
I see the normal Playwright UI
Actual
I see a blank screen and an error in the browser console.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 32 (4 by maintainers)
@pavelfeldman I think this issue should be reopened, it’s clearly an ongoing problem in both 1.42 and 1.43 that isn’t a one-off setup issue. We’re running into the same problem on 1.43, downgrading to 1.41 fixes the issue.
2025 and still facing the same problem
I would like to draw attention to a particular observation: when executing tests in UI mode and selecting “run” for either the entire test file or a describe block, the test passes, yet the UI mode displays a blank page. However, when running the test for a specific case, the actual screen is visible. I am seeking clarification on this discrepancy and expressing a desire to have visibility into all tests in the life-cycle UI mode, rather than exclusively for individual tests. Your insights into the underlying reason for this behavior would be greatly appreciated.
System info
Run for spec file
Run for only one specific test
Same thing here. Tests work fine, but blank screen in UI mode. I’m running the example scenario that were included when installing it:
Edit: Closing the issue and asking to reopen does not make any sense
i am still facing the same issue with Version 1.52.0
I fixed it be going back from v1.42 to v1.41. Not the ideal fix, but unblocks me.
I was running into this issue as well.
I’ve found the error on our side. We havve a .yarnclean File which deletes ‘assets’ Folders from node modules. Scripts needed for the UI are under traceviewer/assets, so it is deleted by yarn clean the UI wont work. Maybe you got something similar.
A good hint from the dev team would have been the location of the script in the node_modules.
I’m on version
1.45.2using the same jammy docker image version and experiencing this issue. This issue should please be reopenedI am also seeing this issue in 1.41.
For me, no rerunning of the tests resolves the issue, the preview is always blank, however, default dummy tests pass.
Tests are ran against playwright server running in docker as such:
… And UI:
System is arch linux browsers: all playwright versions: attempted with 1.41 and 1.44 for both docker and locally
Edit:
Add this dump of the console.
Edit2: For me, it seems to work when visiting the UI in chromium, but not in firefox.
I can confirm this observation. When I fully expand all the tests and run them individually, the actual screen is visible.
Chiming in that I had the same issue on 1.43.0. I downgraded to 1.41 and my UI is working fine again.