Skip to content

[BUG] Getting no video frame error for mobile chrome #7058

@Nav-2d

Description

@Nav-2d

Context:

  • Playwright Version: 1.12.1
  • Operating System: Mac
  • Node.js version: 12.20
  • Browser: Chromium
  • Extra: Pixel 2 emulation

Code Snippet

// foo.spec.js
test('Find a title (desktop only)', async ({ page, isMobile }) => {
  if (isMobile) {
    // This feature does not exist in mobile browsers
    return;
  }
};
// playwright.config.js
projects: [
    {
      name: 'Pixel 2',
      use: {
        browserName: 'chromium',
        ...devices['Pixel 2'],
      },
    },
    {
      name: 'iPhone 11',
      use: {
        browserName: 'webkit',
        ...devices['iPhone 11'],
      },
    },
  ]

Describe the bug
I have a test where I want to skip execution if the device is a mobile. Using device like Pixel 2, Pixel 4, the test returns an error Error: Page did not produce any video frames while it just passes on iPhone 11 device

Screen Shot 2021-06-10 at 6 51 42 PM
Add any other details about the problem here.

// logs

Error: Page did not produce any video frames

      1 | const { test, expect } = require('@playwright/test');
      2 |
      3 | test('Find a title(desktop only)', async ({ page, isMobile }) => {

        at Video.path (/Users/test/test/test/test/node_modules/@playwright/test/lib/client/video.js:40:19)
        at /test/test/test/test/test/node_modules/@playwright/test/lib/test/index.js:174:35
        at async Promise.all (index 0)
        at Object.context [as fn] (/test/test/test/test/test/node_modules/@playwright/test/lib/test/index.js:170:13)
        at Fixture.teardown (/test/test/test/test/test/node_modules/@playwright/test/lib/test/fixtures.js:96:13)
        at FixtureRunner.teardownScope (/test/test/test/test/test/node_modules/@playwright/test/lib/test/fixtures.js:219:17)
        at WorkerRunner._runAfterHooks (/test/test/test/test/test/node_modules/@playwright/test/lib/test/workerRunner.js:320:13)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions