Skip to content
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

firefoxdeveloperedition alias resolves surprisingly on macOS #47

Closed
watters opened this issue Jul 14, 2020 · 3 comments
Closed

firefoxdeveloperedition alias resolves surprisingly on macOS #47

watters opened this issue Jul 14, 2020 · 3 comments

Comments

@watters
Copy link
Contributor

watters commented Jul 14, 2020

Line 117 of lib/utils.js:

"deved on osx": "/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox-bin",

However, when downloading Firefox Developer Edition from the official download link on mozilla.org, the application downloaded is named 'Firefox Developer Edition.app' (with spaces). As such, if someone downloads Firefox Developer Edition and attempts to use the firefoxdeveloperedition alias, out of the box, it will fail with an error message like:

Error: spawn /Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox-bin ENOENT

(This particular error occurs when passing the alias to the --firefox option to web-ext, which delegates alias resolution to fx-runner)

This can be naively fixed by adding spaces to the path noted above, but that would break backwards compat for anyone who has adjusted to the current behavior.

Happy to take a run at doing the work to fix this myself, but thought it better to seek basic assent via Issue before submitting a PR.

@watters
Copy link
Contributor Author

watters commented Jul 14, 2020

It looks like the combined logic of normalizeBinary (binaryPath, platform, arch) and findMacAppByChannel(channel, opt) with respect to the 'firefoxdeveloperedition' alias may be broken as well.

As currently written, it appears to look for a bundle with a kMDItemCFBundleIdentifier of org.mozilla.deved, but the actual value is:

kMDItemCFBundleIdentifier = "org.mozilla.firefoxdeveloperedition"

Upon further review, I suspect #44 introduced a regression by changing firefoxdeveloperedition to deved. That change prevented the call to findMacAppByChannel(channel, opt) from successfully finding installed an installed copy of Firefox Developer Edition via mdfind.

@Rob--W
Copy link
Member

Rob--W commented Jul 14, 2020

The paths used to be correct, but 3 years ago the spaces were added in https://bugzilla.mozilla.org/show_bug.cgi?id=1404796

In mozilla/web-ext#1960 you mentioned that you'd be interested in putting up a patch. I would gladly review it.

@watters
Copy link
Contributor Author

watters commented Jul 15, 2020

I'll get something submitted for review ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants