zocker-160 / SyncThingy

SyncThingy = Syncthing + simple tray indicator
GNU General Public License v3.0
100 stars 0 forks source link

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

Closed jjorstad2 closed 1 year ago

jjorstad2 commented 1 year ago

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 commented 1 year ago

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:

https://user-images.githubusercontent.com/36563538/188652814-12bb2291-fca0-453d-8d80-56e0d008fac7.mp4

jjorstad2 commented 1 year ago

That worked thank you.

trymeouteh commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

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

trymeouteh commented 1 year ago

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

zocker-160 commented 1 year ago

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

trymeouteh commented 1 year ago

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

zocker-160 commented 1 year ago

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

trymeouteh commented 1 year ago

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 commented 1 year ago

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

zocker-160 commented 1 year ago

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

trymeouteh commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

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

qrhfz commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

Hi all, I comment this thread because the issue affects me, even after installing xdg-desktop-portaland 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 commented 1 year ago

@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 commented 1 year ago

@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 commented 1 year ago

@ldx63 It has already been reported to the Linux Mint devs, it is on their TODO https://github.com/linuxmint/linuxmint/issues/530#issuecomment-1284248739

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

dongdongbh commented 10 months ago

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 commented 10 months ago

@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).