Embedded (hybrid) addon doesn't work on windows

Hello, me and my team are currently working on migration of our addon to webextensions. Because all of the APIs that we need were finished only in version 56 we started working on the migration just recently. As we already had Chrome extension, migration was quite straightforward, but painful nonetheless(but it’s not related to the problem). After finishing webext version I accidentally stumbled upon this article: https://blog.mozilla.org/addons/2017/03/17/migrating-webextensions-dont-forget-users/ and realised that all of the user preferences will be lost upon upgrade directly to webext and started working on the hybrid version. Making it didn’t take much time and after a couple of tests I’ve passed webext and hybrid builds to the QA.

Now the important part, I was working and testing everything on macOS, and our QA-tester works on windows computer, initially he wasn’t able to run any build(neither hybrid nor webext). Webext version wasn’t working because of https://bugzilla.mozilla.org/show_bug.cgi?id=1389718 and started working after fixes were released to beta channel. But hybrid version still doesn’t work (we tried beta and dev edition). But it works perfectly on macOS and linux(we tried on ubuntu)

This is what happens if I try to click extension icon: http://imgur.com/a/jWtGY
The only error that I get in the browser toolbox console is:

Use of nsIFile in content process is deprecated. loader.js:247:15

I’m not sure that it’s related to the problem, but anyway…

Did you have similar problems? Any ideas how we can test hybrid version on windows?

Just two ideas that may give you further information:

  • have you tried starting the SDK-Add-on with jpm? (without packing it)
  • what is the actual document.URL of whatever it is that is displayed in the panel? You should be able to find that out with either the Add-on debugger or the Browser Toolbox (Ctrl+Alt+Shift+I)

Hi NilkasG,
Yeah, I’ve just tried - it’s basically the same result:
I’ve tried on dev edition - as beta doesn’t want to run unsigned addons
There’re some errors in the end of the log:

1504258863304   addons.xpi      WARN    Error parsing extensions state: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [amIAddonManagerStartup.readStartupData]"  nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame :: resource://gre/modules/addons/XPIProvider.jsm :: loadExtensionState :: line 1544"  data: no] Stack trace: loadExtensionState()@resource://gre/modules/addons/XPIProvider.jsm:1544 < getInstallState()@resource://gre/modules/addons/XPIProvider.jsm:1579 < checkForChanges()@resource://gre/modules/addons/XPIProvider.jsm:3099 < startup()@resource://gre/modules/addons/XPIProvider.jsm:2178 < callProvider()@resource://gre/modules/AddonManager.jsm:269 < _startProvider()@resource://gre/modules/AddonManager.jsm:739 < startup()@resource://gre/modules/AddonManager.jsm:906 < startup()@resource://gre/modules/AddonManager.jsm:3090 < observe()@jar:file:///C:/Program%20Files/Firefox%20Developer%20Edition/omni.ja!/components/addonManager.js:65
JPM [error] Unable to read VR Path Registry from C:\Users\Phil\AppData\Local\openvr\openvrpaths.vrpath
[Child 3148] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
 
JPM [error] [Child 3148] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346

here is the full log: https://pastebin.com/g40d6MhL

I’m not sure how to get document.URL of this popup, but I see another error in Toolbox:

Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src moz-extension://5b8aaa3d-3a0b-4326-8e5b-6b0d4c0135fa”). Source:
'use strict';
var gTable, gOrderBy, gTB.... 5b8aaa3d-3a0b-4326-8e5b-6b0d4c0135fa:102

It sounds like you’re trying to access a file from a content script, which is restricted because of sandboxing. I believe it was going to be introduced on Windows first, which is what you are experiencing. Some of it has been introduced before 57, but I don’t know exactly when, and the documentation may be outdated.