Brave Browser Selenium automated testing failing

I have a website that I am automatically testing to ensure it runs in all browsers like Chrome, Firefox and Brave etc. But in Brave Browser the following error is coming:

[1592:17984:0325/134626.670:ERROR:cache_util_win.cc(20)] Unable to move the cache: Access is denied. (0x5)
[1592:17984:0325/134626.670:ERROR:cache_util.cc(144)] Unable to move cache folder C:\Users\user\AppData\Local\BraveSoftware\Brave-Browser\User Data\ShaderCache\GPUCache to C:\Users\user\AppData\Local\BraveSoftware\Brave-Browser\User Data\ShaderCache\old_GPUCache_000
[1592:17984:0325/134626.670:ERROR:disk_cache.cc(184)] Unable to create cache
[1592:17984:0325/134626.670:ERROR:shader_disk_cache.cc(606)] Shader Cache Creation failed: -2
Opening in existing browser session.
Exception in thread “main” java.lang.ExceptionInInitializerError
Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:638)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:252)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:174)
at org.openqa.selenium.chromium.ChromiumDriver.(ChromiumDriver.java:82)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:99)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:86)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:75)
Caused by: org.openqa.selenium.WebDriverException: Driver server process died prematurely.
Build info: version: ‘4.0.0-beta-2’, revision: ‘4ec0cfc112’
System info: host: ‘local’, ip: ‘10.16.0.15’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_272’
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:220)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:86)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:620)
… 9 more

It looks like there is some C++ code cache_util_win.cc and cache_util.cc with bugs. Is it possible to run Brave browser via command line parameters to have its own cache settings/folders so it doesn’t clash with Actual running? Can the caching be disabled for the automated testing purposes?

Expected result:
The error should not appear

Brave Version( check About Brave):
[
Version 1.21.77 Chromium: 89.0.4389.90 (Official Build) (64-bit)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.