Brave don't start on EndeavourOS / glib-gobject ERROR


Hi , i have installed brave on EndeavourOS and it works great so far using the AUR brave-bin and the nightly version on KDE plasma , but when switching to other DE/WM like xfce and qtile it stop working it don’t start at all . -on all AUR versions-

and here what i get when i try to start it on xfce and qtile

$ brave-nightly 
[470702:470702:0128/001210.940024:ERROR:browser_main_loop.cc(278)] GLib-GObject: cannot register existing type 'GtkWidget'
[470702:470702:0128/001210.940050:ERROR:browser_main_loop.cc(278)] GLib-GObject: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
[470702:470702:0128/001210.940058:ERROR:browser_main_loop.cc(278)] GLib-GObject: cannot register existing type 'GtkBuildable'
[470702:470702:0128/001210.940063:ERROR:browser_main_loop.cc(278)] GLib-GObject: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed
[470702:470702:0128/001210.940071:ERROR:browser_main_loop.cc(278)] GLib: g_once_init_leave_pointer: assertion 'result != 0' failed
[470702:470702:0128/001210.940076:ERROR:browser_main_loop.cc(278)] GLib-GObject: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
[470702:470702:0128/001210.940080:ERROR:browser_main_loop.cc(278)] GLib-GObject: g_type_register_static: assertion 'parent_type > 0' failed

and now i am running brave-nightly-bin 1.76.30-1
regards

Linux OS user @Emilio2022 uses EndeavourOS, and maybe he can help(?):

Brave crashing on fedora 41 - #6 by Emilio2022

i have actually solve it with this wrapper

#!/bin/bash
export SSH_AUTH_SOCK

# Set all necessary environment variables
export GDK_BACKEND=x11
export CHROME_WRAPPER=/usr/lib/brave-nightly/brave
export GTK_USE_PORTAL=1
export XDG_CURRENT_DESKTOP=KDE
export QT_QPA_PLATFORMTHEME=qt5ct

# Launch Brave
brave-nightly "$@"

but now there is the secone part of the problem which is brave log me out of all accounrts that i have logged in , seems like a prblem with kwallet .

./brave-wrapper.sh
[150429:150429:0128/123150.329818:ERROR:object_proxy.cc(576)] Failed to call method: org.kde.KWallet.isEnabled: object_path= /modules/kwalletd: org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
[150429:150429:0128/123150.329894:ERROR:kwallet_dbus.cc(117)] Error contacting kwalletd (isEnabled)
[150429:150429:0128/123150.330100:ERROR:object_proxy.cc(576)] Failed to call method: org.kde.KLauncher.start_service_by_desktop_name: object_path= /KLauncher: org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
[150429:150429:0128/123150.330113:ERROR:kwallet_dbus.cc(86)] Error contacting klauncher to start kwalletd
[150429:150429:0128/123150.330247:ERROR:object_proxy.cc(576)] Failed to call method: org.kde.KWallet.close: object_path= /modules/kwalletd: org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
[150429:150429:0128/123150.330257:ERROR:kwallet_dbus.cc(412)] Error contacting kwalletd (close)
[150429:150473:0128/123151.009180:ERROR:mime_util_xdg.cc(137)] Invalid mime.cache file does not contain null prior to ALIAS_LIST_OFFSET=44
Error: unrecognized flag --no-expose-wasm
Try --help for options

i feel like they made it only to be used on KDE non other desktop environment