Can't signin to Matrix; element-desktop not getting to browser for authentication

Ubuntu Version:
Ubuntu 25.10 (multi-desktop install; don’t believe that’s a factor though)

Desktop Environment (if applicable):
I’m using LXQt, but also have GNOME, Xfce …

Problem Description:

This issue happened weeks ago, I was disconnected (as was I think everyone) from Ubuntu servers, and I’ve been unable to reconnect on my primary box. Delay in asking is mostly my release wasn’t stable and thus on-topic here earlier (Ubuntu 25.10).

If I run element-desktop (even at terminal) it opens as expected, but wants me to login. I can click signin and change from matrix.org to ubuntu.com and all looks okay, until I click the “CONTINUE WITH SAML” which is as far I get… It opens a window “Go to your browser to complete Sign In”, but here is where I’m stuck.

Default browser should be firefox (standard snap package), but if its not running, it doesn’t start & I get nothing… I also have chromium and opera installed; they don’t open, and if running, no new tabs are started…

How can I work out what URL/Link I can enter in my browser to complete the SSO login that the element-desktop package is seeking… so I can bypass the problem I have? OR better yet fix the problem :slight_smile:

Screenshots or Error Messages:

If I run snap run element-desktop --enable-logging=stderr --v=1 the output looks normal, UNTIL i get to the “Go to your browser to complete Sign In” window/dialog

[493069:1010/124422.770192:INFO:CONSOLE:1] "element-web closing", source: vector://vector/webapp/bundles/7c26c7d29cfa110f02e3/init.js (1)
[493069:1010/124422.799307:ERROR:content/browser/zygote_host/zygote_host_impl_linux.cc:283] Failed to adjust OOM score of renderer with pid 493641: Permission denied (13)

A message can also be seen in dmesg

[359267.265278] audit: type=1400 audit(1760060766.376:11218): apparmor="DENIED" operation="open" class="file" profile="snap.element-desktop.element-desktop" name="/proc/493854/oom_score_adj" pid=493069 comm="ThreadPoolSingl" requested_mask="wc" denied_mask="wc" fsuid=1000 ouid=1000

( I can of course provide whatever more is helpful; eg. Ubuntu Pastebin from awhile ago, created for a question on snapcraft forum, but it was never asked as it felt off-topic given support specific )

What I’ve Tried:

A number of things, but nothing I could think of helped. This is a box/install specific problem, as I’ve repeated what I describe here on newer [QA] installs and experience no issues.

Software versions:

Snap packages involved

element-desktop         1.12.0                           178    latest/stable    ken-vandine✪          -
firefox                 143.0.3-1                        6933   latest/stable/…  mozilla✓              -

( even opera & chromium are snap packaged, but default browser is firefox )

I’d like to see the output from each of:

snap connections element-desktop

and

snap connections firefox

Bear in mind that both need to be connected to password-manager-service somehow, and by installing several desktop environments, particularly Plasma or GNOME, that you’ll end up in a situation where your password manager may be either gnome-keyring or kwallet depending on which one got installed last. All that to say you might have conflicting password managers and the snap might be confused.

1 Like
guiverc@d7050-next:~$   snap connections element-desktop
Interface                 Plug                                      Slot                            Notes
audio-playback            element-desktop:audio-playback            :audio-playback                 -
audio-record              element-desktop:audio-record              :audio-record                   -
camera                    element-desktop:camera                    :camera                         -
content[gnome-46-2404]    element-desktop:gnome-46-2404             gnome-46-2404:gnome-46-2404     -
content[gpu-2404]         element-desktop:gpu-2404                  mesa-2404:gpu-2404              -
content[gtk-3-themes]     element-desktop:gtk-3-themes              gtk-common-themes:gtk-3-themes  -
content[icon-themes]      element-desktop:icon-themes               gtk-common-themes:icon-themes   -
content[sound-themes]     element-desktop:sound-themes              gtk-common-themes:sound-themes  -
desktop                   element-desktop:desktop                   :desktop                        -
desktop-legacy            element-desktop:desktop-legacy            :desktop-legacy                 -
gsettings                 element-desktop:gsettings                 :gsettings                      -
home                      element-desktop:home                      :home                           -
network                   element-desktop:network                   :network                        -
opengl                    element-desktop:opengl                    :opengl                         -
password-manager-service  element-desktop:password-manager-service  :password-manager-service       manual
process-control           element-desktop:process-control           -                               -
removable-media           element-desktop:removable-media           -                               -
screen-inhibit-control    element-desktop:screen-inhibit-control    :screen-inhibit-control         -
shared-memory             element-desktop:shmem                     :shared-memory                  -
unity7                    element-desktop:unity7                    :unity7                         -
wayland                   element-desktop:wayland                   :wayland                        -
x11                       element-desktop:x11                       :x11                            -
guiverc@d7050-next:~$   snap connections firefox
Interface               Plug                             Slot                            Notes
alsa                    firefox:alsa                     -                               -
audio-playback          firefox:audio-playback           :audio-playback                 -
audio-record            firefox:audio-record             :audio-record                   -
avahi-observe           firefox:avahi-observe            :avahi-observe                  -
browser-support         firefox:browser-sandbox          :browser-support                -
camera                  firefox:camera                   :camera                         -
content[gnome-42-2204]  firefox:gnome-42-2204            gnome-42-2204:gnome-42-2204     -
content[gtk-3-themes]   firefox:gtk-3-themes             gtk-common-themes:gtk-3-themes  -
content[icon-themes]    firefox:icon-themes              gtk-common-themes:icon-themes   -
content[sound-themes]   firefox:sound-themes             gtk-common-themes:sound-themes  -
cups-control            firefox:cups-control             :cups-control                   -
dbus                    -                                firefox:dbus-daemon             -
desktop                 firefox:desktop                  :desktop                        -
desktop-legacy          firefox:desktop-legacy           :desktop-legacy                 -
gsettings               firefox:gsettings                :gsettings                      -
hardware-observe        firefox:hardware-observe         :hardware-observe               -
home                    firefox:home                     :home                           -
joystick                firefox:joystick                 :joystick                       -
login-session-observe   firefox:login-session-observe    :login-session-observe          -
mount-control           firefox:host-hunspell            :mount-control                  -
mount-observe           firefox:mount-observe            :mount-observe                  -
mpris                   -                                firefox:mpris                   -
network                 firefox:network                  :network                        -
network-bind            firefox:network-bind             :network-bind                   -
network-observe         firefox:network-observe          -                               -
opengl                  firefox:opengl                   :opengl                         -
pcscd                   firefox:pcscd                    -                               -
personal-files          firefox:dot-mozilla-firefox      :personal-files                 -
removable-media         firefox:removable-media          :removable-media                -
screen-inhibit-control  firefox:screen-inhibit-control   :screen-inhibit-control         -
system-files            firefox:etc-firefox              :system-files                   -
system-files            firefox:host-usr-share-hunspell  :system-files                   -
system-packages-doc     firefox:system-packages-doc      :system-packages-doc            -
u2f-devices             firefox:u2f-devices              :u2f-devices                    -
unity7                  firefox:unity7                   :unity7                         -
upower-observe          firefox:upower-observe           :upower-observe                 -
wayland                 firefox:wayland                  :wayland                        -
x11                     firefox:x11                      :x11                            -

It was working perfectly, until shortly after we had the ~ten days of problems here on UD, then just after that matrix issues where I was disconnected & unable to log back in on this box. Whilst it’s possible I made a change & did something stupid, I don’t think so. Thanks Erich.

I have a couple of shot-in-the-dark ideas here. Let’s start with one:

sudo snap connect firefox:pcscd

If that doesn’t work, I’d like to see the output of the following:

update-alternatives --get-selections | grep www

And remember to put output in code blocks, not block quotes. :slight_smile:

1 Like

first command made no difference, but output of the second is NOT what I expected at all…

guiverc@d7050-next:~$   update-alternatives --get-selections | grep www
gnome-www-browser              auto     /usr/bin/vivaldi-stable
www-browser                    auto     /usr/bin/lynx
x-www-browser                  auto     /usr/bin/vivaldi-stable

I didn’t think I had vivaldi installed; but turns out I do…

guiverc@d7050-next:/de2900/lubuntu_64$   dpkg -l |grep vival
ii  vivaldi-stable                                      7.6.3797.63-1                              amd64        Experience the web in a whole new way with Vivaldi.

Chromium recently made it a pita to use adblockers; so I must have installed that about that time to explore switching to it (ended up switching to opera instead). I suspect you’ve found my problem !

1 Like

Yep, looks like it. Just configure your alternatives to use firefox.

I’ve run

sudo update-alternatives --config x-www-browser
sudo update-alternatives --config gnome-www-browser

and the output is now what I expect from your command (alas manual not auto)

guiverc@d7050-next:~$   update-alternatives --get-selections | grep www
gnome-www-browser              manual   /usr/bin/firefox
www-browser                    auto     /usr/bin/lynx
x-www-browser                  manual   /usr/bin/firefox

Exiting firefox and element-desktop & restarting [those apps] didn’t get my wanted (firefox tab opening asking me to login), but if settings being used are old (thus needing me to logout/login) I’ll have to wait to try that. I’m currently waiting for @bashing-om to appear to review 25.10’s fridge post, and don’t want to close the reminder.windows I currently have open on that incomplete task. If I’ve forgotten something though; feel free to remind me… (will be heading out to walk pup now, but I’ll return). Thanks (again) Erich.

( dpkg -S /usr/bin/firefox shows firefox: /usr/bin/firefox as result; apt policy firefox shows 1:1snap1-0ubuntu7 and the Ubuntu package I’d expect, so don’t expect I’ve polluted that )

1 Like

You’ve fixed a (default browser) problem I hadn’t even detected I had, alas this issue appears to be unchanged.

I’ve rebooted, but am getting the same…

On clicking connect via SAML on terminal I see

[15383:1011/104037.108690:INFO:CONSOLE:1] "element-web closing", source: vector://vector/webapp/bundles/7c26c7d29cfa110f02e3/init.js (1)
[15383:1011/104037.113324:ERROR:content/browser/zygote_host/zygote_host_impl_linux.cc:283] Failed to adjust OOM score of renderer with pid 15592: Permission denied (13)

The following are what appear to be added to the dmesg output

[ 4275.960974] audit: type=1326 audit(1760139604.111:938): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.element-desktop.element-desktop pid=15457 comm="element-desktop" exe="/snap/element-desktop/178/opt/Element/element-desktop" sig=0 arch=c000003e syscall=330 compat=0 ip=0x72ffe88b52fb code=0x50000
[ 4275.960980] audit: type=1326 audit(1760139604.111:939): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.element-desktop.element-desktop pid=15456 comm="element-desktop" exe="/snap/element-desktop/178/opt/Element/element-desktop" sig=0 arch=c000003e syscall=330 compat=0 ip=0x75fee511c2fb code=0x50000
[ 4275.962166] audit: type=1326 audit(1760139604.112:940): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.element-desktop.element-desktop pid=15383 comm="element-desktop" exe="/snap/element-desktop/178/opt/Element/element-desktop" sig=0 arch=c000003e syscall=444 compat=0 ip=0x79fba277025d code=0x50000
[ 4275.963724] audit: type=1326 audit(1760139604.114:941): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.element-desktop.element-desktop pid=15383 comm="element-desktop" exe="/snap/element-desktop/178/opt/Element/element-desktop" sig=0 arch=c000003e syscall=141 compat=0 ip=0x79fba276662b code=0x50000
[ 4275.966318] audit: type=1326 audit(1760139604.116:942): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.element-desktop.element-desktop pid=15383 comm="element-desktop" exe="/snap/element-desktop/178/opt/Element/element-desktop" sig=0 arch=c000003e syscall=425 compat=0 ip=0x79fba277025d code=0x50000
[ 4275.966323] audit: type=1326 audit(1760139604.116:943): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.element-desktop.element-desktop pid=15383 comm="element-desktop" exe="/snap/element-desktop/178/opt/Element/element-desktop" sig=0 arch=c000003e syscall=141 compat=0 ip=0x79fba276662b code=0x50000
[ 4275.966325] audit: type=1326 audit(1760139604.116:944): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.element-desktop.element-desktop pid=15383 comm="element-desktop" exe="/snap/element-desktop/178/opt/Element/element-desktop" sig=0 arch=c000003e syscall=425 compat=0 ip=0x79fba277025d code=0x50000
[ 4275.966471] audit: type=1326 audit(1760139604.116:945): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.element-desktop.element-desktop pid=15383 comm="element-desktop" exe="/snap/element-desktop/178/opt/Element/element-desktop" sig=0 arch=c000003e syscall=425 compat=0 ip=0x79fba277025d code=0x50000
[ 4276.956343] audit: type=1400 audit(1760139605.106:946): apparmor="DENIED" operation="open" class="file" profile="snap.element-desktop.element-desktop" name="/etc/xdg/xdg-Lubuntu/gtk-3.0/settings.ini" pid=15383 comm="element-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 4277.071480] audit: type=1107 audit(1760139605.221:947): pid=1634 uid=996 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/" interface="org.freedesktop.DBus.ObjectManager" member="GetManagedObjects" mask="send" name="org.bluez" pid=15383 label="snap.element-desktop.element-desktop"
                exe="/usr/bin/dbus-daemon" sauid=996 hostname=? addr=? terminal=?'

I’m thinking of purging element-desktop, then ensure i delete all traces of it (I find) on my SSD, then re-installing app & try again (later when I can). Any other thoughts are of course welcome, it maybe awhile before I can return.

You, my friend, have an apparmor issue. Here’s my clue:

audit: type=1400 audit(1760139605.106:946): apparmor="DENIED" operation="open" class="file" profile="snap. Element-desktop. Element-desktop" name="/etc/xdg/xdg-Lubuntu/gtk-3.0/settings.ini" pid=15383 comm="element-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

Not sure how to fix that. You could try installing apparmor-profiles and apparmor-profiles-extra to see if that takes care of it.

1 Like

I didn’t find easy any apparmor difference or fix

guiverc@d7050-next:/etc/apparmor.d$   diff element-desktop /de2900/lan/guiverc/element-desktop.apparmor_profile_d780-2510 
guiverc@d7050-next:/etc/apparmor.d$    

so I’ve bypassed my issue by just copying the $HOME/snap/element-desktop directory from that d780 machine I did some QA testing on (where it worked without issue) onto this box (d7050) and I’m back using element-desktop on this machine/install.

I fear this box may still have some apparmor issue, but the only issue I was aware of no longer exists.

Thanks @eeickmeyer for your support (once again!)

Can you run this and let us know if your browser is opening?

xdg-open ubuntu.com
1 Like
guiverc@d7050-next:~/snap/element-desktop$   xdg-open ubuntu.com
Cannot access ubuntu.com: No such file or directory

guiverc@d7050-next:~/snap/element-desktop$   xdg-open http://ubuntu.com
Gtk-Message: 17:10:44.247: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.

error as per ^ on xdg-open ubuntu.com

but if I use xdg-open http://ubuntu.com a new tab opens in the my existing firefox window here, and the “Gtk-Message: 17:10:44.247:” message that shows appears (that I don’t believe is a concern), the prompt quickly returns awaiting next command.

This is probably because the local xdg-open is an updated version that doesn’t require the protocols. But anyway, this is wierd. Let me try with my installation.

@guiverc I was logged out of my matrix account and I logged in again today, and I couldn’t reproduce this. Will it be possible for you to try clearing your data?

1 Like

As per this post in this thread, I’m logged in now on this box, because I erased everything, then copied $HOME/snap/element-desktop from one of the boxes that I explored the issue on; that box and others I experimented on had no issues with matrix login; none of those boxes being used before with matrix either.

I have since logged out, exited app, then

  • snap remove element-desktop
  • sudo rm /snap/element-des* -rf
  • rm ~/snap/element-desktop/* -rf
    which possibly qualifies as “clearing your data” and the issue is still there (after re-installing the element-desktop app)

Element desktop starts (I copy/paste a command (snap connect something, sorry I spaced out the command so it’s not in my .bash_history) it tells me to run, then accept weaker encryption), and on this box when I switch to ubuntu.com & click the “Continue with SAML” I’m not getting a window/tab open on firefox on this box.

[124390.556734] audit: type=1400 audit(1760408177.732:4659): apparmor="DENIED" operation="open" class="file" profile="snap.element-desktop.element-desktop" name="/proc/101903/oom_score_adj" pid=101602 comm="ThreadPoolSingl" requested_mask="wc" denied_mask="wc" fsuid=1000 ouid=1000

appears at the end of dmesg output…

Alas I’ve lost access to matrix on this box (again), and restoring data as described at Can't signin to Matrix; element-desktop not getting to browser for authentication - #10 by guiverc didn’t work; but that data is now a couple of days old, so I may need to boot other machine & create newer copy (or I’ve missed something today)


Update: Connected again on this box; signing out appears to have signed me out of all boxes… so I had to go login on another box (where browser would open), then I could copy data back onto this box and I was ‘logged’ in here again.

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