Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

background permission revoked SyncThingy might not work as expected! #6

Closed
jjorstad2 opened this issue Sep 6, 2022 · 30 comments
Closed

Comments

@jjorstad2
Copy link

This is happens on my steam deck whenever I go in desktop mode. I get a pop up every time SyncThingy opens saying background permission revoked SyncThingy might not work as expected!. My question is how do I ix this I have no clue how to restore the permission. I have tried to reinstalling it and it still comes up. I have searched google about the issue and all I can find is about Android having this problem. Any help would be appreciated. Thanks for you time.

@zocker-160
Copy link
Owner

zocker-160 commented Sep 6, 2022

you need to install Flatseal from the Discover store and reset the permissions.

When restarting Synthingy it will then ask you for the background permission, which you have to allow, otherwise the application will exit within a few minutes.

here is a small clip, which recreates your situation, I hope this helps:

Peek.2022-09-06.15-49.mp4

@zocker-160 zocker-160 pinned this issue Sep 6, 2022
@jjorstad2
Copy link
Author

That worked thank you.

@trymeouteh
Copy link

When I select Syncthingy in Flatseal, the Rest button is greyed out. I even tried editing a few permissions and clicking the reset button but I still get the revoked error. Just installed Syncthingy a few days ago.

@zocker-160
Copy link
Owner

zocker-160 commented Sep 13, 2022

@trymeouteh scroll all the way down and enable the Background switch. If that still does not work, then I need more information about your system, is it also a Steam Deck?

@trymeouteh
Copy link

trymeouteh commented Sep 13, 2022

All of the portals including Background is greyed out and therefore I am unable to enable Background permission. I am using Linux Mint 21

@zocker-160
Copy link
Owner

understood, can you please make sure that you have xdg-desktop-portal installed and running (systemctl --user status xdg-desktop-portal)?

@trymeouteh
Copy link

When running this command in the terminal it does show it is stalled and is active (running)

@zocker-160
Copy link
Owner

stalled is not good, it should look like this:
Screenshot_20220914_000314

@trymeouteh
Copy link

Looks exactly like that except for the timestamp after active (running)

@zocker-160
Copy link
Owner

ok weird, then I sadly do not know, why it doesn't work :(

@trymeouteh
Copy link

Not sure if installing Linux Mint 21 in a VM like virtualbox and then installing the syncthingy flatpak will reproduce the same issue on your end. My Linux Mint 21 install is fresh and was installed recently.

@zocker-160
Copy link
Owner

I will try to reproduce it on a laptop and report back.

@zocker-160
Copy link
Owner

Small update: I sadly could only test on Mint 20.3 on my laptop, but there it works just fine.

@trymeouteh
Copy link

Syncthingy did work for me on Mint 20.3 before I installed Mint 21. I did not upgrade to version 21, I downloaded the ISO and installed it fresh. Something tells me there is something to do with Mint 21

@zocker-160
Copy link
Owner

ok I will do a fresh install tomorrow then, I think it would be good to find out what is going on and report to the Linux Mint team.

@zocker-160
Copy link
Owner

zocker-160 commented Sep 14, 2022

@trymeouteh
another update from my side: I upgraded to Mint 21 and I can indeed reproduce the issue.

It is especially weird, because if I reset all permissions and then start SyncThingy it does (correcly) ask the user to grant the background permission, so the portal does work, but even if I press accept, it says permission revoked.

Super strange and to me this is clearly a bug in Mint 21.

EDIT: it does not appear to affect the usability though, so apart from the wrong message, it should be all working

@trymeouteh
Copy link

Syncthing in Syncthingy works, but the Synthingy settings do not work such as autostart and disabling notifications.

@qrhfz
Copy link

qrhfz commented Oct 20, 2022

Syncthingy did work for me on Mint 20.3 before I installed Mint 21. I did not upgrade to version 21, I downloaded the ISO and installed it fresh. Something tells me there is something to do with Mint 21

i'm on mint 21 too

@zocker-160
Copy link
Owner

zocker-160 commented Oct 20, 2022

This is something Linux Mint has to fix, there is sadly nothing I can do about it.

I just wonder why it did work with Mint 20.x and then stopped working with 21.

@husim0
Copy link

husim0 commented Nov 28, 2022

Hello, same problem using Kubuntu 22.04. It worked at the beggining when I installed it but it doesn't work anymore and resetting permissions using Flatseal does not work unfortunately (nor reinstalling Syncthing).

@zocker-160
Copy link
Owner

Did you try a reboot?
Can you make sure the xdg-desktop-portal service is running?

I am on Kubuntu 22.04 as well and it works fine for me.

@husim0
Copy link

husim0 commented Nov 30, 2022

Hello, yep, I rebooted, the Syncthing message is the same ("revoked permission"), and it doesn't ask any permission.

Actually the package xdg-desktop-portal isn't installed on my machine (Kubuntu minimal edition). I installed it, same problem, but I can't reboot right now, I'll try to do it and then tell you what's happening.

Thank you!

@zocker-160
Copy link
Owner

Understood, you will need xdg-desktop-portal and xdg-desktop-portal-kde installed.

I never tried the minimal edition, so it could be possible that those are missing by default.

@husim0
Copy link

husim0 commented Dec 1, 2022

Hello, thanks a lot! It's working now!

I had indeed to install both xdg-desktop-portal and xdg-desktop-portal-kde.

After reboot, Syncthing doesn't complain anymore.

@ldx63
Copy link

ldx63 commented Apr 2, 2023

Hi all,
I comment this thread because the issue affects me, even after installing xdg-desktop-portal and xdg-desktop-portal-kde, rebooting, resetting with Flatseal, etc.
Service xdg-desktop-portal is running (green).
Not a big issue, but a bit annoying.
Kind regards
Aldo

@zocker-160
Copy link
Owner

@ldx63 (and anybody with the same issue for that matter)

There is sadly nothing I can do about that.

With Flatpak I have to use the xdg background portal in order to request autostart and background permissions. That portal has to be implemented by the distribution you are using.

If you can reliably reproduce that issue on a specific distro, you should report an issue to the maintainers of that distro.

Linux Mint 21 would be one example, which lacks a background portal implementation. (relevant links to issues can be found in comments above)

@ldx63
Copy link

ldx63 commented Apr 3, 2023

@zocker-160 thanks for your reply. Yes indeed it's a Linux Mint 21 issue.
I'll try to report the bug there.
Kind regards
Aldo

@zocker-160
Copy link
Owner

zocker-160 commented Apr 3, 2023

@ldx63 It has already been reported to the Linux Mint devs, it is on their TODO
linuxmint/linuxmint#530 (comment)

EDIT: app should still work on Mint 21 regardless of error message though

@dongdongbh
Copy link

dongdongbh commented Sep 4, 2023

I encounter the same error on Ubuntu 22.04. I'm using bspwm without a desktop environment. xdg-desktop-portal is installed. When I select Syncthingy in Flatseal, the Rest button is greyed out. Background butten is also greyed out.

flatpak run com.github.zocker_160.SyncThingy
Syncthing does not seem to be running, starting own instance
/app/bin/syncthing
Background / Autostart permission revoked
syncthing is not running
quit triggered

@zocker-160
Copy link
Owner

@dongdongbh
IIRC on Ubuntu you will also need one of xdg-desktop-portal-kde, xdg-desktop-portal-gtk or xdg-desktop-portal-gnome additionally to the xdg-desktop-portal package,

I hope that fixes it for you. If not then there is sadly nothing really I can do, because I sadly have to fully rely on the xdg portal for the background permission, because otherwise the process will simply get killed after a few seconds (like it did for you).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants