microsoft/playwright · error · Error

Please install Android driver apk using '${packageManagerCom

Error message

Please install Android driver apk using '${packageManagerCommand} playwright install android'

What it means

Error "Please install Android driver apk using '${packageManagerCommand} playwright install android'" thrown in microsoft/playwright.

Source

Thrown at packages/playwright-core/src/server/android/android.ts:191

  }

  private async _installDriver(progress: Progress): Promise<PipeTransport> {
    debug('pw:android')('Stopping the old driver');
    await progress.race(this._shell(`am force-stop com.microsoft.playwright.androiddriver`));

    // uninstall and install driver on every execution
    if (!this._options.omitDriverInstall) {
      debug('pw:android')('Uninstalling the old driver');
      await this.shell(progress, `cmd package uninstall com.microsoft.playwright.androiddriver`);
      await this.shell(progress, `cmd package uninstall com.microsoft.playwright.androiddriver.test`);

      debug('pw:android')('Installing the new driver');
      const executable = registry.findExecutable('android')!;
      const packageManagerCommand = getPackageManagerExecCommand();
      for (const file of ['android-driver.apk', 'android-driver-target.apk']) {
        const fullName = path.join(executable.directory!, file);
        if (!fs.existsSync(fullName))
          throw new Error(`Please install Android driver apk using '${packageManagerCommand} playwright install android'`);
        await this.installApk(progress, await progress.race(fs.promises.readFile(fullName)));
      }
    } else {
      debug('pw:android')('Skipping the driver installation');
    }

    debug('pw:android')('Starting the new driver');
    this._shell('am instrument -w com.microsoft.playwright.androiddriver.test/androidx.test.runner.AndroidJUnitRunner').catch(e => debug('pw:android')(e));
    const socket = await this._waitForLocalAbstract(progress, 'playwright_android_driver_socket');
    const transport = new PipeTransport(socket, socket, socket, 'be');
    transport.onmessage = message => {
      const response = JSON.parse(message);
      const { id, result, error } = response;
      const callback = this._callbacks.get(id);
      if (!callback)
        return;
      if (error)
        callback.reject(new Error(error));

View on GitHub (pinned to c8fc3bf8d3)

When it happens

Trigger: Thrown at packages/playwright-core/src/server/android/android.ts:191 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of microsoft/playwright@c8fc3bf8d3 (2026-08-12). Data as JSON: /api/errors/80afcc1280c09000. Report an issue: GitHub.