Closed Bug 1624124 Opened 7 months ago Closed 7 months ago

Port.sender doesn't include frameId, breaks part of uBlock Origin

Categories

(WebExtensions :: General, defect, P1)

76 Branch
defect

Tracking

(firefox-esr68 unaffected, firefox74 unaffected, firefox75 unaffected, firefox76 verified)

VERIFIED FIXED
mozilla76
Tracking Status
firefox-esr68 --- unaffected
firefox74 --- unaffected
firefox75 --- unaffected
firefox76 --- verified

People

(Reporter: nayinain, Assigned: zombie)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0

Steps to reproduce:

  1. Install the uBlock Origin.(https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/)
  2. Add this rule to my filters in uBlock Origin.
    (bugzilla.mozilla.org###header)
  3. Refresh the current page.

Actual results:

The header bar on this page is not hidden.

Expected results:

The header bar on this page is hidden.

Regression window

2020-03-21T21:17:41: INFO : Narrowed integration regression window from [46865808, 49ad9716] (3 builds) to [46865808, 601e0a6a] (2 builds) (~1 steps left)
2020-03-21T21:17:41: DEBUG : Starting merge handling...
2020-03-21T21:17:41: DEBUG : Using url: https://hg.mozilla.org/integration/autoland/json-pushes?changeset=601e0a6a8ee9ed0b2aad9c79af8f903c171e89fd&full=1
2020-03-21T21:17:44: DEBUG : Found commit message:
Bug 1316748 - Move Port messaging off MessageChannel r=mixedpuppy

Differential Revision: https://phabricator.services.mozilla.com/D67302

2020-03-21T21:17:44: DEBUG : Did not find a branch, checking all integration branches
2020-03-21T21:17:44: INFO : The bisection is done.
2020-03-21T21:17:44: INFO : Stopped

Has Regression Range: --- → yes
Has STR: --- → yes
Keywords: regression
Regressed by: 1316748

Hey Raymond, could you please check this out and help me figure out a reduced test case of what's exactly broken/regressed here? I'm not familiar with uBO source code, so it might take me a couple of days to investigate the root cause otherwise.

Thanks!

Flags: needinfo?(rhill)
Status: UNCONFIRMED → NEW
Ever confirmed: true

Coincidentally, I received a notification about the issue here while I was right in the middle of investigating why a promoted post on Twitter was not cosmetically removed by uBO, so surely this is probably related. I will continue to investigate to narrow down to the point of failure.

Status: NEW → UNCONFIRMED
Ever confirmed: false
Flags: needinfo?(rhill)

uBO's message handler expect the property frameId to be present in the MessageSender object passed to Port.onMessage's listener, but I see that the frameId property is present but it is set to undefined. This is the issue.

Scriptlet injection is also not working FYI.

off-topic -- is there's a way to roll-back to previous version of Nightly ?

Regressions from bug 1316748. We had tests for sender.frameId, but they
were all for runtime.sendMessage() and friends. Unfortunatelly, bug 1316748
was split to only deal with Ports, so I sdded some tests to cover this case
as well.

Assignee: nobody → tomica
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P1
Summary: Cosmetic filters do not work in uBlock Origin → Port.sender doesn't include frameId, breaks part of uBlock Origin

If someone wants to verify the fix, click on the treeherder link above, then a green Ba link for your platform, and then "Job Details" in the lower panel should have a binary package called target.tar.bz or target.dmg (Windows artifact builds from my base revision don't work for some unrelated reason).

(In reply to rhill@raymondhill.net from comment #4)

uBO's message handler expect the property frameId to be present in the MessageSender object passed to Port.onMessage's listener, but I see that the frameId property is present but it is set to undefined. This is the issue.

Thank you for jumping on this so quick Raymond, and for the speedy investigation!

Pushed by tjovanovic@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a1bea41f99f4
Port.sender should include a frameId r=aswan
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76

(In reply to Tomislav Jovanovic :zombie from comment #9)

If someone wants to verify the fix, click on the treeherder link above

Sorry I was not in a position to test the fix yesterday. However I confirm that after Nightly updated this morning, cosmetic filtering is working as expected, and I verified in the debugger that frameId is properly set.

Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.