Closed Bug 1107240 Opened 10 years ago Closed 8 years ago

Exception "Component does not have requested interface" (mobile)

Categories

(Add-on SDK Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: thomas, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:35.0) Gecko/20100101 Firefox/35.0 Build ID: 20141128004001 Steps to reproduce: 1. Create a new add-on using cfx init 2. Put the code (see below) in lib/main.js 3. Run the cfx command (see below). 4. Navigate to any page. System: Android/Firefox 34 SDK Git branch: firefox34 Command: cfx run -a fennec-on-device -b adb --mobile-app firefox --force-mobile Log: adb logcat | console lib/main.js code: var data = require('sdk/self').data; var pageMod = require('sdk/page-mod'); pageMod.PageMod({ include: '*', contentScriptWhen: 'ready', attachTo: 'top', contentScriptFile: data.url('mod.js'), contentStyleFile: data.url('mod.css') }); (my data/mod.js file is empty) Actual results: When running the addon and navigating to any page I get this error in adb logcat: E/GeckoConsole(23750): [JavaScript Error: "[Exception... "Component does not have requested interface" nsresult: "0x80004002 (NS_NOINTERFACE)" location: "JS frame :: resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///storage/emulated/legacy/jetpack-profile/extensions/jid1-401NAesIVVcWXQ@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/tabs/utils.js :: isFennecTab :: line 42" data: no]"] And my page mod script is not executed as expected. Expected results: The page mod script should be loaded and exectued. This worked as expected when using Android/Firefox 33
For me, it seems like contentStyleFile: data.url('mod.css') is causing the exception.
I have the same issue (and also did not in Fennec 33). Removing the content style file "solved" it for me as well.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Looks like this line of code is the culprit: > tab.QueryInterface(Ci.nsIBrowserTab) === tab;
This bug seems to be causing the following issue: https://github.com/kevincox/youtube-e2l/issues/10
Priority: -- → P1
This bug is causing the following issue as well: https://github.com/pratikabu/scrolltotop/issues/35
Does still reproduce on Firefox 40? Because bug 1167764 which is similar doesn't anymore.
Priority: P1 → --
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.