Closed Bug 1830605 Opened 1 year ago Closed 1 year ago

Regression: Unix-style slashes in file paths failing on Windows, causing addon errors

Categories

(WebExtensions :: General, defect, P1)

Firefox 114
Unspecified
Windows
defect

Tracking

(firefox-esr102 unaffected, firefox112 unaffected, firefox113 unaffected, firefox114+ fixed)

RESOLVED FIXED
114 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox112 --- unaffected
firefox113 --- unaffected
firefox114 + fixed

People

(Reporter: pallaswept, Assigned: robwu)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [addons-jira])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:114.0) Gecko/20100101 Firefox/114.0

Steps to reproduce:

Updated nightly.

Actual results:

KeepassXC cannot connect. Following their troubleshooting steps at https://github.com/keepassxreboot/keepassxc-browser/wiki/Troubleshooting-guide, I notice that keepassxc-proxy.exe does not load. Starting it manually did not help. All other configuration is correct as per that guide.

Expected results:

KeepassXC should keep working like it does in earlier builds. I rolled back to an older build and it works. This one works https://ftp.mozilla.org/pub/firefox/nightly/2023/04/2023-04-25-15-43-13-mozilla-central-l10n/firefox-114.0a1.en-GB.win64.installer.exe. Unsure of any later builds. Others have also reported this not working in latest nightly builds, on the keepassxc-browser github issues at https://github.com/keepassxreboot/keepassxc-browser/issues?q=is%3Aissue

Product: Firefox → WebExtensions

One of the bug reports at the addon's github (https://github.com/keepassxreboot/keepassxc-browser/issues/1905) has a root cause for this.

The registry key "HKEY_CURRENT_USER\SOFTWARE\Mozilla\NativeMessagingHosts\org.keepassxc.keepassxc_browser" contains a path to a file. That path contains forward-slashes, unix-style. ie it will be set to "C:/Users/username/AppData/Local/KeePassXC/org.keepassxc.keepassxc_browser_tor-browser.json". Changing those slashes to backslashes, windows-style, ie "C:\Users\username\AppData\Local\KeePassXC\org.keepassxc.keepassxc_browser_tor-browser.json" makes this issue go away and the addon works again.

Not sure if this new sensitivity to path parsing is intentional or not, but hopefully this is helpful information.

I have renamed this bug report to reflect the root cause as this will be effecting other addons as well.

OS: Unspecified → Windows
Summary: Regression: KeePassXC integration broken in Nightly → Regression: Unix-style slashes in file paths failing on Windows, causing addon errors
Duplicate of this bug: 1830640
Keywords: regression
Regressed by: 1772932

Not too long ago there was a similar regression caused by switching from osfile to PathUtils, in bug 1791788... I'll look into a patch.

For anyone interested in digging deeper, the KeepassXC extension registers its native manifest at https://github.com/keepassxreboot/keepassxc/blob/2.7.4/src/browser/NativeMessageInstaller.cpp, specifically:

Status: UNCONFIRMED → NEW
Component: Untriaged → General
Ever confirmed: true
Whiteboard: [addons-jira]
Assignee: nobody → rob
Status: NEW → ASSIGNED

Linking bug 1791788 for visibility. Both bugs were triggered by the same kind of refactoring, and in both cases the behaviors expected by users were not covered by unit tests (now they are).

See Also: → 1791788

Thanks so much for your help, Rob, Robert, Tom, and anyone I missed.

Severity: -- → S3
Priority: -- → P1

Set release status flags based on info from the regressing bug 1772932

Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/1ca2ab32ea09
Normalize path to native messaging manifest on Windows r=extension-reviewers,mixedpuppy

Small error in the test. I'll fix up and reland.
I do wonder what the purpose of ./mach try is if it can't even catch a failure from the test that was modified in the same patch...

Flags: needinfo?(rob)
See Also: → 1830760
Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/56b6297136e9
Normalize path to native messaging manifest on Windows r=extension-reviewers,mixedpuppy
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: