johnfactotum / foliate

Read e-books in style
https://johnfactotum.github.io/foliate/
GNU General Public License v3.0
6.15k stars 283 forks source link

Foliate doesn't retain OPDS credentials between sessions #877

Open Nitrousoxide opened 2 years ago

Nitrousoxide commented 2 years ago

Describe the bug Foliate fails to retain the OPDS credentials for my calibre server, even after selecting "remember my credentials" between sessions.

To Reproduce Steps to reproduce the behavior:

  1. Go to Catalogs
  2. Click on my user defined calibre server
  3. Input my calibre credentials, selecting to save them.
  4. Successfully browse and download files from my calibre server
  5. Close and restart Foliate
  6. Go to Catalogs again and attempt to browse my calibre server's OPDS server
  7. It asks for credentials again.

Expected behavior Foliate should retain credentials between sessions and not require the user to re-input them if they select to save them.

Version:

MartinJindra commented 2 years ago

I also have the same problem with my calibre server and foliate (flatpak). Does somebody anything how to fix this?

solarchemist commented 2 years ago

Log says CONSOLE SECURITY ERROR The Content Security Policy directive 'sandbox' is ignored when delivered via an HTML meta element..

To reproduce, open Foliate v2.6.4 from the terminal (installed from flatpak, on Ubuntu server Jammy in my case with no desktop environment, only i3wm) then open the "Catalogs" tab:

$ flatpak run -v com.github.johnfactotum.Foliate
F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path ~/.local/share/flatpak
F: Opening user flatpak installation at path ~/.local/share/flatpak
F: Skipping parental controls check for app/com.github.johnfactotum.Foliate/x86_64/stable since parental controls are disabled globally
F: Opening user flatpak installation at path ~/.local/share/flatpak
F: ~/.local/share/flatpak/runtime/org.gnome.Platform/x86_64/42/472b0f1f1b9d70b8e146872471c025bd1f8f04159ac48f36c0d56fbbc47f0a2e/files/lib32 does not exist
F: Cleaning up unused container id 2804035515
F: Cleaning up per-app-ID state for com.github.johnfactotum.Foliate
F: Cleaning up unused container id 2246310641
F: Cleaning up per-app-ID state for com.github.johnfactotum.Foliate
F: Cleaning up unused container id 4074144401
F: Cleaning up per-app-ID state for com.github.johnfactotum.Foliate
F: Cleaning up unused container id 714190434
F: Cleaning up per-app-ID state for com.github.johnfactotum.Foliate
F: Cleaning up unused container id 1957932517
F: Cleaning up per-app-ID state for com.github.johnfactotum.Foliate
F: Cleaning up unused container id 4072146261
F: Cleaning up per-app-ID state for com.github.johnfactotum.Foliate
F: Cleaning up unused container id 2242591553
F: Cleaning up per-app-ID state for com.github.johnfactotum.Foliate
F: Cleaning up unused container id 1986342852
F: Cleaning up per-app-ID state for com.github.johnfactotum.Foliate
F: Allocated instance id 4077311267
F: Add values in dir '/com/github/johnfactotum/Foliate/', prefix is '/com/github/johnfactotum/Foliate/'
F: Add defaults in dir /com/github/johnfactotum/Foliate/
F: Add locks in dir /com/github/johnfactotum/Foliate/
F: writing D-Conf values to ~/.var/app/com.github.johnfactotum.Foliate/config/glib-2.0/settings/keyfile
F: Allowing dri access
F: Allowing wayland access
CONSOLE SECURITY ERROR The Content Security Policy directive 'sandbox' is ignored when delivered via an HTML meta element.

I wonder if my user account needs to be a member of some group? (I recently installed Zoom flatpak, and that did not work until I added the audio group to my user). My user is currently member of the following groups:

$ id taha
uid=1000(taha) gid=1000(taha) groups=1000(taha),4(adm),24(cdrom),27(sudo),29(audio),30(dip),46(plugdev),110(lxd)

I hope these observations helps someone more knowledgeable to understand what exactly is the problem.

johnfactotum commented 9 months ago

It seems that this is specific to Flatpak.

Without Flatpak, WebKitGTK silently fails to save credentials if I don't unlock the keyring. So probably this bug is due to WebKitGTK not using the secret portal in Flatpak.