Versions:
UblockO 1.14.14
Firefox android 56.0
Android 7.0
Latests versions atm. However the issue has been occuring for several months.
The first tab loaded into firefox android upon opening firefox does not have "my filters" rules enabled. Attempting to use the element picker for this tab will result in nothing happening. The element picker button will change from gray to black, but it will not go back to the previous tab from the ublocko specific android tab.
Any subsequent tabs opened will behave as normal. If one loads the exact same page after closing and opening the tabs, "my filters" will be applied, and element picker works.
Issue persists after firefox factory reset+ublocko install.
However, subscribed filter lists will work on the first tab. Very oddly specific bug.
"Advanced/Restore tabs" aka "remember tabs from last time" does not affect it. The first tab is always bugged. But if enabled and one restarts with multiple tabs, the second tab is normal.
I could reproduce with Firefox for Android 56. I see that the overlay is not there, but the links stop working on the page, this suggests the element picker is installed, but not functional.
I couldn't reproduce with Firefox for Android Nightly.
Anybody can try with Firefox for Android 57?
Given the above, I suspect browser issue. I will need to see what the browser console says, that part is a bit time consuming.
Yeah, reproduced on Firefox Android Nightly 58.0a1 with a fresh install. Completely same behaviour.
Also reproduced on Firefox Android Beta 57.0b9 with a fresh install.
The load event of the inserted iframe used by the element picker is never fired for the first tab. This means this is a Firefox issue.
Edit: issue is broader. Message passing is not working at all in that first tab. So uBO's content script (responsible for cosmetic filtering and collapsing) is waiting forever for a response from the main process.
Should someone go leave a message on bugzilla?
The issue is not the load event, I had placed my breakpoint at the wrong spot.
The issue does seem to be this code at line 459 of resource://modules/ExtensionChild.jsm:
let recipient = Object.assign({}, sender);
if (recipient.tab) {
recipient.tabId = recipient.tab.id;
delete recipient.tab;
}
I observe that the tab property is absent when the issue occur, and not absent when the issue does not occur. When tab property is absent, uBO's content scripts seem to be unable to receive messages from uBO's main process.
The current above source code is at https://github.com/mozilla/gecko-dev/blob/1cdb198bd9e1d2605ac48d2588e29475fb01a74e/toolkit/components/extensions/ExtensionChild.jsm#L519.
This bug may be related to what we see here https://bugzilla.mozilla.org/show_bug.cgi?id=1396270
And following, this bug may be ralated to missing menu items https://bugzilla.mozilla.org/show_bug.cgi?id=832990
And this all may be related to Firefox storing some data in volatile memory ("activities"?)
On my side uBO is definitely in memory, and there is always an entry in the menu. It seems to me this is just a improperly initialized extension framework for the first tab. I'm going to need to create a minimalist extension to demonstrate the issue in bugzilla when I have the time.
I cleaned my firefox profile today, and this seems to fix my "missing menu items" issue for now.
Edit: is enough to change font size in phone settings, and it's back
Will check later if "first page" problem is also fixed on my side.
Edit:
The element picker button will change from gray to black, but it will not go back to the previous tab from the ublocko specific android tab.
When I go manually to the first tab, then picker seems to work (?)
Edit: UBO 1.14.16 on Nightly
https://bugzilla.mozilla.org/show_bug.cgi?id=1410749#c2 "Addons not working for the first tab after application start" marked as duplicate OP is fighting :)
We already had some problems because the Webextensions implementation didn't properly deal with the fact that on Fennec, tab IDs start from 0 (bug
1384964), so I wonder if this is another instance of this?
Same issue with uBlock 1.14.18 on Firefox Beta 57.0 on Windows 10 and Firefox 58.0a1 on Ubuntu.
The issue is not present elsewhere than Firefox for Android. You need to investigate on your side for another explanation -- it works fine here.
For the record: I do have this issue using Firefox 57 (stable) on OSX with uBO 1.14.18 as well. E.g. in the first tab the element picker doesn't work and certain ads are not blocked/hidden. There's no problem on all subsequently opened tabs.
Also note that "first tab" is the first actively opened tab. When my browser restores with 10 tabs, the affected one is the first tab I opened myself (11th).
Same problem here on Windows 10 with Firefox 58 beta. The first tab is a locked one (small tab)
The bugzilla issue is not marked as resolved, so this is expected you will have same issue with FF58.