page_action/pageAction is broken on Firefox 142 for Android

I just got a bug report today that IPvFoo stopped working on Firefox 142 for Android: Stopped working in Firefox for Android 142 · Issue #67 · pmarks-net/ipvfoo · GitHub

I’m able to fix it by migrating from page_action to action, but page_action still works on desktop Firefox, and I don’t want to migrate to action unless absolutely necessary, because page_action has better UX.

Did Firefox intentionally kill page_action on Android, or is that a bug? Is there a recommended way to for an extension to use action on Android but page_action on desktop, while sharing the same manifest.json file?

Update: My workaround is to set both action and pageAction, but this results in duplicate icons on Firefox <= 141. I plan to do something smarter after Firefox fixes the bug.

I found the commit that broke pageAction: Bug 1910814 - [Menu Redesign] Implement web extension browser menu it… · mozilla-firefox/firefox@6b0cb22 · GitHub

If replace browserAction with pageAction in WebExtensionsMenuBinding.kt, then (the previous version of) IPvFoo starts working again.

Mozilla really needs to acknowledge whether pageAction is a supported API or not. Someone wrote a blog post on this topic a few years ago (Killing the Page Action API in Firefox’s Manifest V3 is a Mistake) but I don’t think Mozilla said anything about it. Leaving the API accessible but broken is worse than deleting it.

Looks like this issue is being tracked in 1984835 - Extension pageAction is not displayed on Android.

1 Like

Yes, that bug is consistent with what I found. ⚙ D229673 Bug 1920539 - Integrate new WebCompat feature into Menu redesign via feature flag shows that a previous version of WebExtensionsMenuBinding.kt was looking at both browserAction and pageAction.

1 Like