WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] brave-browser: popup menus disappear when any menu item is left-clicked  (Read 4101 times)

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1378
The behavior is observed when running brave-browser on TCL12 x86_64 or TCL11.1 x86_64 with Xorg (Xvesa doesn't work with my hardware, so I can't test it). Other tested browsers (e.g., firefox, chromium) do not have this problem. The same exact brave-browser binary running on a different OS (e.g., Devuan) on this same machine does not have this problem.

A quick and easy way to reproduce:
1. Load brave-browser.tcz
2. Start the browser and go to http://forum.tinycorelinux.net
3. Login to the forum
4. Hover over "My Messages" to activate the popup menu
5. Click on "Read your messages"
6. The menu disappears without taking you to messages section :-\

I've noticed the problem on multiple websites, so it is not a problem with the TCL forum site.

All the relevant software (Xorg, gtk3, the browser itself) is so complex that I'm at a loss how to even start troubleshooting this. Any ideas?
« Last Edit: May 04, 2021, 12:14:28 PM by Rich »

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11283
Hi GNUser
I would suggest the first thing to try is start the browser from a terminal and see if any errors/warnings pop up.

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1378
Hi, Rich. Good idea. Here you go:
Code: [Select]
$ brave-browser
[7145:7161:0503/213729.268753:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[7145:7145:0503/213729.623372:ERROR:browser_dm_token_storage_linux.cc(94)] Error: /etc/machine-id contains 0 characters (32 were expected).
[7145:7175:0503/213730.115130:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[7145:7175:0503/213730.115175:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[7145:7175:0503/213730.447046:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[7145:7175:0503/213730.447091:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[7145:7222:0503/213730.931778:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[7145:7222:0503/213730.931863:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[7145:7222:0503/213730.931977:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[7145:7222:0503/213730.932135:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[7145:7222:0503/213730.932199:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
These errors scroll by when first launching brave-browser. Once browser is running, no additional errors show up in the terminal. Also, no errors show up in the terminal when popup menus disappear.

BTW, launching chromium from the terminal shows the same errors and chromium doesn't have the problem I'm investigating, so I think the errors above are unrelated to my issue.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14622
Quite a few apps seem to use dbus if the daemon is running and issue warning messages if it is not running.

I don't think running dbus will fix your problem, but you could give it a try.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14622
...running brave-browser on TCL12 x86_64 or TCL11.1 x86_64 with Xorg (Xvesa doesn't work with my hardware, so I can't test it)

Xvesa is 32-bit only

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1378
Thanks, juanito. Having dbus running in the background does not help and, strangely, does not even cause the launch-time bus-related errors to go away:
Code: [Select]
$ s u d o /usr/local/etc/ini t.d/dbus start # spaces are to work around posting restrictions
$ pgrep -fa dbus
8886 /usr/local/bin/dbus-daemon --system
$ brave-browser
[8974:8974:0504/080909.931958:ERROR:browser_dm_token_storage_linux.cc(94)] Error: /etc/machine-id contains 0 characters (32 were expected).
[8974:9004:0504/080910.548014:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[8974:9004:0504/080910.548086:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[8974:9004:0504/080911.015212:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[8974:9004:0504/080911.015255:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[8974:9059:0504/080911.899521:ERROR:object_proxy.cc(621)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[8974:9059:0504/080911.900011:ERROR:object_proxy.cc(621)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[8974:9059:0504/080911.902608:ERROR:object_proxy.cc(621)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files

I did an internet search for flaky menu handling in chromium (browser on which brave is based) and some people solved it by going in browser's settings and unchecking "Use hardware acceleration when available". Alas, it made no difference for me.

[Rant follows: Kudos to the good folks creating a "small internet" (Gopher and Gemini) parallel to the WWW. When the WWW and browsers have become so complex that even just clicking on a menu is sometimes problematic, you know something is wrong. This issue is a good example of why the "small internet" folks are on to something. See https://en.wikipedia.org/wiki/Gemini_space]
« Last Edit: May 04, 2021, 05:45:23 AM by GNUser »

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1378
The troublesome menus may be related to how brave-browser handles PHP. Here's the HTML code for the forum's "My Messages" menu, for example:
Code: [Select]
<li id="button_pm">
<a class="firstlevel" href="http://forum.tinycorelinux.net/index.php?action=pm">
<span class="firstlevel">My Messages</span>
</a>
<ul>
<li>
<a href="http://forum.tinycorelinux.net/index.php?action=pm">
<span>Read your messages</span>
</a>
</li>
<li>
<a href="http://forum.tinycorelinux.net/index.php?action=pm;sa=send">
<span class="last">Send a message</span>
</a>
</li>
</ul>
</li>

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1378
The fact that this problem does not affect the very same brave-browser binary running in a different GNU/Linux OS seems to suggest that it's not a PHP or CSS issue. Maybe the issue has something to do with how TCL's Xorg informs applications about left-clicks?

I have a workaround for now: Pressing the middle mouse button opens the desired menu item in a new tab. It's not ideal but it's better than nothing.
« Last Edit: May 04, 2021, 06:07:39 AM by GNUser »

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1378
fluxbox is the culprit. When I tried running brave-browser in  flwm  the problem went away. Running brave-browser in Xorg without any window manager also works fine.

I've been using  fluxbox  too long to switch. I tried unchecking "Use system title bar and borders" in brave-browser but it doesn't help. fluxbox seems to somehow intercept and alter the left mouse click in a way that confuses brave-browser.

Is there a place other than ~/.fluxbox/keys where fluxbox looks for mouse button settings? Deleting ~/.fluxbox/keys and restarting fluxbox does not solve the problem.
« Last Edit: May 04, 2021, 06:38:21 AM by GNUser »

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11283
Hi GNUser
...
Code: [Select]
[8974:8974:0504/080909.931958:ERROR:browser_dm_token_storage_linux.cc(94)] Error: /etc/machine-id contains 0 characters (32 were expected).
This should fix that:
Code: [Select]
ln -s /var/lib/dbus/machine-id /etc/machine-idYou can read more about it and possible implications here:
https://forum.mxlinux.org/viewtopic.php?t=47482

Quote
Code: [Select]
[8974:9004:0504/080910.548014:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
This didn't turn up anything, but I do have a thought on its possible cause. The  ~/.xsession  file typically includes:
Code: [Select]
-nolisten tcpwhen it starts X (first line in file).

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1378
Thanks, Rich. Yes, the symlink made that particular error go away but makes no difference for my issue.

The issue seems to be that fluxbox affects the left mouse button in a way that brave-browser doesn't expect. I've filed a bug/support ticket with the fluxbox developers here:
https://sourceforge.net/p/fluxbox/bugs/1187/

In the meantime, if any fellow TCL+fluxbox users know how to tame fluxbox with regard to this issue, please do share.

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1378
Turns out this is one of those "second order" bugs that arise when a particular combination of applications is being used--in this case, fluxbox + certain versions of chromium (brave-browser is a chromium derivative):
https://bugs.chromium.org/p/chromium/issues/detail?id=713746

The workaround is to launch brave-browser with the "--disable-features=SendMouseLeaveEvents" flag:
Code: [Select]
$ brave-browser --disable-features=SendMouseLeaveEvents
Thread may be marked as solved :)

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11283
Hi GNUser
... certain versions of chromium (brave-browser is a chromium derivative): ...
What a coincidence. Searching on those  dbus  errors returned only  chromium  issues.

Fluxbox has 2 focus options,  Click To Focus  and  Mouse Focus (focus follows mouse).  Are you by any chance using
Mouse Focus?  If you are, I bet changing to  Click To Focus  also fixes it.

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1378
I had tried all of fluxbox's focus options to no avail.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11283
Hi GNUser
I saw a reference to  sloppy focus (focus follows mouse)  in the bug report you linked to causing the issue in a
different window manager (FVWM). Figured it might be an issue here too. Oh well.