Closed Bug 1599352 Opened 6 years ago Closed 2 years ago

Addon doesn't apply tabs.insertCSS randomly, Windows only

Categories

(WebExtensions :: General, defect, P3)

70 Branch
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: daniel, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(2 files)

Attached file plugin.zip

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0

Steps to reproduce:

abs.insertCSS is randomly not applied, only in Windows 10, in both the latest FF Dev Edition or FF 70.0.1, and only when error Unchecked lastError value: Error: No matching message handler occurs and points to the line which calls tabs.insertCSS

Test URL: https://www.paypal.com/uk/signin
Please reload it many times (from 3 to 15 in my case, every time it happens differently) in order for the issue to occur.

Actual results:

The sticky (originally blue) warning about cookies on the bottom of the page sometimes remains blue, while the inserted CSS should paint it red every time.

Expected results:

The sticky (originally blue) warning about cookies on the bottom of the page should always be red.

This bug made many users of my "I don't care about cookies" extension to report a visible cookie warning which can't be reproduced in Firefox for Linux or even Chrome/Opera equivalent extensions which use the same code. Some of them use FF 68, so it may be a much older bug.

Product: Firefox → WebExtensions

Hello,

I have attempted to reproduce the issue based on the provided STR and the attached extension, on the latest Nightly (72.0a1/20191201211801), Beta (71.0/20191125204040), Release (70.0.1/20191030021342) and Dev Edition (71.0b12/20191121155457) under Windows 10 Pro 64-bit and MacOS Catalina 10.15, however with NO success.

I have reloaded the page 50+ times on each FF version and the CSS was properly applied each time i.e. the warning about cookies was always red.

Do you by any chance have other installed add-ons which might wrongly interact with the test extension and cause the issue?
Furthermore, can you see if you can reproduce the issue on a new profile? For this, follow the instructions listed at https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles .

Thanks !

Flags: needinfo?(daniel)

I attached the screenshot from Windows 10 (which is the dev version of windows run with VirtualBox).

I just made a new test with freshly installed Firefox Dev edition 72.0b3 with no other extension ever installed. The problem persists, one in four reloads keeps the warning blue (css not attached to the page).

Can I do something to get closer to the source of the problem?

The priority flag is not set for this bug.
:jimm, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jmathies)

This is likely an issue with timing of events and (cashed) innerWindowId we use to target these calls, and will probably be fixed by fission changes.

Depends on: fission-webext
Priority: -- → P3
Flags: needinfo?(jmathies)

:zombie I don't know what fission is :) Is there a way to test this? Can I get a FF version where it should be fixed?

Not yet, I marked it as dependent bug, and will retest once there is new code to test. I'll let you know if I need any help. :)

https://wiki.mozilla.org/Project_Fission

I'm a user of the add-on in which this bug causes problems, "I don't care about cookies". I find that a very useful add-on because it suppresses those annoying "This website uses cookies" warnings, and there's no alternative. I was referred to this page from https://support.mozilla.org/en-US/questions/1280267. I'd like to ask the FF dev team to give this bug (a higher) priority if that's possible. The add-on used to work very well, but lately is letting warnings through that it didn't in the past.

Thanks in advance.

If the CSS injection logic of the add-on is based on the URL only (plus maybe some page-specific details), then the contentScripts.register API can be used instead of webNavigation.onCommitted + tabs.executeScript (=what the "I don't care about cookies" add-on is doing right now).

Hi,

Unfortunately I was not able to reproduce this issue on Windows 10 with Firefox version Nightly 75.0a1 (2020-02-21) (64-bit) - Beta 74.0b6 (64-bit) - Release 73.0.1 (64-bit).
I'm setting component to WebExtensions - General.

Component: Untriaged → General

I wasn't able to reproduce this either, but from what I expect was the problem is probably gone after this code was refactored in bug 1587541. Can you please confirm if this is still reproducible.

Flags: needinfo?(daniel)

Similar issue on Firefox 82.0 (64-bit Arch Linux) reported in https://github.com/lauriro/json-lite/issues/55

json-lite extension uses tabs.insertCSS and rules are applied randomly.
Rules will be applied when console opened. Nothing in logs.

When I add 100ms, 1s or 5s delay for insertCSS, then rules still be applied randomly.

tabs.insertCSS applies ~25% times.

By adding chrome.tabs.executeScript(from.tab.id, { code: "document.body.offsetTop", frameId: from.frameId }) right after tabs.insertCSS, rules will be applied ~90% times.

@Lauri Could you share a minimal test case that reproduces the problem? I loaded your extension, visited a JSON file (also a JS file) at localhost and the extension seems to work as intended.

Depends on: 1673930

Thanks Lauri. Your issue is different from the originally reported issue. I filed a new report at bug 1673930.

Severity: normal → S3

A needinfo is requested from the reporter, however, the reporter is inactive on Bugzilla. Closing the bug as incomplete.

For more information, please visit BugBot documentation.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Flags: needinfo?(daniel)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: