flathub / com.skype.Client

https://flathub.org/apps/details/com.skype.Client
15 stars 34 forks source link

Have to sign in again each time I run Skype #131

Open WhyNotHugo opened 3 years ago

WhyNotHugo commented 3 years ago

Each time I start Skype, I get a notification:

You've been signed out of Skype. Launch the app to sign back in.

The text is very confusing (why does it tell me to launch the app immediately after I run the app!?).

That's Skype fault though. The real issue seems to be that something prevents the session from staying alive. My only override is the one below, since I obviously don't want Skype to have access to my entire filesystem:

$ cat ~/.local/share/flatpak/overrides/com.skype.Client
[Context]
filesystems=!home:ro;xdg-download:create

However, even giving it a persiste home does not help:

flatpak run --persist=home com.skype.Client
pizzadude commented 3 years ago

I have the same issue.

chrisemke commented 3 years ago

For me it happens every time I reboot my computer. Every time I reboot have to sign in again

WhyNotHugo commented 3 years ago

@chrisemke What about when you close Skype and open it again? For me that also forces me to log in again.

chrisemke commented 3 years ago

for me sometimes work fine sometimes i need to sign in again, so idk. I'm on manjaro minimal with KDE, flatpak 1.10.1, kernel 5.9.16-1-MANJARO

WhyNotHugo commented 3 years ago

I wonder if there's some service provided by the KDE desktop-portal that Skype relies on to keep sessions alive.

Not sure how to debug that though.

gasinvein commented 3 years ago

I believe --persist=home is erroneous. --persist, unlike --filesystem, doesn't have special values, so it just mounts ~/home (a directory named home in the home directory). If you wanted to make everything in the sandboxed home dir persistent, --persist=. would do it, but keep in mind that it's a very special case and generally shouldn't be used. Instead, the exact directories that Skype creates should be added with --persist= args.

WhyNotHugo commented 3 years ago

In any case, persisting $HOME doesn't seem to solve the issue here.

I'm not sure if something else needs to be persisted, or if KDE's portal is doing something that neither the wlr nor the gtk portal are doing.

xinyazhang commented 3 years ago

@WhyNotHugo According to #20 gnome-keyring is the crucial component. KDE iirc has its own solutions so it's unaffected.

WhyNotHugo commented 3 years ago

I am using gnome-keyring. I'm curious if any special setup is required. It's also working as a portal for my desktop:

$ cat /usr/share/xdg-desktop-portal/portals/gnome-keyring-for-sway.portal

[portal]
DBusName=org.freedesktop.secrets
Interfaces=org.freedesktop.impl.portal.Secret
UseIn=sway
Saijin-Naib commented 3 years ago

Same on Alpine Linux Edge v3.15 on Kernel 5.10.63.0-LTS with flatpak 1.10.3-r0.

WhyNotHugo commented 2 years ago

So far, this seems to happen in pretty much any environment except KDE (various distros, and DEs), so maybe exploring what KDE does different might yield some insight.


I've switched to using Skype with firejail. Firejail provides an isolation pretty close to what Flatpak does (and using all the same underlying APIs), but relies on system packages (e.g.: it does the isolation part, without replacing your package manager).

Surprisingly, with Firejail, Skype would close my session on startup until I allowed it to talk to org.kde.StatusNotifierWatcher. Allowing it to talk to that fixed getting logged out.

The Flatpak already has permission to talk to org.kde.StatusNotifierWatcher to it seems that I hit the same symptom with a completely unrelated cause.

WhyNotHugo commented 2 years ago

Skype saves logs to /home/hugo/.var/app/com.skype.Client/config/logs. I notice this error on the Flatpak that's not present in the Firejail version:

Error occurred in handler for 'keychain:get-password': [Error: user interaction failed]
Error occurred in handler for 'keychain:get-password': [Error: user interaction failed]
Error occurred in handler for 'keychain:get-password': [Error: user interaction failed]
Error occurred in handler for 'keychain:get-password': [Error: user interaction failed]
Error occurred in handler for 'keychain:delete-password': [Error: user interaction failed]

I'm pretty sure this is related to the forced logout, but don't really know what triggers it. This flatpak is configured to allow all access to org.freedesktop.secrets, so it should work. I understand flatpak has some special support for the secrets API, so maybe that's somehow behaving in an unexpected way here?

jivanpal commented 3 months ago

I'm affected by this on Pop OS 22.04. I just recently switched to the Flatpak version of Skype because the deb version has been discontinued, and this happens unpredictably across application restarts, not consistently across reboots. My logs show something different:

Error occurred in handler for 'keychain:get-password': Error: No stored credentials fetched from keytar.
    at /app/extra/skypeforlinux/resources/app.asar/main.js:2:533242
    at async node:electron/js2c/browser_init:193:551
Error occurred in handler for 'keychain:get-password': Error: No stored credentials fetched from keytar.
    at /app/extra/skypeforlinux/resources/app.asar/main.js:2:533242
    at async node:electron/js2c/browser_init:193:551
Error occurred in handler for 'keychain:get-password': Error: No stored credentials fetched from keytar.
    at /app/extra/skypeforlinux/resources/app.asar/main.js:2:533242
    at async node:electron/js2c/browser_init:193:551
Error occurred in handler for 'keychain:get-password': Error: No stored credentials fetched from keytar.
    at /app/extra/skypeforlinux/resources/app.asar/main.js:2:533242
    at async node:electron/js2c/browser_init:193:551

I have gnome-keyring installed natively (it's included with Pop OS) and I already manage my keyring and PGP keys through Seahorse (a.k.a. GNOME Passwords and Keys), and other native apps successfully use the keyring, including my previous native installation of Skype. However, after having deleted those old Skype secrets, Seahorse is not showing any new secrets stored for the Flatpak version of Skype at any time after (re-)logging in, whereas the deb/native installation that I used previously had stored two secrets in the keyring.

nerijus commented 3 months ago

In my case deleting ~/.config/skypeforlinux directory helped. I switched from rpm to flatpak.

Event-Horizon commented 1 month ago

Same issue on pop_os 22.04 flatpak randomly forgets login info.

jivanpal commented 1 month ago

I no longer seem to be experiencing this. I have no ~/.config/skypeforlinux directory, as I deleted it and reinstalled the Flatpak version of Skype when first trying to find out more info about this issue, before I posted my previous comment. At that time, the issue was still definitely present despite that old config directory not existing.

My current Skype version is 8.125.0.201.