keepassxreboot / keepassxc-browser

KeePassXC Browser Extension
GNU General Public License v3.0
1.73k stars 179 forks source link

Firefox 71 breaks the extension #704

Closed P1zz4br0etch3n closed 4 years ago

P1zz4br0etch3n commented 4 years ago

Since the update to Firefox 71 the settings page is broken and selecting credentials from input elements doesn't work any more.

Bildschirmfoto vom 2019-12-05 10-47-15

Expected Behavior

Settings can be viewed and credentials can be selected by clicking into username input fields or on the KeePassXC icon inside the input field.

Current Behavior

Only the settings header is viewed and there is neither an icon inside input fields nor a selection is opened when one clicks inside it.

Possible Solution

I don't know. I downgraded Firefox for now.

Steps to Reproduce (for bugs)

  1. Update Firefox to version 71
  2. Try to change settings
  3. Try to select passwords from input fields

Debug info

KeePassXC - 2.5.1 KeePassXC-Browser - 1.5.3 Operating system: Fedora 31 Browser: Firefox 71

varjolintu commented 4 years ago

What does the page inspector / JavaScript console say after opening or reloading the Settings page?

vanous commented 4 years ago

FF 71, KPXC-browser basically stopped working.

Error loading options page: Error: undefined options.js:21:17
P1zz4br0etch3n commented 4 years ago

Bildschirmfoto vom 2019-12-05 12-07-35

The error occurs in the first line of the try block:

const settings = await browser.runtime.sendMessage({ action: 'load_settings' });

If I pause on caught exceptions I get the following in jQuery:

SyntaxError: '*,:x' is not a valid selector SyntaxError: '[s!='']:x' is not a valid selector

And this in options.js

Error: undefined

varjolintu commented 4 years ago

Thanks. Good to know. I'll try updating the jQuery. Although we already have a PR that updates the Bootstrap where jQuery is no longer needed. Still, I'm releasing a new update soon so hopefully this issue will be fixed with the minor update.

varjolintu commented 4 years ago

Still, I'm also using Firefox 71 but have no issues. So first I'll have to try to reproduce this problem.

P1zz4br0etch3n commented 4 years ago

The select from input part is similar. Tried on Google login page.

Console error: Error: Cannot load extension settings in keepassxc-browser.js:828:17

And again the error occurs in the first line of the try block:

const settings = await browser.runtime.sendMessage({
    action: 'load_settings'
});

But no jQuery errors here.

P1zz4br0etch3n commented 4 years ago

Still, I'm also using Firefox 71 but have no issues. So first I'll have to try to reproduce this problem.

I can reproduce this with a clean Fedora 31 install (and dnf update) in a gnome-boxes virtual machine.

varjolintu commented 4 years ago

I'll install Fedora 31 to a VM and give it a try.

If anyone is willing to debug this, the background script uses page.initSettings() to load settings from the localStorage. Something strange might happen there.

varjolintu commented 4 years ago

Reproduced the problem. It fails here: https://github.com/keepassxreboot/keepassxc-browser/blob/develop/keepassxc-browser/background/page.js#L82. So for some reason Firefox cannot write the settings to localStorage, but receives them normally.

I'm quite sure this is related to https://bugzilla.mozilla.org/show_bug.cgi?id=1592897.

The test site https://firefox-storage-test.glitch.me/ gives me "Good: Totally Working" to all four steps with Firefox 71 in macOS. With Fedora 31 half of them give "Bad: Totally Broken" results for me.

TimmiORG commented 4 years ago

Reproduced the problem. It fails here: https://github.com/keepassxreboot/keepassxc-browser/blob/develop/keepassxc-browser/background/page.js#L82. So for some reason Firefox cannot write the settings to localStorage, but receives them normally.

I'm quite sure this is related to https://bugzilla.mozilla.org/show_bug.cgi?id=1592897.

The test site https://firefox-storage-test.glitch.me/ gives me "Good: Totally Working" to all four steps with Firefox 71 in macOS. With Fedora 31 half of them give "Bad: Totally Broken" results for me.

All four tests are showing good for me on Fedora 31 but still I have the issue as described here.

GregoireW commented 4 years ago

On Fedora31 + Firefox 71 I got the same issue. The glitch.me site give me "Good" to all steps.

The core error is: InvalidStateError: A mutation operation was attempted on a database that did not allow mutations.

with the stack

IndexedDB.jsm:120:34
    method resource://gre/modules/IndexedDB.jsm:120
    set resource://gre/modules/ExtensionStorageIDB.jsm:237
    AsyncFunctionNext self-hosted:690
    enter resource://devtools/server/actors/utils/event-loop.js:79
    enter self-hosted:873
    _pushThreadPause resource://devtools/server/actors/thread.js:250
    _pauseAndRespond resource://devtools/server/actors/thread.js:842
    pauseAndRespond resource://devtools/server/actors/thread.js:1044
    _makeOnStep resource://devtools/server/actors/thread.js:973
    initSettings moz-extension://33246c10-7066-46a1-bded-359bc85fecab/background/page.js:80
    AsyncFunctionThrow self-hosted:695

(the line before last is the line from the extension)

Now, I'm not sure why, (old post talk about private browsing, but I'm not in this use case) and a little bit tired to look for a solution today

vanous commented 4 years ago

Same here on Debian, tests passed, issue remains.

varjolintu commented 4 years ago

Firefox 70 still works normally?

vanous commented 4 years ago

yes, just downgraded and with 70 all OK.

varjolintu commented 4 years ago

Also, see: https://bugzilla.redhat.com/show_bug.cgi?id=1779570

AmazingDreams commented 4 years ago

If I pause on caught exceptions I get the following in jQuery:

SyntaxError: '*,:x' is not a valid selector SyntaxError: '[s!='']:x' is not a valid selector

This one is expected according to jQuery devs

Don't break on caught exceptions. We caught it because we expected it.

https://bugs.jquery.com/ticket/13881#comment:1

diraol commented 4 years ago

Same here (Debian bullseye/sid + Firefox 71.0 running under Wayland)

marillat commented 4 years ago

Seems to be a firefox bug.

I can't reproduce this bug under windows 10 firefox 71 or chromium 76 with linux

I see another extensions who doesn't work with firefox 71 Form History Control (II) manage history open a windows with loading and never end.

varjolintu commented 4 years ago

According to the comments of the previous Firefox bug, this is probably the cause: https://bugzilla.mozilla.org/show_bug.cgi?id=1601707

jovandeginste commented 4 years ago

Fixed indeed when upgrading to firefox-71.0-15.fc31.x86_64

P1zz4br0etch3n commented 4 years ago

For me too. Thanks.

vanous commented 4 years ago

This is good to know, thank you @jovandeginste . Will need to wait before it lands in Debian, but i am happy on 70 so i don't mind waiting.

varjolintu commented 4 years ago

I'm closing this issue after Debian has provided a fixed update.

fezie commented 4 years ago

Debian has fixed this now too: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946547

It's already available on the mirrors

varjolintu commented 4 years ago

Modified the title and pinned the issue so we don't get duplicate issues all the time.

osamak commented 4 years ago

Fixed indeed when upgrading to firefox-71.0-15.fc31.x86_64

Fedora has landed the new release into Fedora 31 updates repo. That fixed this issue! :tada: