-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
Cannot save new credentials using browser #1631
Comments
A banner should appear that allows you to save the credentials. It doesn't happen automatically. Is the banner shown? What is the site? |
The banner appears. The moment I click the "New" button, a red x appears on the extention's icon. Click on the icon, Reload, go back to the banner. Repeat the same process with the same result. |
Please check the errors on the Web Developer console on the web page when that happens. |
|
Well that seems strange. The error is coming from Native Messaging itself. Are you using the normal KeePassXC's |
I'm using Flatpak LibreWolf with https://github.com/varjolintu/keepassxc-proxy-rust. KeepassXC is installed natively so I used the first part of the workaround described here: https://unix.stackexchange.com/questions/584521/how-to-setup-firefox-and-keepassxc-in-a-flatpak-and-get-the-keepassxc-browser-ad. |
@rubaboo When have you compiled the proxy? I was wondering if the bug is fixed with varjolintu/keepassxc-proxy-rust#9 or is caused by it. Depending on are you using a version before or after. Just wondering if Btw, great post and explanation! |
May 24. Should I recompile from latest? |
Yes. Try if the bug happens anymore. |
Hi, this is my last report, I am switching to a "natively" installed Librewolf, everything just works there. In the flatpak Librewolf, on the other hand, things somehow completely broke down, and nothing is working even after I recompiled the proxy from the previous (as of May 24) source code. I did not backup the binary before compiling the latest source code, so I'm not able, strictly speaking, to return to the previous state. Even if I could, I would not want to anymore. Even the part that was working (filling in username/password) was flaky. I kept having to reload, reconnect, restart the browser, lock/unlock the vault - just to get it to recognize and fill the fields. I started to think KeepasXC was completely unusable. As a last resort, I tried the "native" Librewolf with the "native" proxy ( I probably should not have hijacked this thread to begin with, since my setup was not "vanilla". The issues I experienced are somewhere between keepassxc-proxy-rust and the current state of flatpak-desktop integration in general, and are beyond my ability to even describe/report/help troubleshoot properly. Anyhow, back to the final report. With flatpak LW, I am getting the below message in the browser console. Not trying to save new credentials, just loading the github login page causes this message and a red cross on the extension's button. So, I am not able to use the extention to even login using existing credentials. Sorry for being repetitive, I just want to be clear: I am getting the same failure consistently, regardless of whether I compile the proxy from varjolintu/keepassxc-proxy-rust@bd10966 or from varjolintu/keepassxc-proxy-rust@338735e6f4ab95f4b53734b05fe64c70694ea219m , although before (at the time of my first reply in this thread) I was able to login, and only had a problem saving new credentials.
Thank you. |
You should report rust proxy issues over on that repository. It is neither the official proxy nor is it recommended for use. |
There is a WIP pull request that will add support for interacting with native messaging hosts across sandboxed app (snap and flatpak) boundaries, flatpak/xdg-desktop-portal#705 Until it's ready and supported in browsers, I came up with this workaround for connecting flatpaked Firefox with flatpaked KeePassXC (should be applicable to Chromium-based, too):
@rugk may be interested in updating their guide to use the official |
@gasinvein Thank You so much man. I followed your guide to do same with Brave Flatpak. And it works flawlessly. And it's better than previous script.
|
For those who are using Debian, the current version of Flatpak is 1.10, which wont work, so you will need to install a newer version through bullseye-backports. |
Thanks, @gasinvein, for the solution! The script didn't work on my system, I think it's because I installed KeePassXC only for the user, the runtime is only available system-wide though. Here's a version of the script that also works in that case: #!/bin/bash
# KeePassXC install dir
APP_REF="org.keepassxc.KeePassXC/x86_64/stable"
for inst in "$HOME/.local/share/flatpak" "/var/lib/flatpak"; do
if [ -d "$inst/app/$APP_REF" ]; then
FLATPAK_INST="$inst"
break
fi
done
[ -z "$FLATPAK_INST" ] && exit 1
APP_PATH="$FLATPAK_INST/app/$APP_REF/active"
# runtime install dir
RUNTIME_REF=$(awk -F'=' '$1=="runtime" { print $2 }' < "$APP_PATH/metadata")
for inst in "$HOME/.local/share/flatpak" "/var/lib/flatpak"; do
if [ -d "$inst/runtime/$RUNTIME_REF" ]; then
FLATPAK_INST="$inst"
break
fi
done
[ -z "$FLATPAK_INST" ] && exit 1
RUNTIME_PATH="$FLATPAK_INST/runtime/$RUNTIME_REF/active"
exec flatpak-spawn \
--env=LD_LIBRARY_PATH=/app/lib \
--app-path="$APP_PATH/files" \
--usr-path="$RUNTIME_PATH/files" \
-- keepassxc-proxy "$@" |
Anyone able to get the above approach to work? The latest uses org.fedoraproject.KDE5Platform and not org.kde.Platform. Adding that override to firefox and exectuting the above keepassxc-proxy-wrapper.sh leads to an error...."error while loading shared libraries: libbotan-2.so.19: cannot open shared object file: No such file or directory" Can someone please point me to the current working method for flatpak xc/firefox. A google search leads to a wild goose chase with a hundred approaches and none of them work. Copy/pasting is hard work. ;) |
@revelation1
|
@omega3 Your issue is not related to this thread. |
@omega3 flatpak Firefox does not support native messaging |
I was referring to comment-1153736766 I wasn't paying attention and wanted to use it with native keepassxc and flatpak Firefox. Thank you for pointing this out to me. I can confirm this workaround works with both keepassxc and Firefox installed as flatpak (Manjaro Plasma 5). |
I tried do apply/adapt this workaround for flatpacket floorp (firefox fork). Without succes. Has anyone managed to do this? |
You will also need to make that script executable:
|
Was about to comment the same, Steam Deck users just following instructions won't necessarily know to do that. |
Was anyone able to achieve a connection among flatpak KeepassXC and flatpak Zen-Browser? With Zen, I tried the same procedure described by @gasinvein in #1631 (comment) but I'm not able to establish a connection. In KeepassXC, I additionally flagged the "Use a custom browser configuration location" and set up the correct path to the native-messaging-hosts folder. |
@Mrcuve0 Your issue is not related to this thread, so please find a proper issue for your problem if you'd like to discuss about it. Flatpak browsers are not supported btw. |
This is a modification of @gasinvein scripts, which adds supports for Fedora and Fedora Silverblue:
flatpak override --user \
--filesystem={/var/lib,xdg-data}/flatpak/{app/org.keepassxc.KeePassXC,runtime/org.kde.Platform,runtime/org.fedoraproject.KDE5Platform}:ro \
--filesystem=xdg-run/app/org.keepassxc.KeePassXC:create \
org.mozilla.firefox
This script requires Flatpak 1.12 or newer. #!/bin/bash
APP_REF="org.keepassxc.KeePassXC/x86_64/stable"
for inst in "$HOME/.local/share/flatpak" "/var/lib/flatpak"; do
if [ -d "$inst/app/$APP_REF" ]; then
FLATPAK_INST="$inst"
break
fi
done
[ -z "$FLATPAK_INST" ] && exit 1
APP_PATH="$FLATPAK_INST/app/$APP_REF/active"
RUNTIME_REF=$(awk -F'=' '$1=="runtime" { print $2 }' < "$APP_PATH/metadata")
RUNTIME_PATH="$FLATPAK_INST/runtime/$RUNTIME_REF/active"
exec flatpak-spawn \
--env=LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/app/lib:$APP_PATH/files/lib64" \
--app-path="$APP_PATH/files" \
--usr-path="$RUNTIME_PATH/files" \
-- keepassxc-proxy "$@"
and edited its contents to launch the previously created wrapper, e.g. {
"allowed_extensions": [
"keepassxc-browser@keepassxc.org"
],
"description": "KeePassXC integration with native messaging support",
"name": "org.keepassxc.keepassxc_browser",
"path": "/home/username/.var/app/org.mozilla.firefox/data/bin/keepassxc-proxy-wrapper.sh",
"type": "stdio"
} for fedora silverblue: put /var/home into the last json. |
Please. Put the Flatpak stuff to the correct thread instead of this. |
Thank you for this! Works on bluefin-dx (Fedora 41). Was able to make it work for both Firefox and Microsoft Edge. |
When I login to a new site where I have not added my credentials, the credentials are not saved to keepassxc.
Expected Behavior
When a new credentials is entered, upon successful login, the credentials should be saved in the keepassxc.
Current Behavior
The credentials are not getting saved.
Possible Solution
Steps to Reproduce (for bugs)
The credentials are not saved.
Debug info
KeePassXC-Browser Version: 1.7.12
KeePassXC Version: 2.7.1
Operating system: Linux
Browser: Firefox
Logs that I could find:-
In the about:debugging page, I see this when I try to login with new credentials
It is able to detect the keepassxc running locally, as it is able to retrieve credentials. The issue is when it tries to save it, it fails.
The text was updated successfully, but these errors were encountered: