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

Firefox for Android does not support manifest.incognito set to "not_allowed" #761

Closed
3 tasks done
lidel opened this issue Sep 16, 2019 · 5 comments · Fixed by #762
Closed
3 tasks done

Firefox for Android does not support manifest.incognito set to "not_allowed" #761

lidel opened this issue Sep 16, 2019 · 5 comments · Fixed by #762
Assignees
Labels
kind/bug A bug in existing code (including security flaws) status/blocked/upstream-bug Blocked by upstream bugs

Comments

@lidel
Copy link
Member

lidel commented Sep 16, 2019

incognito = not_allowed was introduced in #704 & #705, sadly it made manifest incompatible with Firefox for Android

Problem

Could not install add-on [..] ipfs_companion-2.8.4.xpi: 
Error: manifest.incognito set to "not_allowed" is currently unvailable for use

Full error:

$ npx web-ext run -s add-on --target=firefox-android --adb-bin ~/local/opt/android-sdk-linux/platform-tools/adb --android-device=<id> --firefox-apk org.mozilla.firefox_beta
Applying config files: ./package.json, ./web-ext-config.js
Running web extension from /home/lidel/project/ipfs-companion/add-on
Selected ADB device: <id>
Stopping existing instances of org.mozilla.firefox_beta...
Starting org.mozilla.firefox_beta...
Building web extension from /home/lidel/project/ipfs-companion/add-on
You can connect to this Android device on TCP port 37833

o: installTemporaryAddon: Error: unknownError: Could not install add-on at '/sdcard/web-ext-artifacts-1568637079338/ipfs_companion-2.8.4.xpi': Error: manifest.incognito set to "not_allowed" is currently unvailable for use.
    at i.addonsActor.client.client.makeRequest.n (/home/lidel/project/ipfs-companion/node_modules/web-ext/dist/webpack:/src/firefox/remote.js:116:27)
    at Client.handleMessage (/home/lidel/project/ipfs-companion/node_modules/@cliqz-oss/firefox-client/lib/client.js:162:7)
    at Client.readMessage (/home/lidel/project/ipfs-companion/node_modules/@cliqz-oss/firefox-client/lib/client.js:221:10)
    at Client.onData (/home/lidel/project/ipfs-companion/node_modules/@cliqz-oss/firefox-client/lib/client.js:187:16)
    at Socket.emit (events.js:182:13)
    at addChunk (_stream_readable.js:283:12)
    at readableAddChunk (_stream_readable.js:264:11)
    at Socket.Readable.push (_stream_readable.js:219:10)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)

Fix for now

  • Marked 2.8.3 as the last valid version that works on Android.

Solution (2.8.5+)

@lidel lidel added the kind/bug A bug in existing code (including security flaws) label Sep 16, 2019
@lidel lidel self-assigned this Sep 16, 2019
@lidel lidel mentioned this issue Sep 16, 2019
5 tasks
lidel added a commit that referenced this issue Sep 18, 2019
This adds separate artifact target for Firefox for Android
and ensures ad-hoc call to bundle:* produce renamed artifact.

See #761
@lidel lidel closed this as completed Sep 18, 2019
@lidel
Copy link
Member Author

lidel commented Sep 19, 2019

Oof, while extension with "incognito": null loads fine into Firefox for Android, web-ext lint does not support null keys in manifest.json and returns an error:

$ web-ext lint
Applying config files: ./package.json, ./web-ext-config.js
Cannot convert undefined or null to object

This means upload to AMO store also fails, as it uses the same validator.
Filled upstream bug: https://github.com/mozilla/addons/issues/1100

This super over-complicates entire setup. The incognito key is the only diff between Desktop and Android.
I think we may want to revert #705 until upstream bug is resolved.

@lidel lidel reopened this Sep 19, 2019
@lidel
Copy link
Member Author

lidel commented Sep 20, 2019

Welcome the next episode if this soap opera 🙃

As we are unable to ship the same _firefox package for both desktop and android, I tried to release two versions, one for each platform.

Turns out AMO will pick the latest package as the canonical release, using its platforms as the only available platforms.

This translated to a pretty nasty situation: I uploaded android version after desktop one, and it effectively made it impossible for desktop users to install ipfs-companion:

fml-amo-2019-09-20--15-59-18

I disabled Android version for now, as it has a smaller user base, restoring install for desktop.
At this point I believe we have no other choice but revert #705 in Firefox builds.
It should be fine, as Firefox provides additional controls and UI for indicating which extension runs in incognito mode.

@ProjectMoon
Copy link

@lidel Currently trying to install the extension on Android and getting add-on corrupted error, even with 2.8.3. Is that related to this issue?

@lidel
Copy link
Member Author

lidel commented Sep 20, 2019

@ProjectMoon oh wow, you found another issue with AMO and Android 🎖️ 😬

I revisited it on my phone and:

It looks like AMO ignores platform constraints and instead of "last available android version" (2.8.3) it just blindly grabs the latest package (2.8.5), which is not marked as safe for Android.

I filled upstream bug for this at https://bugzilla.mozilla.org/show_bug.cgi?id=1582821 (moved to: https://github.com/mozilla/addons/issues/1101), thanks for noticing this!

lidel added a commit that referenced this issue Sep 30, 2019
This change:
- removes 'incognito' key from Firefox manifest
- unifies manifest for Firefox on Desktop and Android
  (bundle:fennec calls bundle:firefox)
  making it possible to publish a single package supporting both
  platforms to work around AMO issues described in:
  #761 (comment)
- adds `manifest.chromium.json` for Chrome-specific keys
lidel added a commit that referenced this issue Sep 30, 2019
This change:
- removes 'incognito' key from Firefox manifest
- unifies manifest for Firefox on Desktop and Android
  (bundle:fennec calls bundle:firefox)
  making it possible to publish a single package supporting both
  platforms to work around AMO issues described in:
  #761 (comment)
- adds `manifest.chromium.json` for Chrome-specific keys
lidel added a commit that referenced this issue Sep 30, 2019
This change:
- removes 'incognito' key from Firefox manifest
- unifies manifest for Firefox on Desktop and Android
  (bundle:fennec calls bundle:firefox)
  making it possible to publish a single package supporting both
  platforms to work around AMO issues described in:
  #761 (comment)
- adds `manifest.chromium.json` for Chrome-specific keys
@lidel lidel added status/blocked Unable to be worked further until needs are met status/blocked/upstream-bug Blocked by upstream bugs and removed kind/bug A bug in existing code (including security flaws) labels Oct 2, 2019
@lidel lidel added kind/bug A bug in existing code (including security flaws) status/blocked/upstream-bug Blocked by upstream bugs and removed status/blocked Unable to be worked further until needs are met status/blocked/upstream-bug Blocked by upstream bugs kind/bug A bug in existing code (including security flaws) labels Oct 2, 2019
@lidel
Copy link
Member Author

lidel commented Oct 2, 2019

mozilla/addons#1108 is resolved and fix is published to AMO, remaining Android work continued in #779

@lidel lidel closed this as completed Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) status/blocked/upstream-bug Blocked by upstream bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants