ipfs / ipfs/ipfs-companion

Support Firefox for Android

Open
#866 2 comments 2 reactions 0 assignees View on GitHub
area/android area/firefox effort/hours exp/novice help wanted kind/maintenance need/analysis need/maintainers-input P2
Dominant language
JavaScript
Stars
2.2k
Forks
338
Avg merge
3m
Merged PRs (30d)
1

Description

Mozilla ships multiple products on mobile and it is very confusing to understand what is what, and where IPFS Companion can run.

Below are mu notes to save everyone some time + next steps.

## The saga of Android browsers from Mozilla

### :snowflake: Fennec

In the past, there was "Firefox for Android" and "Firefox for Android Beta", both based on "Fennec" codebase, for which active development stopped around Firefox 68.

Cool thing about "Fennec" browser was that is support nearly all WebExtension APIs and could run the same extensions as Desktop Firefox, including IPFS Companion.

IPFS Companion runs fine in "Fennec" runtime. User could run local IPFS node (eg. unofficial [SweetIPFS](https://play.google.com/store/apps/details?id=fr.rhaz.ipfs.sweet&hl=en)) or switch Companion to use embedded js-ipfs, which did not provide gateway, but worked fine for quick uploads on mobile(!).

### :fire: Fenix

"Fenix" is an early version of an experimental Firefox browser for Android. Available on the Android Play store under "Firefox Preview" name, built on [GeckoView](https://mozilla.github.io/geckoview/), aims to replace "Fennec" on Android.

Key issue with "Fenix" was that is did not support WebExtensions at all. Part of users was really vocal about that shortcoming and a plan to bring them back on mobile can be tracked in [mozilla-mobile/fenix#5315](https://github.com/mozilla-mobile/fenix/issues/5315).

As I am writing this memo, Fenix still does not support installing arbitrary WebExtensions. Only a minimal set of APIs was whitelisted to enable extensions such as uBlock Origin to function.

### :anger: Fennec → Fenix = No IPFS Companion on Android.. for now

**TL;DR** from [FAQ for extension support in new Firefox for Android](https://blog.mozilla.org/addons/2020/02/11/faq-for-extension-support-in-new-firefox-for-android/):

- Mozilla got serious about deprecating "Fennec" runtime and started the process by switching "Firefox for Android Beta" from "Fennec" to "Fenix".
- Only a few extensions are whitelisted, everything else is disabled for now
- There is no ETA when it will be possible to install IPFS Companion on "Fenix"
- ..but there are instructions on [how you test webextension against org.mozilla.fenix.nightly](https://github.com/mozilla-mobile/fenix/issues/5315#issuecomment-592082109) to smoke-test and tell if our extension is ready.

### :memo: Next steps

This is not a priority, but we should eventually:

- [ ] try Companion with org.mozilla.fenix.nightly on Android ([following these steps](https://github.com/mozilla-mobile/fenix/issues/5315#issuecomment-592082109))
(this is something anyone with spare time can do)
- see what breaks due to missing APIs, comment below
- repeat at least once a quarter until it seems to load and work as expected
- [ ] when everything works, reach out to Mozilla ask if there is anything else we need to do for whitelisting of IPFS Companion on Mobile.

Contributor guide

Open the contributing guide

Research direction

Start by following the linked instructions to test IPFS Companion with org.mozilla.fenix.nightly on Android. Record which missing APIs prevent it from loading or working as expected, repeat the smoke test over time, and consider the work done when it functions reliably and Mozilla can be contacted about whitelisting.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, javascript
Domain
mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.