Regression: Unix-style slashes in file paths failing on Windows, causing addon errors
Categories
(WebExtensions :: General, defect, P1)
Tracking
(firefox-esr102 unaffected, firefox112 unaffected, firefox113 unaffected, firefox114+ fixed)
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
Updated•1 year ago
|
Reporter | ||
Comment 1•1 year ago
|
||
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.
Reporter | ||
Comment 2•1 year ago
|
||
I have renamed this bug report to reflect the root cause as this will be effecting other addons as well.
Updated•1 year ago
|
Assignee | ||
Comment 4•1 year ago
|
||
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:
Updated•1 year ago
|
Assignee | ||
Comment 5•1 year ago
|
||
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 6•1 year ago
|
||
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).
Reporter | ||
Comment 7•1 year ago
|
||
Thanks so much for your help, Rob, Robert, Tom, and anyone I missed.
Assignee | ||
Updated•1 year ago
|
Comment 8•1 year ago
|
||
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
Comment 10•1 year ago
|
||
Backed out for causing xpc failures on test_native_manifests.js
Failure log: https://treeherder.mozilla.org/logviewer?job_id=414284938&repo=autoland
Backout link: https://hg.mozilla.org/integration/autoland/rev/4d974b2e7e4e0c91949ec4208fce2f65ef92f12c
Assignee | ||
Comment 11•1 year ago
|
||
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...
Comment 12•1 year ago
|
||
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
Updated•1 year ago
|
Comment 13•1 year ago
|
||
bugherder |
Description
•