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
Issues (on Linux) with KeepassXC upgrade to version 2.7.3 #77
Comments
I've exactly the same issue, with the same configuration. |
Please try keepassxc-mail-1.3.1.zip |
Same issue with the updated extension. To go in more in details, some password sare retrieved and it get stuck on others (no popup, TB just is "connecting to the server" forever). If I deactivate and reactivate Keepass-xc Mail (after closing all the popups flashing at me), sometimes everything work. |
I confirm the same issue. Version 2.7.3 and KeePassXC-Browser: 1.8.3 doesn't work at all.
(tested with FF at Win10) |
I have upgraded to keepassxc-mail-1.3.1.zip (while using KeepassXC version 2.7.1), then shutdown browser and Thunderbird (so no more active keepassxc-proxy processes after that). cd $XDG_RUNTIME_DIR After upgrade to KeepassXC 2.7.3 and starting it, it looks good (I believe): 09:00:08.400 1666814408400 addons.xpi WARN Checking /usr/lib/thunderbird/distribution/extensions for addons |
I have now converted KeepassXC back to version 2.7.1 (left keepassxc-mail on version 1.3.1). Everything seems to be working in Thunderbird but now having a look at the TB console, this looks almost identical to what I uploaded earlier. At that time I though that the lines of "WebExtensions: KeePassXC-Mail: unable to get xxxxEnterPasswordPromptTitle" where indicating the issues - but these lines still appear again when TB seems to be working, The only real difference might be this line (not appearing under a working situation): |
At startup I see the same informations (" Now if I disable keepassxc-mail, close all the popups, and enable it again, I get a new bunch of ("
Now if I clicked on a folder what happen is
and I get my messages as expected. |
Now if I try with KeepassXC 2.7.1, always the |
The I think I will spin up an Ubuntu VM and try to reproduce the problem. But the |
I did not notice before I've also have the parsing error. Here more details:
Then it says: |
That's bad. This is a core function of the native messaging that is provided by Mozilla. And the JSON is provided by KeePassXC. So I cannot change any of the involved programs. @droidmonkey & @varjolintu: I was able to reproduce the same issue in Firefox 106.0.2 with keepassxc-browser 1.8.3: It might be related to all the other problems with 2.7.3. (e.g. keepassxreboot/keepassxc#8634, keepassxreboot/keepassxc-browser#1751) {"action":"get-logins","message":"9vb[...]wAZ","nonce":"Agn[..]ZM"}{} Notice the additional In Thunderbird I'm able to get this output by executing the following in the console (Ctrl + Shift + J): var {BaseProcess} = Cu.import("resource://gre/modules/subprocess/subprocess_common.jsm");
BaseProcess.create = function create(options){
let worker = this.getWorker();
return worker.call("spawn", [options]).then(({ processId, fds, pid }) => {
console.log("creating BaseProcess");
var baseProcess = new this(worker, processId, fds, pid);
BaseProcess.last = baseProcess;
baseProcess.stdout.readJSON = function readJSON(length) {
if (!Number.isInteger(length) || length <= 0) {
throw new RangeError("Length must be a positive integer");
}
return this.readString(length).then(string => {
try {
return JSON.parse(string);
} catch (e) {
console.log("Invalid JSON:", string);
e.errorCode = SubprocessConstants.ERROR_INVALID_JSON;
throw e;
}
});
};
return baseProcess;
});
} I was not able to inject this code into Firefox. Some additional information that might help pin the problem down: it only happens on database entries where you "remembered" the choice of allowing the access. If the "Browser request access" pops up the message is fine. |
Yah we know 1.8.3 extension is flaky, there is a fix coming. |
@droidmonkey: I don't think it's the extension. In keepassxc-mail I'm currently using the files from 1.8.0. @mdonz and @nbrucy: I think the only solution for you is at the moment to go back to 2.7.1 |
@kkapsner I much appreciate your work and help with this. I will stay with 2.7.1 for now. Have just observed an interesting detail (under 2.7.1) which I will raise separately. |
There is a separate problem with 2.7.3 for some Linux distributions where the socket file is not created correctly in the runtime directory. See here for a workaround: keepassxreboot/keepassxc#8634 (comment) |
Just checked: not related to snap - problem also present with PPA version |
@droidmonkey: is there a way to tell KeePassXC to output the native messaging communication? Or do I have to implement a proxy for that? |
FYI all of my installed packages are from PPA. No snap involved here. |
It's also broken in my Windows VM. |
You have to run keepassxc in a debugger and break on the message send function to see exactly what we are sending. I am fairly confident we never send a blank json message ( |
Cool tool, where can it be found? |
https://textslashplain.com/2022/01/08/debug-native-messaging/ EDIT: Here the git: https://github.com/ericlaw1979/NativeMessagingDebugger/releases |
@droidmonkey: KeePassXC is sending wrong data: |
I actually would be able to to mess with Thunderbird code to fix these messages. But this will not be part of an official release (I gues I would make an additional extension for that). And it would still leave Firefox broken. So I would rather prefer KeePassXC to be fixed. @droidmonkey: is there anything more that I can provide you to find the culprit? |
@ericlaw1979: thanks for the great tool |
If something sends blank JSON messages, it's KeePassXC 2.7.3. Everything would work normally with 2.7.1. |
Is that part of the async dialog problem? |
@droidmonkey Yes. It's related to that. |
Good news: (Ubuntu 22.04) - I just applied the update to KeepassXC 2.7.4 and so far, my browser integration is working for Firefox and keepassxc-mail under Thunderbird! |
I do not see any empty messages with 2.7.4. So I would close this issue. One last question @droidmonkey and @varjolintu: the empty messages itself were not the problem but that two messages were concatenated and in the protocol the length of the message was therefore wrong (see my last screenshot). Was this also introduced by the asynchronous dialog? Or could that happen again (e.g when the browser and Thunderbird are talking to keepassXC at the exact same time or something similar)? |
It was likely a double tap of json messages, a coding error. We sent the real message and an empty one. I thought the native message debugger showed the empty message was sent with the correct length though. |
It is exactly how @droidmonkey described it. The real answer was sent directly to the same socket as the empty message, which caused this error. |
Most of the time it showed the correct length. In these cases Thunderbird handled them correctly. But sometimes the length was not correct (in the screenshot above the real message is 431 bytes long + the empty message = 433 => breaking the native messaging connection) |
Being a happy user of keepassxc-mail for a long time (Ubuntu 22.04, KeepassXC 2.7.1, KeePassXC-Browser 1.8.3, keepassxc-mail 1.3), I experience issue with a recent upgrade for KeepassXC from former version 2.7.1 to the new version 2.7.3.
There is a discussion going on here: keepassxreboot/keepassxc#8634
The described workaround to get it going is to "Delete the old proxy socket from XDG_RUNTIME_DIR". I did so and my browser integrations (Firefox and Chromium) are working again as expected with the new Keepassxc version 2.7.3 but I cannot get keepassxc-mail working.
Have reverted back to Keepassxc 2.7.1 for now again with everything (Firefox, Chromium & Thunderbird with keepassxc-mail working) but wonder what might be need for keepassxc-mail?
Thanks for a great add-on.
The text was updated successfully, but these errors were encountered: