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] Waiting for filechooser crashes the page #11899

Closed
israelKusayev opened this issue Feb 7, 2022 · 5 comments
Closed

[BUG] Waiting for filechooser crashes the page #11899

israelKusayev opened this issue Feb 7, 2022 · 5 comments

Comments

@israelKusayev
Copy link

Context:

  • Playwright Version: 1.1.8.1
  • Operating System: bitbucket pipelines
  • Node.js version: 16.13
  • Device: iPhone 13 Pro
  • Extra: running tests in parallel inside bitbucket pipelines (Running 26 tests using 4 workers)

Sometimes the page crashes when waiting for filechooser (Happens only on mobile IOS not on chromium)
code

const [fileChooser] = await Promise.all([this.page.waitForEvent('filechooser'), this.page.locator(this.#uploadButton).click()]);
await fileChooser.setFiles(path.resolve('src/images/2mb_sample.png'));

Html reporter errors
image

Html reporter test steps
image

Trace file
image
and
image

playwright config

import { PlaywrightTestConfig, devices } from '@playwright/test';

const config: PlaywrightTestConfig = {
	testDir: './src/tests',
	globalSetup: './src/tests/setup/globalSetup.ts',
	timeout: 240 * 1000,
	expect: {
		timeout: 5000
	},
	forbidOnly: !!process.env.CI,
	retries: process.env.CI ? 2 : 0,

	reporter: [['html'], ['list'], ['./src/reporters/slack-PD-reporter.ts'], ['./src/reporters/elastic-reporter.ts']],

	use: {
		launchOptions: {
			// slowMo: 20
		},
		actionTimeout: 0,

		trace: 'on-first-retry',
		video: 'retain-on-failure',
		screenshot: 'only-on-failure'
	},

	projects: [
		{
			name: 'chromium',
			use: {
				...devices['Desktop Chrome']
			}
		},
		{
			name: 'IOS',
			use: {
				...devices['iPhone 13 Pro']
			}
		}
	]
};
export default config;
@pavelfeldman
Copy link
Member

Thank you for the report! Could you run the same with DEBUG=pw:browser* env variable? It'll tell us why WebKit crashes.

@israelKusayev
Copy link
Author

Hi I tried running with DEBUG=pw:browser* as for now I can't reproduce the bug, I'll update when I encounter it again

@israelKusayev
Copy link
Author

@pavelfeldman I reproduced. the only log I see it

2022-02-09T14:21:44.915Z pw:browser <launching> /ms-playwright/webkit-1596/pw_run.sh --inspector-pipe --headless --no-startup-window
2022-02-09T14:21:44.927Z pw:browser <launched> pid=3932

@pavelfeldman
Copy link
Member

Your code looks good and the trace looks clean, as in it does not say anything about the crashed page. Is there a chance you could provide a reduced test case that we can try?

@dgozman
Copy link
Contributor

dgozman commented Feb 18, 2022

We need more information to act on this report. Please file a new one and link to this issue when you get back to it!

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

3 participants