Closed fnune closed 1 year ago
I probably could add more hints to the error, but it basically means that the portal is rejecting the background permission request (or xdp-desktop-portal
is not even installed).
Speaking technically, ff no error is print in CLI then it means that the portal simply returned a false
for the request or an Gio.IOErrorEnum.CANCELLED
error was raised (in this context it means that the user cancelled the request).
Could you try going to GNOME Settings > Applications > Forge Sparks and see if the background permission is active? If is disabled enabled it and try again in the app.
=> sudo apt install xdg-desktop-portal
[sudo] password for fausto:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
xdg-desktop-portal is already the newest version (1.18.0-1).
xdg-desktop-portal set to manually installed.
It was installed, it seems.
Looks like the permission was enabled:
Hmm, seems odd. I can reproduce the failure If I disable Run in Background
in GNOME Settings and it works again after re-enabling.
If it fails for you, then something strange is happening. You could try using Flatseal and use its reset permission button in Forge Sparks to fix any possible weirdness.
I installed Flatseal and reset the permissions for Forge Sparks, and then gave it back the Background permission. The problem persists.
Happy to provide more technical info, but I don't know where to look to for logs.
Thanks, seems a hard thing to debug 😅.
Can you give me info about your system setup? So I can try to setup a virtual machine and see if the problem is reproducible from there.
Debian sid:
=> uname -a
Linux melian 6.5.0-1-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.5.3-1 (2023-09-13) x86_64 GNU/Linux
=> cat /etc/apt/sources.list
deb http://deb.debian.org/debian/ sid main non-free-firmware contrib
deb-src http://deb.debian.org/debian/ sid main non-free-firmware contrib
I installed Flatpak/Flathub like so:
sudo apt install -y flatpak gnome-software-plugin-flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Forgot about this:
=> echo $XDG_SESSION_TYPE
x11
I'm sure you already have this in mind, but just to be on the same page: https://github.com/rafaelmardojai/forge-sparks/blob/5e367671dd3e1f94eedcba8745a1e38e9bdfe823/src/util.js#L40-L75
Perhaps e.code === Gio.IOErrorEnum.CANCELLED
but the message is still interesting.
Well, installed Debian, flatpak and Forge Sparks and everything worked fine.
The only likely difference with your setup is that I updated to sid after testing because I totally forgot 😅. But things still worked.
So this is really weird... Do you have xdg-desktop-portal-gnome
installed right? I'm out of ideas. Have you tried uninstalling and installing it back removing ~/.var/app/com.mardojai.ForgeSparks
in the process?
Btw, also tried in the X11 session and all was fine.
Okay! Installing xdg-desktop-portal-gnome
and restarting my computer fixed it!
To confirm, I uninstalled the package and rebooted again, and Forge Sparks was broken.
Now I'm wondering why this package wasn't part of my installation from the beginning. This computer's Gnome was installed using the system installer that ships with Debian...
Thank you for helping me figure this out.
If I run via CLI I don't really see any logs related to it:
I'm on GNOME 44.5.