Closed Bug 1396729 Opened 7 years ago Closed 7 years ago

content script stopped loading in popup window post firefox 55.0.3 release for my firefox addon

Categories

(WebExtensions :: General, defect, P3)

55 Branch
defect

Tracking

(firefox55 wontfix, firefox56 fixed, firefox57 fixed)

RESOLVED DUPLICATE of bug 1374129
Tracking Status
firefox55 --- wontfix
firefox56 --- fixed
firefox57 --- fixed

People

(Reporter: kapilratra, Unassigned)

Details

(Keywords: regression)

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0
Build ID: 20170824053622

Steps to reproduce:

1.Install test & feedback extension from https://aka.ms/ffselfhostedinstall and install the xpi.
2. In our manifest we had <all_urls> for content script and we expected the content script to load in all pages as before.
3. We had an integration scenario with visualstudio.com where we opened a new page Runner window as popup.
So for step 3 we were loading our page with window.open(url, "", "location=0,status=0,scrollbars=1,top=0,left=0")
4. We are getting below error in console:
"XML Parsing Error: no root element found
Location: https://kapilr.visualstudio.com:443/DefaultCollection/agile/_testExecution/Index
Line Number 1, Column 1: "

(Note above error use to come in older firefox verison)






Actual results:

The content script of our firefox extension is not getting loaded in popup page. 
The content script was loading in firefox 54 and post Aug 27 release the functionality is broken.
On doing refresh of the popup page the content script gets loaded but our mainline scenario is broken since if extension is installed we provide users some options 



Expected results:

The content script should load for the popup window as in older versions of firefox.

THis is regression in Aug 27 release. 

Please help us in fixing this so that we can unblock our customers
Component: Untriaged → WebExtensions: General
Product: Firefox → Toolkit
Can someone prioritize this. If it is known issue please let us know if this will get fixed in next firefox update. I can schedule a meeting to show repro
Most bugs are dealt with at a weekly triage. Can you condense this down to a more succinct steps to reproduce? I think you are trying to say that a content script is not being run on a page opened up with window.open. 

As an example I took borderify from our mdn webextensions repo and then changed it to be on <all_urls>. I then opened example.com through window.open and noticed that it had a red border.
Thanks Andy for reply. I feel the issue occurs when a page has some console errors and is openened up in window.open then the content script is not getting applied.

Now this is my assumption. For my page this error was coming "XML Parsing Error: no root element found
Location: https://kapilr.visualstudio.com:443/DefaultCollection/agile/_testExecution/Index
Line Number 1, Column 1: "

But this error comes only in firefox for me and was always coming in older versions also.

To get alternate repro I tried below :

1. I installed borderify and changed it <all_url> in manifest.json for content script.
2. Now from browser console in firefox call window.open("https://marketplace.visualstudio.com/items?itemName=ms.vss-exploratorytesting-web#supportedbrowsers", "", "location=0,status=0,scrollbars=1,top=0,left=0")
3. Allow popups in case popups are not allowed
4. Now when new window opens up post the page is loaded the boderify.js of boderify does not load. Checked from console debugger
5. Press F5 on the new window. The boderify.js gets loaded . Verified from console debugger.

Here error coming in console was "Loading mixed (insecure) display content “http://video.ch9.ms/ch9/2729/753c3036-7de3-408d-ade7-460d7b3e2729/GettingStartedv1_high.mp4” on a secure page[Learn More]".
I have that the same things work for firefox version 54.0.1 and is regressed in 55.0.3.

Can someone please have a look at this regression
Priority: -- → P3
Below are the crisp and consistent repro steps.

I found that manifest.js if contains match_about_blank : true for content script then it fails to load in new window when opened programatically.
 

Repro steps:
- Take boderify addon as discussed above.
- Change the content script section in manifest to below :
 "content_scripts": [
    {
      "matches": ["<all_urls>"],
      "js": ["borderify.js"],
	  "all_frames": true,
      "run_at": "document_end",
      "match_about_blank":  true
    }
- Open www.google.com. We see the boder there.
- in console type  window.open("https://www.google.com", "", "location=0,status=0,scrollbars=1,top=0,left=0")
- border will not appear since script is not loaded 
- press refresh on the popup page opened. Then border appears.


And this is a regression in 55.0.3 from 54.0.1

May be this will help in fixing the issue
Thanks for the consistent steps. I tested back to Firefox 54 and I was able to reproduce it in Firefox 54 and 55. I was not able to in Firefox 56 or 57. If agree with that assessment we'll close this since Firefox 55 has already been released and this is fixed in the next release.
mozregression -> fixed by bug 1374129

PS. location=0 in window.open doesn't do anything in window.open calls from a normal web page. The location bar is always shown.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.