Open Bug 1402110 Opened 7 years ago Updated 10 months ago

chrome.windows.create() ignores titlePrefix and fails to paint content

Categories

(WebExtensions :: Frontend, defect, P3)

57 Branch
defect

Tracking

(firefox57 wontfix)

UNCONFIRMED
Tracking Status
firefox57 --- wontfix

People

(Reporter: arantius, Unassigned)

References

Details

Attachments

(2 files)

Attached file win-create-busted.xpi
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0
Build ID: 20170816210852

Steps to reproduce:

Called e.g.

  chrome.windows.create({
    'height': 640,
    'titlePreface': 'My Title Preface',
    'type': 'popup',
    'url': chrome.runtime.getURL('dialog.html') + '?extra-data-here',
    'width': 480,
  });



Actual results:

I got a window, but the title bar says at the very beginning "moz-extension://....", there is no title preface.  More importantly the window is completely blank; if I right click (but not left click) inside the window, or resize the window, then the content paints.

This in Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0 (nightly) Built from https://hg.mozilla.org/mozilla-central/rev/47f7b6c64265bc7bdd22eef7ab71abc97cf3f8bf

In Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 (release) Built from https://hg.mozilla.org/releases/mozilla-release/rev/45ab6e362747102d00fd75378727fcddcfd35f44 titlePreface is not supported; remove that and at least the content is painted as expected.

See attachment, install and navigate to any page.


Expected results:

The window title bar should have contained "My Title Preface".  The window should have contained "This is my dialog".
P.S. I also just discovered because of this bug that WebExtensions is nastily forwards-incompatible.  I'm developing against non-stable but in stable my extension would crash because titlePreface is too new.  But https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/windows/create only mentions this roughly in passing in the compatibility matrix -- a sea of numbers and bright colors where it turns out "webextensions just work" was the right expectation _except_ for this one case.  This information should be more prominent, like, right in the titlePreface section.
Component: Untriaged → WebExtensions: Frontend
Product: Firefox → Toolkit
Priority: -- → P3
Replicated in 57 and 58 - not in 56
Clippings/wx [https://github.com/aecreations/clippings/blob/branches/6.0-wx/wx-src/background.js#L539] - pre-release alpha branch
TTSFox WebExtensions [https://github.com/ettoolong/TTSFox/blob/master/background.js#L115] 
though in both instances they use browser.windows.create()
Upcoming version of ReloadMatic also hit by this bug. For all others who get here, here is a nasty workaround until fixed in browser:

document.addEventListener("DOMContentLoaded", (event) => {
    // Fix for Fx57 bug where bundled page loaded using
    // browser.windows.create won't show contents unless resized.
    // See https://bugzilla.mozilla.org/show_bug.cgi?id=1402110
    browser.windows.getCurrent((win) => {
        browser.windows.update(win.id, {width:win.width+1})
    })
});
Despite including this supposed workaround seen in bug 1402110, comment 4 the bug still reproduces in all latest Firefox Quantum versions (57 & 58 as of November 12, 2017). Further discussed in the Clippings WebExtension Github issue https://github.com/ettoolong/TTSFox/issues/3
Also experienced in new NoScript WebExtension version 10.1.1.
Potentially Linux only? Clippings webextension managed to use the above fix as seen here - https://github.com/aecreations/clippings/commit/746b7b825513a5fe147103767577eb28de66dcc3
OK both TTSfox 
https://github.com/ettoolong/TTSFox/commit/578f2c1e5cb0cdc2941bed195192009d540b4d10
and Clippings, previously mentioned in Comment 6, have now fixed this. Noscript still has this bug in the XSS popup.
On each "All Tab Helper" WebExtention update i see same behavior - creation of empty window (which supped to contain changlog) which is revealed only after right click. Seeing it on Xubuntu Linux 17.10
This issue also affects the Mailvelope WebExtension in Firefox on Ubuntu and Arch Linux. Current affected version of Firefox is 57.0.2 64 bit.
One of my extension is also affected. When testing I find that it is more related to disabling the feature "out of process extensions" (enabled by default in Windows, disabled by default in Linux). The bug is seen when the feature is disabled in Windows, and not seen when it is enabled in Linux.
(In reply to jingyu9575 from comment #11)
> One of my extension is also affected. When testing I find that it is more
> related to disabling the feature "out of process extensions" (enabled by
> default in Windows, disabled by default in Linux). The bug is seen when the
> feature is disabled in Windows, and not seen when it is enabled in Linux.

Thank you! I confirm that works.
Despite having the "resize the window" work around ( comment#4 ) in place, this is still affecting real users ( https://github.com/greasemonkey/greasemonkey/issues/2876 ).  When/will this be fixed?
Ping.  Still happening on latest Firefox nightly ( Built from https://hg.mozilla.org/mozilla-central/rev/f94b64e0020225c71701930f193bd96c3ad1d150 , Mozilla/5.0 (X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0 ).  Repro:

 1. New empty profile.
 2. Launch nightly
 3. Download XPI attachment
 4 [review]. Open about:debugging
 5. Add as temporary addon
 6. Open any page so the content script runs.

Window pops up blank/empty, as attachment.  Right click in the window and the "This is my dialog" text becomes visible.
Flags: needinfo?(ddurst)
Product: Toolkit → WebExtensions
Users are still reporting this to us, we can't fix it:

https://github.com/greasemonkey/greasemonkey/issues/3006

Mass NI transfer.

Flags: needinfo?(thedurst) → needinfo?(jmathies)
Flags: needinfo?(jmathies)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: