Skip to content

[Bug]: Java - 1.13.0 - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 is not respecting #537

@sivadatla

Description

@sivadatla

Playwright version

1.13.0

Operating system

MacOS

What browsers are you seeing the problem on?

Chromium

Other information

No response

What happened? / Describe the bug

I have kept already downloaded just chromium browser at /Users/sivadatla/browsers. I am not interested in other browsers so skipped them.
From Terminal executed the following commands:

export PLAYWRIGHT_BROWSERS_PATH=/Users/sivadatla/browsers
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1

mvn exec:java -Dexec.mainClass="org.example.Example"

As shown in the output (below), it is still downloading firefox, webkit, ffmpeg.

Expected result: Because we have PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1, expecting it to skip downloading of Firefox, webkit and ffmpeg binaries.

With v1.12.0 it is skipping the un-necessary browsers (ff, webkit) downloads, and we can see the following line in the output:
Skipping browsers download because PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD env variable is set

The behaviour seems to be broken in 1.13.0

Code snippet to reproduce your bug

The example code given at - https://playwright.dev/java/docs/intro 

package org.example;

import com.microsoft.playwright.*;

public class Example {
  public static void main(String[] args) {
    try (Playwright playwright = Playwright.create()) {
      Browser browser = playwright.chromium().launch();
      Page page = browser.newPage();
      page.navigate("http://playwright.dev");
      System.out.println(page.title());
    }
  }
}

Relevant log output

playwright % mvn exec:java -Dexec.mainClass="org.example.Example"
[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------------< org.example:playwright >-----------------------
[INFO] Building Playwright Client Examples 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- exec-maven-plugin:1.6.0:java (default-cli) @ playwright ---
Downloading Playwright build of ffmpeg v1005 - 1.3 Mb [====================] 100% 0.0s 
Playwright build of ffmpeg v1005 downloaded to /Users/sivadatla/browsers/ffmpeg-1005
Downloading Playwright build of firefox v1278 - 74.4 Mb [====================] 100% 0.0s 
Playwright build of firefox v1278 downloaded to /Users/sivadatla/browsers/firefox-1278
Downloading Playwright build of webkit v1516 - 53.8 Mb [====================] 100% 0.0s 
Playwright build of webkit v1516 downloaded to /Users/sivadatla/browsers/webkit-1516
Fast and reliable end-to-end testing for modern web apps | Playwright
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:07 min
[INFO] Finished at: 2021-08-03T22:57:19+05:30
[INFO] ------------------------------------------------------------------------

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions