Closed
Bug 963972
Opened 11 years ago
Closed 11 years ago
require('sdk/tabs/utils') does not work in FF26-29
Categories
(Add-on SDK Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: mingyiliu, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 (Beta/Release)
Build ID: 20131205075310
Steps to reproduce:
Try to put either
var { getActiveTab } = require('sdk/tabs/utils');
or
var tabUtils = require("sdk/tabs/utils");
in an Addon SDK-based addon code at beginning.
Actual results:
Execution of code fails at the tabs/utils line in FF26 stable and FF29 nightly.
Expected results:
Either or both ways should have worked. I know tabs/utils are labeled as unstable, but for now I need it as a replacement for the deprecated tab-browser.activeTab since FF29 nightly retired sdk/deprecated/tab-browser, and tabs/utils is supposed to be the replacement. Any idea why this doesn't work?
Updated•11 years ago
|
Component: Untriaged → General
Product: Firefox → Add-on SDK
Version: 26 Branch → unspecified
Comment 1•11 years ago
|
||
this seems strange.. the module is labeled "unstable", but it should work in Fx26/29.
> Execution of code fails at the tabs/utils line in FF26 stable and FF29
> nightly.
can you provide the exact error/exception that is reported at that line?
also, can you provide a bit more information on your environment/installation/testing process? what version of SDK are you using? what version of Python? are you testing your addon via the `cfx run` command line, or packing it with `cfx xpi` and adding it to firefox manually?
most likely it's an outdated SDK version.. can you try SDK 1.15 (for release Firefox), or even pull the master branch from git (for use with Nightly).
Flags: needinfo?(mingyiliu)
Comment 2•11 years ago
|
||
I suspect this is from an outdated SDK -- 1.16 should be released soon in bug 961846.
Also, using the master branch from the repository like Tomislav mentioned should do the trick
Reporter | ||
Comment 3•11 years ago
|
||
Sorry, been busy lately. I was using SDK 1.15. I tried to make a minimal addon as example and found that the code actually worked there. However, it didn't work in my Fastest Search addon, which worked fine otherwise. I think there's some condition that would make this code not work, but did not find out what condition it was yet. Will try again soon and post here.
Flags: needinfo?(mingyiliu)
Reporter | ||
Comment 4•11 years ago
|
||
I did a little more testing but didn't have time to extensively do it. It was inconclusive. On different FF version this bug may or may not show up, and when it doesn't show up I do notice some other error message that disabled part of my addon and it seems related to this line (remove it the issue's gone).
Anyway you can close this bug for now as I do not have time to test more on this. But given that its inconsistent behavior, it's not a reliable API it seems and I won't be using it or testing more on it.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•