Brave (windows) hangs after saving a file to disk

Whenever I download something in Brave on Windows, it hangs for a few seconds after I tell it where to write the file, during which time the browser doesn’t respond at all, but the OS is otherwise normal and responsive.
This has persisted through a couple updates, and occurs even in incognito mode, on both my desktop (Windows 10) and a laptop (Windows 11).
Most recent Brave version tested: v1.71.121
Steps to reproduce: right click on a link, choose Save Link As, select a folder, save file.
Expected behavior: Download starts without delay.
Actual behavior: For ~30s-1m the browser hangs, nonresponsive to mouse input, then the download starts without issue.

All of the following are diagnostic tools:

How to access Brave Browser Developer Tools:

https://www.youtube.com/watch?v=Ke3rRtvmt1g

No events in the event viewer, and no sign of a CPU usage spike in Brave. Whatever’s going on is purely within the browser.

Download Test Files

MP4 - select the 1MB file

https://onlinetestcase.com/mp4-file

A simple text (TXT) file. The contents are one word: ‘test’:

testFile.txt (4 Bytes)

A simple PDF file, courtesy of W3C:

https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf

Type doesn’t seem to change the issue - it’s intermittent right now, but if there’s some specific diagnostics worth pulling up I can try to grab them when it happens again.

Be Prepared for Testing

  • Back up bookmarks (and tabs, as bookmarks)
  • Back up passwords
  • Back up Windows Registry
  • Create System Restore Point

And, examine the Windows OS protocol handlers. Possibly something (that you are not aware of) claims a right to handle certain files. Another Internet browser as the default browser for your machine, might make such claims.


Clear cookies, cache, history, etc.

In a Brave Browser New Window, go to:

brave://settings/clearBrowserData

Select the Advanced tab

Set Time range to “All time”

ENABLE everything except:

  • Passwords and other sign-in data

(Myself, I would NOT make that exception)
(because I would have a backup prepared.)
(In other words, be prepared.)

Click on the “Clear data” button


In a Brave Browser New Window, go to:

brave://settings/shields

Scroll down that settings page to Block cookies

Test either of:

  • Allow all cookies
  • Block third-party cookies (my preference)

In a Brave Browser New Window, go to:

brave://settings/content/javascript

Scroll down that javascript settings page to Allowed to use javascript

Click the Add button

Enter [*.]website_of_interest.com as the site . . . but do not Enable the following:

  • Current Private session only

Click the Add button

Repeat those steps to allow sources of javascripts, depending upon websites_of_interest that you visit.

This is where, you need to know how to display the Brave Browser Developer Tools window. Wherein, you click the Network tab and the “JS” button, and observe the scripts that are downloaded from the website_of_interest. Right-click on each and thereby learn the domains of the sources of javascripts to Allow.

For example, visiting Amazon.com, reveals:

Enter [*.]amazon.com as the site . . . but do not Enable the following:

  • Current Private session only

Click the Add button

Repeat for:

  • [*.]media-amazon.com
  • [*.]ssl-images-amazon.com

For example, visiting Google.com, or YouTube.com:

Enter [*.]google.com as the site . . . but do not Enable the following:

  • Current Private session only

Click the Add button

Repeat for:

  • [*.]firebaseapp.com
  • [*.]gmail.com
  • [*.]googleapis.com
  • [*.]googleusercontent.com
  • [*.]gstatic.com
  • [*.]youtube.com

The general idea is: Despite the site specific Brave Shields ICON [temporal] settings that visitors adjust when they visit some website, the website visitor sometimes needs to ensure that the sources of javascripts, are both: a) Allowed, and b) not interrupted by webpage refreshes or background changes/updates.

Cookies (from the website’s point-of-view), can affect the stability of a download, and such cookies might not be issued nor maintained when one or more javascripts’ sources are not Allowed nor stable.


Opening the Developer Tools window

  • MacOS users, key combination: Command + Option + “I” (no quotes)
  • Windows OS users: key combination: Control + Shift + “I” (no quotes)

On the first occasion of using Developer Tools, the Developer Tools “window” is usually a part of (contained within) its associated Brave Browser window . . . but you can make the Developer Tools window, a standalone window (though keeping its association with the Brave Browser window). I recommend that you do so:

In the upper right-hand corner of the Developer Tools window, there is an “Organizer” 3-vertical-dots button - click on that. The result should be a pop-up:

Screen Shot 2024-11-02 at 3.03.02 PM

Notice the tiny blue icon that is first (left to right) among 4. Click on that icon. The Developer Tools window will become a standalone window.


How to use Developer Tools:

Developer Tools > Network:


Sometimes, you may see the following method of writing a Windows OS path:

NOTE: %LOCALAPPDATA% is a substitute for the beginning portion:

C:\Users\your_username\AppData\Local

Copy the Bookmarks files to a safe location on your computer (or an external drive), beyond/outside the Brave Browser installation paths.

Bookmarks and Bookmarks.bak files:

  • %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Default\Bookmarks
  • %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Default\Bookmarks.bak

(If Brave Browser was working, you could back up - ie export - the bookmarks to a “bookmarks.html” file.)


Sometimes, the following two steps, are sufficient to get Brave Browser running properly.

With BB not running, delete the ‘Caches’ folder, and delete the ‘Cookies’ file.

Caches (folder):

  • %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Default\Cache\

Cookies (file):

  • %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Default\Cookies

The Brave Browser executable, brave.exe, is located in one of:

64 architecture

  • "C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe"

x86 architecture

  • "C:\Program Files(x86)\BraveSoftware\Brave-Browser\Application\brave.exe""

Change the path within the Brave Browser shortcut on your computer’s Desktop, to include switches that are intended to:

  • start up Brave Browser, showing a New Private Window
  • disable all experiments at brave://flags
  • disable extensions
  • disable GPU ie disable Hardware Acceleration
  • enable leak detection and if that failure occurs, then crash the browser (–enable-leak-detection --crash-on-failure are a combo)
  • produce error/log output to a file named ‘brave_console_out.txt’ on the Windows OS Desktop

For example:

64 architecture (change the path to):

"C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe" --incognito --no-experiments --disable-extensions --disable-gpu --enable-leak-detection --crash-on-failure 2> %USERPROFILE%\Desktop\brave_console_out.txt

x86 architecture (note the switches to add):

"C:\Program Files(x86)\BraveSoftware\Brave-Browser\Application\brave.exe" --incognito --no-experiments --disable-extensions --disable-gpu --enable-leak-detection --crash-on-failure 2> %USERPROFILE%\Desktop\brave_console_out.txt

Notice that the existing path, BEFORE the additions, is enclosed by double-quote marks. And, everything added to the existing path, is located after the existing path.


Start Brave Browser via the Brave Browser shortcut.

IF Brave Browser keeps running . . .

TEST your issue: Problems saving a file to disk.


When you think appropriate, restore the Brave Browser shortcut . . .

64 architecture

  • "C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe"

x86 architecture

  • "C:\Program Files(x86)\BraveSoftware\Brave-Browser\Application\brave.exe"