Tab pages for OOP extensions don't work when e10s is disbled

RESOLVED DUPLICATE of bug 1393150

Status

RESOLVED DUPLICATE of bug 1393150
a year ago
6 months ago

People

(Reporter: mozilla, Unassigned)

Tracking

(Blocks: 1 bug)

56 Branch

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID: 20170628075643

Steps to reproduce:

I have three files:  background.js, /foo/bar.html, and /foo/bar.js.

In background.js:
function writeSuccessful () {
	console.log ("Write successful.");
	browser.tabs.create({url : "/foo/bar.html"});
}
function writeFailed (error) {
	console.log(`Error: ${error}`);
}
browser.storage.local.set({"storageTest" : "BLAH"}).then(writeSuccessful, writeFailed);

In /foo/bar.html
....
    <script src="storageTest.js" type="text/Javascript"></script>
  </body>
</html>


In storageTest.js:
var readSuccessful = function (savedObj) {
  console.log ("Read successful.");
}
var readFailed = function (error) {
  console.log ("Reading failed.");
}

document.addEventListener("DOMContentLoaded", function () {
  console.log ("Getting stored stuff.");
  var getting = browser.storage.local.get("storageTest").then(readSuccessful, readFailed);
});
console.log ("/foo/bar.js loaded");

----------------------------------------------
This bug seems to have appeared in 56.0b2 Developers Edition.



Actual results:

In the Browser Console:
Write successful					background.js:2              
/foo/bar.js loaded					          bar.js:12
Getting stored stuff				           bar.js:9


Expected results:

In the Browser Console:
Write successful					background.js:2              
/foo/bar.js loaded					          bar.js:12
Getting stored stuff				           bar.js:9
Read successful.						   bar.js:2
(Reporter)

Comment 1

a year ago
Note:  I've tried this in both 64 bit and 32 bit on Windows. The problem occurs in both.
(Reporter)

Comment 2

a year ago
Also note I've tried the following:
* The stored value _can_ be retrieved in the background.js script.  ie:  The value _is_ saving to storage.
* If I load a content script (from manifest.json, or browser.tabs.executeScript()), that content script _can_ retrieve the storage.

So I know the value _is_ being stored.

In manifest.json, I tried adding:
"content_scripts": [
  {
    "matches": ["*://*/foo/bar.html"],
    "js":["/foo/storageTest.js"]
  }
]

In this case, /foo/storageTest.js doesn't even load.  (That may even be another bug.)
(Reporter)

Updated

a year ago
Component: Untriaged → WebExtensions: General
Product: Firefox → Toolkit
(Reporter)

Comment 3

a year ago
After playing with some preferences regarding the Browser Console, I found these errors were appearing when browser.storage.local.get() was executing:

Attempt to create privileged extension parent from incorrect child process  ExtensionParent.jsm:646
	createProxyContext resource://gre/modules/ExtensionParent.jsm:646:15
	receiveMessage resource://gre/modules/ExtensionParent.jsm:598:11

Error: WebExtension context not found!  ExtensionParent.jsm:778:13

Comment 4

a year ago
Do you have e10s support enabled or disabled? Could you go to about:support and tell us the values for Multiprocess Windows and Web Content Processes please?
Flags: needinfo?(mozilla)
Summary: Storage API doesn't work on an internal .js called with tabs.create(). → Tab pages for OOP extensions don't work when e10s is disbled
Blocks: 1190679
Status: UNCONFIRMED → RESOLVED
Last Resolved: a year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1393150
(Reporter)

Comment 6

a year ago
(In reply to Andy McKay [:andym] from comment #4)
> Do you have e10s support enabled or disabled? Could you go to about:support
> and tell us the values for Multiprocess Windows and Web Content Processes
> please?

This is what I have:

Multiprocess Windows 	0/1 (Disabled by accessibility tools)
Flags: needinfo?(mozilla)
(Reporter)

Comment 7

a year ago
(In reply to mozilla from comment #6)
> (In reply to Andy McKay [:andym] from comment #4)
> > Do you have e10s support enabled or disabled? Could you go to about:support
> > and tell us the values for Multiprocess Windows and Web Content Processes
> > please?
> 
> This is what I have:
> 
> Multiprocess Windows 	0/1 (Disabled by accessibility tools)

And I have nothing for Web Content Processes in about:support.

Updated

6 months ago
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.