#26336 closed defect (wontfix)

Update tor-browser-settings addon for Fennec 61

Reported by: sysrqb Owned by: tbb-team
Priority: High Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-mobile
Cc: igt0, gk Actual Points:
Parent ID: #26531 Points:
Reviewer: Sponsor:

Description

Installing tor-browser-settings results in:

I/Gecko   (21758): 1528468630190        addons.xpi      WARN    Invalid XPI: Error: Install manifest specifies unknown optionsType: 2 (resource://gre/modules/addons/XPIInstall.jsm:744:13) JS Stack trace: loadManifestFromRDF@XPIInstall.jsm:744:13

Indeed, in install.rdf is:

          <em:id>tor-browser-settings@torproject.org</em:id>
          <em:type>2</em:type>
          <em:bootstrap>true</em:bootstrap>
          <em:unpack>false</em:unpack>
          <em:version>1.0.0</em:version>
          <em:name>Tor Browser Settings</em:name>
          <em:description>Customize Orfox-related settings.</em:description>
          <em:creator>Thomas Rientjes</em:creator>
          <em:optionsURL>data:text/xml,&lt;placeholder/&gt;</em:optionsURL>
          <em:optionsType>2</em:optionsType>

Only options 3 and 5 are now valid:

    if (addon.optionsType &&
        addon.optionsType != AddonManager.OPTIONS_INLINE_BROWSER &&
        addon.optionsType != AddonManager.OPTIONS_TYPE_TAB) {
      throw new Error("Install manifest specifies unknown optionsType: " + addon.optionsType);
    }

From 52ESR

  // Constants for how Addon options should be shown.
  // Options will be opened in a new window
  OPTIONS_TYPE_DIALOG: 1,
  // Options will be displayed within the AM detail view
  OPTIONS_TYPE_INLINE: 2,
  // Options will be displayed in a new tab, if possible
  OPTIONS_TYPE_TAB: 3,
  // Same as OPTIONS_TYPE_INLINE, but no Preferences button will be shown.
  // Used to indicate that only non-interactive information will be shown.
  OPTIONS_TYPE_INLINE_INFO: 4,
  // Similar to OPTIONS_TYPE_INLINE, but rather than generating inline
  // options from a specially-formatted XUL file, the contents of the
  // file are simply displayed in an inline <browser> element.
  OPTIONS_TYPE_INLINE_BROWSER: 5,

From FF61

  // Constants for how Addon options should be shown.
  // Options will be displayed in a new tab, if possible
  OPTIONS_TYPE_TAB: 3,
  // Similar to OPTIONS_TYPE_INLINE, but rather than generating inline
  // options from a specially-formatted XUL file, the contents of the
  // file are simply displayed in an inline <browser> element.
  OPTIONS_TYPE_INLINE_BROWSER: 5,

Maybe we can use optionType: 5 without too much additional trouble.

Child Tickets

Change History (3)

comment:1 Changed 15 months ago by sysrqb

Parent ID: #26531

Required for first alpha.

comment:2 Changed 15 months ago by igt0

I took a look in what is needed to make it work:

  1. jpm[0] generates the install.rdf and it is deprecated. it sets the optionsType to 2 or 3[1]. we need to update it (or even the generated xpi) to use 3 or 5.
  1. Jetpack was removed in FF57[2], and tor-browser-settings uses it. So we need import it to tor-browser-settings(it is huge) or remove all the JetPack dependencies from the code.

I am not sure if the effort to make it work again makes sense or if we should redo it based on the new design.

[0] https://github.com/mozilla-jetpack/jpm
[1] https://github.com/mozilla-jetpack/jpm/blob/master/lib/rdf.js#L99
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1371065

comment:3 Changed 14 months ago by sysrqb

Resolution: wontfix
Status: newclosed

Yeah. I'm closing this as WONTFIX. Updating this extension for FF60 isn't worth our time. We'll concentrate on getting torbutton working on mobile, instead.

Note: See TracTickets for help on using tickets.