I've debugged the issue and here is what is going on
* the report is a system one so ubuntu-bug is using sudo
* the environment is filtered which includes XDG_DATA_DIRS
* when XDG_DATA_DIRS is missing glib fallbacks to the standard path, /usr/share/applications
* there is no browser installed in this directory since we install firefox as a snap and the desktop is in /var/lib/snapd/desktop/applications
* gio fallbacks for some reason to use a text editor but could as well error out
The attached patch should fix the issue, I didn't confirm yet though
I've debugged the issue and here is what is going on
* the report is a system one so ubuntu-bug is using sudo applications snapd/desktop/ applications
* the environment is filtered which includes XDG_DATA_DIRS
* when XDG_DATA_DIRS is missing glib fallbacks to the standard path, /usr/share/
* there is no browser installed in this directory since we install firefox as a snap and the desktop is in /var/lib/
* gio fallbacks for some reason to use a text editor but could as well error out
The attached patch should fix the issue, I didn't confirm yet though