1

I can't find any information on Tor Browser Bundle's handling of addons, so any help would be appreciated.

I wrote a basic addon for Firefox -- it was one of my first, so obviously it's pretty simple -- and exported it as an xpi. Then I installed it on Firefox Developer Edition and it ran flawlessly for several sessions. I had designed it to work with TBB, though, and when I tried to install it there, it would show as installed but not work.

The addon is supposed to scan a page for content, use simple storage to keep it, use notifications to show when the information is collected, and use a sidebar to display the information. It all works smoothly in FDE, but TBB fails at showing anything.

If there's some configuration I need to do to make it work, I'll do it. I just need to know what.

APIs used:

  • sdk/self
  • sdk/pagemod
  • sdk/notifications
  • sdk/simple-storage
  • sdk/ui

Hopefully someone here knows about Tor Browser Addons...

2 Answers 2

2

Finally figured it out. I knew it was something simple I was missing!

If you want an addon to function EXACTLY like it does outside of Tor Browser, you have to allow it in Private Browsing. I'd forgotten that TBB had Private Browsing on by default.

To do this, simply add this line to your package.json file before compiling:

"permissions": {"private-browsing": true}

NOTE: This in and of itself allows your addon to function in Private Browsing as it would outside Private Browsing. It's a good idea to allow an "off" function for when users want privacy.

For more details, check out the MDN article. It also gives extensions to enable or disable features in Private Browsing mode, but for use in Tor Browser this probably doesn't matter that much.

1

The latest version of TorBrowser is based on Firefox ESR version 31. Some of the addon features you are using in your code require perhaps a Firefox version higher than that. This can explain why the addon is working on Firefox Developer Edition and not on the older version present in TorBrowser.

You will have to inspect your code and refer to Add-on SDK pages on MDN to see if you are using any code that requires a higher version of Firefox. Make sure also to update your TorBrowser if you have not already done so, to ensure you're at least at version 31.

5
  • Thanks for the response, but it's not a version issue. Were that the case I could just use older APIs. I downloaded Firefox ESR (same version minus TBB components: both are 31.5.0) and the addon ran just fine. Any other suggestions?
    – ndm13
    Feb 28, 2015 at 0:57
  • perhaps your addon is conflicting with one of TorBrowser addons (such as NoScript or HTTPSEverywhere or even TorButton). Try disabling all those addons to see if they are affecting yours.
    – Linostar
    Feb 28, 2015 at 8:31
  • I've tried disabling all addons outside of Tor Launcher and even rewrote the code to use highly unique port calls, just in case. No change, and it works fine in Firefox ESR.
    – ndm13
    Feb 28, 2015 at 17:23
  • Just to be sure, what part of your addon doesn't work in TorBrowser, or does it not work at all?
    – Linostar
    Feb 28, 2015 at 18:00
  • So far as I can tell, nothing works. It runs on a PageMod condition, and when I meet that condition, nothing happens. There's supposed to be a notification and a sidebar is supposed to appear, but I can't even trigger the sidebar from the View menu. I'd say it's broken.
    – ndm13
    Feb 28, 2015 at 18:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .