Skip to content

[BUG] Playwright Android not working in Oppo & Xiaomi devices #21049

@Archish27

Description

@Archish27

Context:

  • Playwright Version: 1.28.1
  • Operating System: Mac OS X
  • Node.js version: 16.16.0
  • Browser: Chrome
  • Extra: [any specific details about your environment]
DEBUG='pw:*' node server.js >> server.log 2>&1
DEBUG='pw:*' node client.js >> client.log 2>&1

Code Snippet

Help us help you! Put down a short code snippet that illustrates your bug and
that we can run and debug locally. For example:

const { _android } = require('playwright');
const testFn = async () => {
  const before = Date.now();
  const device = await _android.connect(`ws://127.0.0.1:56531/032b62332e0d72e20a5970a24dc3143f`);
  const after = Date.now();
  console.log('connected in ', (after - before) / 1000);

  console.log(device.model());
  console.log(device.serial());
  await device.shell('am force-stop com.android.chrome');
  console.log('here1');
  console.log('here2');
  const context = await device.launchBrowser();
  console.log('here3');
  const page = await context.newPage();
  console.log('here4');
  await page.goto('https://duckduckgo.com/')
  console.log('here5');
  await context.close();
  await device.close();
}
testFn();

Describe the bug

Unable to run playwright android session in Oppo & Xiaomi devices. launchBrowser command gets stuck which can been seen in client logs
Sharing playwright client & server logs.
client.log
server.log

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