Can't use firefox any more (A-06)

Devterm a-06
I don’t know if it is related to the update I did as in this thread:

But now I can not not use firefox any more.
However immediately after update firefox worked ok, and I haven’t changed anyhing since then so I don’t know.
If I click menu and “Web Browser” I get message:
Failed to execute default Web Browser.
Input/output error.
If I click menu and “Internet → Firefox Web Browser” then nothing happens at all.
If I type command firefox in the terminal I get response:
/user.slice/user-1000.slice/session-c2.scope is not a snap cgroup
which I don’t understand at all.

What has happened here?
Why did firefox suddenly stop working?
How to restore it to work again?

ETA:
trying to reinstall sudo apt-get reinstall firefox did not help.
however the reinstall said:
snap "firefox" is already installed so I’m not sure if the reinstall was really performed.

Try running the following in a terminal. I had the same problem and this worked for me.

sudo apt-get install dbus-user-session
systemctl --user start dbus.service
cd ~
mv .mozilla .mozilla_backup
mv snap/firefox snap/firefox_backup
firefox

Edit: at this point, your thermal printer probably doesn’t work either. You’ll need to apply this fix and restart cups (or just reboot, I guess).

Thank you, this indeed helped (but after reboot).
I would like to know what was the actual problem and why it is fixed this way.

Yes, indeed I had to do also the thing to recover the printer.
Initially I didn’t notice the problem with printer because writing directly to /tmp/DEVTERM_PRINTER_IN still worked.

I’m not entirely sure. I just googled the error message and saw that it has happened when upgrading ubuntu and transitioning to snap packages. I guess dbus is a dependency of snap but it isn’t marked as such in the repo.

The new Ubuntu LTS installs Firefox into snap which is kind of a self contained package where the firefox binaries are located, instead of your filesystem.

https://www.addictivetips.com/ubuntu-linux-tips/how-to-disable-firefox-snap-package-in-ubuntu-22-04-lts/

Most people didn’t like that change.