Skip to content

[Question] ERR_ABORTED while trying to download a file inside TeamCity CI machine within Chrome #863

@NikkTod

Description

@NikkTod

Hi all,

Our application has the functionality to export a certain type of report (pdf, csv, etc)

Playwright version 1.20.1

I have the following code:

page.locator(exportButton).click();
Download download = page.waitForDownload(() -> { page.locator(exportPDF).click(); });

As settings I have set the following:

launchOptions.headless = true;
launchOptions.channel = "chrome";
launchOptions.setDownloadsPath(Path.get(System.getProperty("user.dir")
contextOptions.acceptsDownloads = true;


I do not download browsers, I am using chrome that is already installed in the machine.
All these code lines above are working fine when I execute them locally. File gets downloded and checks are passing.

The problem comes when I try to run the test via TeamCity.The following error occure:

StackTrace:
com.microsoft.playwright.TimeoutError: Timeout 30000 ms exceeded
.....

I have a trace file in which I can see on the last step in the Network tab ->

200 GET
net::ERR_ABORTED GET .....

What I can see is that the button that initiate the download has been pressed and the file is actually downloaded.
I have it within the build artifacts, so I am sure that it was downloaded.

Do you know what could cause this ERR_ABORTED, maybe I need to set some additional arguments upon browser launch.

The machine is running on Linux and it has preinstalled Chrome browser

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