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

Protocol handlers without web+ prefix in Firefox 59 #359

Merged
merged 2 commits into from
Mar 14, 2018

Conversation

lidel
Copy link
Member

@lidel lidel commented Jan 22, 2018

This PR implements changes described in #164 (comment), namely support for simplified (redirect-based) protocol handlers for dweb: and ipfs:// without web+ prefix.

It works perfectly fine with latest Firefox Nightly (59a1), but fails to load in Firefox <59:

$ web-ext run -s add-on/ --browser-console --verbose
[firefox/index.js][debug] Firefox stdout: 1516628484552	addons.webextension.<unknown>	ERROR	Loading extension 'null': Reading manifest: Error processing protocol_handlers.3.protocol: Value "dweb" must either: be one of ["bitcoin", "geo", "gopher", "im", "irc", "ircs", "magnet", "mailto", "mms", "news", "nntp", "sip", "sms", "smsto", "ssh", "tel", "urn", "webcal", "wtai", "xmpp"], or match the pattern /^(ext|web)\+[a-z0-9.+-]+$/

Due to this and a false-positive error in addon-linter (mozilla/addons-linter#1783) I am parking this PR until Firefox 59 is released to Beta (it may even wait til Stable).

@lidel lidel added UX status/blocked Unable to be worked further until needs are met status/blocked/upstream-bug Blocked by upstream bugs labels Jan 22, 2018
@lidel lidel added this to the 2018-Q1 milestone Jan 22, 2018
@lidel lidel self-assigned this Jan 22, 2018
@lidel lidel changed the title WIP: Protocol handlers without web+ prefix in Firefox 59 [WIP] Protocol handlers without web+ prefix in Firefox 59 Jan 22, 2018
@lidel lidel force-pushed the no-prefix-in-firefox-59 branch 2 times, most recently from 14e2380 to 0be75e3 Compare February 5, 2018 11:46
lidel added a commit that referenced this pull request Feb 5, 2018
lidel added a commit that referenced this pull request Feb 5, 2018
lidel added a commit that referenced this pull request Feb 5, 2018
@lidel
Copy link
Member Author

lidel commented Feb 5, 2018

I rebased this PR to use the latest web-ext that includes addon-linter with updated rules (mozilla/addons-linter#1783). This means npm run lint no longer breaks our tests 👌

Unfortunately if we enable non-prefixed handlers in manifest.json Firefox < 59 will refuse to load extension at all (Chrome is just ignoring unknown keys and runs fine).

That is why I am parking this PR until Firefox 59 becomes the new Stable.

@chpio
Copy link

chpio commented Mar 14, 2018

Version 59.0, first offered to Release channel users on March 13, 2018
- https://www.mozilla.org/en-US/firefox/59.0/releasenotes/

@lidel
Copy link
Member Author

lidel commented Mar 14, 2018

Will rebase and merge this ASAP, so that we have a new FF59-enabled beta release :)

@lidel lidel changed the title [WIP] Protocol handlers without web+ prefix in Firefox 59 Protocol handlers without web+ prefix in Firefox 59 Mar 14, 2018
This adds `bundle:firefox:58` workaround
that creates a bundle in `build/firefox/58`

It is just so that people have easy fix  for quick smoke-tests.
It will be removed in a few weeks, after users switch to Firefox 59.
@lidel
Copy link
Member Author

lidel commented Mar 14, 2018

Rebased and smoke-tested on Linux with Firefox 60b3, works as expected.

Build for Firefox 58

Non-prefixed protocol handlers in manifest break Firefox 58 (extension just does not load) so to ease transition for casual contributors and testers I've added an optional target that builds bundle for the old version without this new feature:

npm run build bundle:firefox:58

Keep in mind this target is temporary, disabled by default and will be removed in 2 weeks.
Upgrade to Firefox 59 ASAP.

@lidel lidel merged commit b439a7d into master Mar 14, 2018
@lidel lidel deleted the no-prefix-in-firefox-59 branch March 14, 2018 15:59
@lidel
Copy link
Member Author

lidel commented Mar 14, 2018

If anyone has trouble with downloading Firefox 59 from the website, there seems to be an upstream problem:

lidel added a commit that referenced this pull request May 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/blocked/upstream-bug Blocked by upstream bugs status/blocked Unable to be worked further until needs are met
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants