Brave goes into infinite loop whenever confirmation popup appears

Description of the issue:
Running v.1.62.156 on uname -a = Linux Z990-R-AAS9U1-e6fde4c9 6.5.0-15-generic #15~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 12 18:54:30 UTC 2 x86_64 x86_64 x86_64 GNU/Linux, Brave goes into an infinite loop when its confirmation popup appears.

How can this issue be reproduced?
Sometimes when Brave’s confirmation popup appears, i.e. when closing a window with multiple tabs or trying to install a new extension, Brave gets caught in an infinite loop and has to be restarted.

Expected result:
I can click on the “Cancel” or “Confirm” buttons to get the corresponding result.

Brave Version( check About Brave):
v.1.62.156

Additional Information:
It seems the popup (perhaps better called a “popdown” since it comes down from the menu bar) causes the window to try to resize itself for some reason, in that the window goes to its maximum height (but not width), and then seems to start changing its width as well, though it keeps popping back to the original width, while the whole window jiggles around. I can go to another tab on another window, and eventually another confirmation popup appears there asking me if I want to “Wait” for “Force Quit”. Choosing the latter causes Brave to exit or crash, and I have to restart the whole program.

This did not used to happen, and appears to be an unintended consequence of a recent update (something in the last month, since I last updated).

Can you please try to grab a short screen recording of this behavior so I can get a clearer picture of what is going on? Additionally, how frequently do you encounter this issue when browsing?

This issue may be the same as

@mattches
OK, but please let me know how one does that (and I guess you should know I’m actually using elementary OS 7.1, not basic Ubuntu; it uses the gala window manager). It happens quite reliably when I try to install an extension from the Chrome store or close a window with multiple open tabs; I’ve not encountered it otherwise.

@anon.immety
Finally, it also looks to me like this is probably the same issue that TC26 reported 8 days ago (so I needn’t take it personally!).

@Tim02130,
You can use any screen recording software to capture yourself reproducing the issue on the screen — I believe that Ubuntu does have built-in screen capture software but I don’t know if it’s available in Elementary OS. If not, we have some suggested free software you can use for this here:

Simply capture the behavior as it occurs on your end then upload the recording to imgur.com and paste the imgur link directly into the editor here.

Thanks I’ll look into it.

On additional remark related to the latest reply to @TC26’s related issue: I too am using the flatpak version of Brave. Though it’s only crashing the browser, not my OS (thankfully).

On Linux with Gnome, whenever I perform an action that leads to a JavaScript confirm() or alert(), like closing a tab that has unsaved changes or plays music, the browser starts to erratically resize its window.

Sometimes the popup is shown and sometimes not. Irrelevant, the popup or the browser window cannot be interacted with. Moreover, none of the Brave windows can be interacted with. They’re all frozen.

Then, sometimes Gnome shell displays a prompt to wait or kill the application. Other times even this does not happen and the whole Gnome shell is frozen. The only remedy that unlocks the shell is signing in using a separate session and issuing the killall brave command.

During the erratic resize the journal is spammed with:

lut 18 11:38:22 player gnome-shell[1924]: Can't update stage views actor <Shadow Actor>[<StBin>:0x581e2736fb20] is on because it needs an allocation.
lut 18 11:38:22 player gnome-shell[1924]: Can't update stage views actor <unnamed>[<MetaWindowActorX11>:0x581e1becc270] is on because it needs an allocation.
lut 18 11:38:22 player gnome-shell[1924]: Can't update stage views actor <unnamed>[<MetaSurfaceActorX11>:0x581e18b87430] is on because it needs an allocation.

These three messages repeat at the speed of about 30 message per second (90 per second in total) until the browser is killed.

Based on this Gnome shell issue it might be related but given the fact that issue is old I think it’s a coincidence.

Started some time at the beginning of February 2024.

How to reproduce:

  • Start the playback on YouTube Music and attempt to close the tab
  • Make an edit in Gmail and attempt to close the tab before the app saves the changes
  • Hit the browser back button in one of the above scenarios

Can reproduce on:

  • Arch Linux with Gnome 45.4 and Brave 121.1.62.165 (started happening a few versions back)
    • with NVIDIA GPU and Brave running on native Xorg
    • with AMD GPU and Brave running on XWayland

Can NOT reproduce on:

  • Linux, same details as above
    • with AMD GPU and Brave running on native Wayland (--ozone-platform-hint=auto)
  • Windows, no matter Brave version

A very poor quality recording of the behaviour can be found here.

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