Skip to content

[🐛 Bug]: Grid endpoint "get downloadable files" can throw IOException #16720

@asolntsev

Description

@asolntsev

Description

This problem was introduced in #16589

When using Selenium Grid and calling method remoteWebDriver.getDownloadableFiles(), sometimes (very rarely) it may fail. It happens when Chrome downloads its own internal files (e.g. .com.google.Chrome.GhiE6d) - and immediately deletes them.

Reproducible Code

RemoteWebDriver driver = new RemoteWebDriver();
driver.getDownloadableFiles();

Debugging Logs

java.io.UncheckedIOException: Failed to get file attributes: /tmp/uuid10303077473612519879bd9e1b7a-d55b-448c-a408-74900b29cc6b/download6602653343356759423/.com.google.Chrome.GhiE6d
	at org.openqa.selenium.grid.node.local.LocalNode.getFileInfo(LocalNode.java:814)
	at org.openqa.selenium.grid.node.local.LocalNode.listDownloadedFiles(LocalNode.java:795)
	at org.openqa.selenium.grid.node.local.LocalNode.downloadFile(LocalNode.java:763)
	at org.openqa.selenium.grid.node.DownloadFile.execute(DownloadFile.java:39)
	at org.openqa.selenium.remote.http.Route.execute(Route.java:69)

Caused by: java.nio.file.NoSuchFileException: /tmp/uuid10303077473612519879bd9e1b7a-d55b-448c-a408-74900b29cc6b/download6602653343356759423/.com.google.Chrome.GhiE6d
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
	at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
	at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:148)
	at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
	at java.base/java.nio.file.Files.readAttributes(Files.java:1851)
	at org.openqa.selenium.grid.node.local.LocalNode.getFileInfo(LocalNode.java:807)
	... 51 more

ℹ️ Last known working version: 4.38.0

Metadata

Metadata

Assignees

Labels

B-gridEverything grid and server relatedC-javaJava BindingsD-chromeI-defectSomething is not working as intendedI-regressionSomething was working but we "fixed" it

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions