Ipfs-companion: Firefox for Android does not support manifest.incognito set to "not_allowed"

Created on 16 Sep 2019  路  5Comments  路  Source: ipfs/ipfs-companion

incognito = not_allowed was introduced in #704 & https://github.com/ipfs-shipyard/ipfs-companion/pull/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

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

Solution (2.8.5+)

  • [x] Create dedicated target for Firefox for Android, similar to ones we have for Brave and Firefox (https://github.com/ipfs-shipyard/ipfs-companion/commit/d04553d33b4fa54725969a250b5fb8e00562d03a)
  • [x] Fill an upstream bug (https://bugzilla.mozilla.org/show_bug.cgi?id=1582107)
kinbug statublockeupstream-bug

All 5 comments

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 https://github.com/ipfs-shipyard/ipfs-companion/pull/705 until upstream bug is resolved.

Welcome the next episode if this soap opera :upside_down_face:

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.

@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?

@ProjectMoon oh wow, you found another issue with AMO and Android :medal_military: :grimacing:

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!

https://github.com/mozilla/addons/issues/1108 is resolved and fix is published to AMO, remaining Android work continued in https://github.com/ipfs-shipyard/ipfs-companion/issues/779

Was this page helpful?
0 / 5 - 0 ratings

Related issues

npfoss picture npfoss  路  3Comments

lidel picture lidel  路  3Comments

lidel picture lidel  路  4Comments

samuelmaddock picture samuelmaddock  路  5Comments

lidel picture lidel  路  5Comments