Project

General

Profile

Bug #15709

Deal with Tor Launcher being integrated into Tor Browser 9.0 and Firefox 68esr possibly removing support for XUL/XPCOM extensions

Added by intrigeri over 1 year ago. Updated 6 months ago.

Status:
Resolved
Priority:
Elevated
Assignee:
Category:
Tor configuration
Target version:
Start date:
07/03/2018
Due date:
% Done:

30%

Feature Branch:
feature/16356-tor-browser-9.0+force-all-tests
Type of work:
Test
Blueprint:
Starter:
Affected tool:
Tor Launcher

Description

For Tor Browser 9.0, based on Firefox 68esr, the plan is to integrate Tor Launcher into Tor Browser, while still allowing us to disable it at runtime, and to run it as a XUL/XPCOM extension. It's not 100% clear to me if this implies we can still run it as a XUL app as we've been doing so far. This work "is planned for 9.0a1 which likely will ship in April".

And once Tor Browser is ported to Firefox 68esr, we probably won't be able to run it as a XUL app, since XUL/XPCOM extensions won't be supported by Firefox anymore. See the dedicated ticket: #16448.

https://trac.torproject.org/projects/tor/wiki/org/meetings/2018MexicoCity/Notes/TBBMeetingDays explains a bit the challenges & goals.

Upstream tickets:


Related issues

Related to Tails - Bug #14555: Migrate to Tor Launcher compatible with Firefox ESR60 Resolved 08/30/2017
Related to Tails - Bug #16448: Tor Launcher: deal with Firefox 68esr removing support for XUL/XPCOM extensions Rejected 02/08/2019
Related to Tails - Feature #15144: Consider migrating from Tor Launcher to anon-connection-wizard Confirmed 01/03/2018
Related to Tails - Bug #17215: Deal with Tor Launcher potentially disappearing entirely Confirmed
Blocks Tails - Feature #16209: Core work: Foundations Team Confirmed

Associated revisions

Revision af719e9d (diff)
Added by anonym 7 months ago

Adapt Tor Launcher installation vs Tor Browser 9.0a1.

As of Tor Browser 9.0a1 the Tor Launcher extension is a "system"
add-on (like pdfjs) but we can still convert it to something that can
be run as a XUL standalone application by just moving things around a
bit.

Refs: #16356, #15709

Revision 1744b37b (diff)
Added by anonym 7 months ago

Unsafe/Tor Browser: disable the integrated Tor Launcher.

Refs: #16356, #15709

Revision f74cec4d (diff)
Added by anonym 7 months ago

onion-grater: retry connecting to the real control port.

This should not be necessary and is just placed here as a workaround
until I can figure out the real issue (bug in onion-grater? bug in
stem?).

When working on the Tor Browser 9.0 migration there were issues with
Tor Launcher. It starts and does its initial connection to the control
port where it successfully fetches CONFs etc. When clicking "Connect"
it successfully sends a few more things and disconnects, only to
reconnect immediately later (due to some implementation detail in Tor
Launcher). This reconnection fails:

[...]
/usr/local/lib/tor-browser/firefox-unconfined (pid: 8865, user: tor-launcher, port: 57472, filter: tor-launcher): > SAVECONF
/usr/local/lib/tor-browser/firefox-unconfined (pid: 8865, user: tor-launcher, port: 57472, filter: tor-launcher) disconnected: Client closed its socket
[ Here comes the reconnect: ]
/usr/local/lib/tor-browser/firefox-unconfined (pid: 8865, user: tor-launcher, port: 57476, filter: tor-launcher) connected: loaded filter: tor-launcher
Final rules: [...]
Unable to connect to tor. Maybe it's running without a ControlPort?
/usr/local/lib/tor-browser/firefox-unconfined (pid: 8865, user: tor-launcher, port: 57476, filter: tor-launcher) disconnected: client quit
---------------------------------------

Exception happened during processing of request from ('127.0.0.1', 57476)
Traceback (most recent call last):
File "/usr/lib/python3.5/socketserver.py", line 625, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python3.5/socketserver.py", line 681, in init
self.handle()
File "/usr/local/lib/onion-grater", line 629, in handle
self.controller = self.connect_to_real_control_port()
File "/usr/local/lib/onion-grater", line 570, in connect_to_real_control_port
stem.connection.authenticate_cookie(controller, cookie_path=global_args.control_cookie_path)
File "/usr/lib/python3/dist-packages/stem/connection.py", line 803, in authenticate_cookie
auth_response = _msg(controller, msg)
File "/usr/lib/python3/dist-packages/stem/connection.py", line 1055, in _msg
return controller.msg(message)
AttributeError: 'NoneType' object has no attribute 'msg'
----------------------------------------

But if we just connect yet again, it works, hence the workaround.

Refs: #16356, #15709

History

#1 Updated by intrigeri over 1 year ago

  • Related to Bug #14555: Migrate to Tor Launcher compatible with Firefox ESR60 added

#2 Updated by intrigeri over 1 year ago

  • Related to Feature #15144: Consider migrating from Tor Launcher to anon-connection-wizard added

#3 Updated by intrigeri over 1 year ago

  • Target version set to 2019

#4 Updated by intrigeri about 1 year ago

  • Description updated (diff)

#5 Updated by intrigeri about 1 year ago

I've asked the Tor Browser team what's their timing for this change is.

#6 Updated by intrigeri about 1 year ago

  • Description updated (diff)
  • Target version changed from 2019 to Tails_3.13
  • Parent task set to #16047
  • Type of work changed from Wait to Code

The current goal upstream is to have this done in time for Tor Browser 8.5 (March).

#7 Updated by intrigeri about 1 year ago

#8 Updated by anonym 11 months ago

  • Parent task changed from #16047 to #16337

#9 Updated by sajolida 11 months ago

I don't understand the technicalities but it seems like they still want to make it possible to run it as a XUL app:

https://lists.torproject.org/pipermail/tbb-dev/2019-January/000951.html

#10 Updated by intrigeri 10 months ago

  • Priority changed from Normal to Elevated
  • Type of work changed from Code to Communicate

Next step: check if this proposal works for us and reply.

#11 Updated by intrigeri 10 months ago

  • Assignee set to intrigeri

I'll handle the part about communicating with the TB team.

#13 Updated by intrigeri 10 months ago

  • Subject changed from Deal with Tor Launcher being ported to a WebExtension to Deal with Tor Launcher being integrated into Tor Browser

#14 Updated by intrigeri 10 months ago

  • Subject changed from Deal with Tor Launcher being integrated into Tor Browser to Deal with Tor Launcher being integrated into Tor Browser (60esr edition)
  • Description updated (diff)

(Clarified the scope of the problem for Tor Browser 8.5 and Tails 3.13.)

#15 Updated by intrigeri 10 months ago

  • Affected tool set to Tor Launcher

#16 Updated by intrigeri 10 months ago

  • Related to Bug #16448: Tor Launcher: deal with Firefox 68esr removing support for XUL/XPCOM extensions added

#17 Updated by intrigeri 10 months ago

  • Related to deleted (Feature #15144: Consider migrating from Tor Launcher to anon-connection-wizard)

#18 Updated by intrigeri 10 months ago

  • Description updated (diff)

#19 Updated by intrigeri 10 months ago

sajolida wrote:

I don't understand the technicalities but it seems like they still want to make it possible to run it as a XUL app

Indeed. I've just reviewed this proposal and replied. At first glance the plan looks good for us, not too hard to implement on our side, and given this will be short-lived (until #16048), we don't need to bother on creating the perfect implementation.

I'll handle the communication with Tor Browser folks for now (it's not clear yet who'll take care of #16337 and I'm the only one of us who subscribed to the upstream ticket).

Note that they don't mention "XUL app" and I don't know if "XUL/XPCOM extension" implies we can run it as a XUL app. I don't see why not (for 60esr) but as soon as the corresponding changes are ready in a Tor Browser alpha + Tor Launcher Git, we should test this.

#20 Updated by intrigeri 10 months ago

This is for 3.14 (see email from geko on tails-dev) but I think we should work on this ASAP and not wait for post-3.13.

#21 Updated by intrigeri 10 months ago

  • Subject changed from Deal with Tor Launcher being integrated into Tor Browser (60esr edition) to Deal with Tor Launcher being integrated into Tor Browser 8.5

#22 Updated by intrigeri 10 months ago

  • Description updated (diff)
  • Target version changed from Tails_3.13 to Tails_3.14
  • Type of work changed from Communicate to Test

So this work upstream is now targeted at Tor Browser 9.0 (Firefox 68). So next steps are:

First, verify my assumption that we won't be able to run Tor Launcher as a XUL app in Firefox 68 (it still works in Firefox 65). We can test this as soon as Firefox 68 is out (July 9). But we could check Mozilla's plans right now if we wanted. I don't plan to do this but I'll do the bare minimum, i.e. test with Firefox 66 and 67 once they're out.

Then:

  • If indeed we won't be able to run Tor Launcher at all, then this ticket becomes: replace Tor Launcher with something else.
  • Else, if we can still run Tor Launcher, then this ticket remains about adjusting our stuff to Tor Launcher integration changes.

#23 Updated by intrigeri 10 months ago

  • Parent task deleted (#16337)

#24 Updated by intrigeri 10 months ago

  • Subject changed from Deal with Tor Launcher being integrated into Tor Browser 8.5 to Deal with Tor Launcher being integrated into Tor Browser 9.0

#25 Updated by intrigeri 10 months ago

  • Subject changed from Deal with Tor Launcher being integrated into Tor Browser 9.0 to Deal with Tor Launcher being integrated into Tor Browser 8.5

#26 Updated by intrigeri 10 months ago

  • Subject changed from Deal with Tor Launcher being integrated into Tor Browser 8.5 to Deal with Tor Launcher being integrated into Tor Browser 9.0 and Firefox 68esr removing support for XUL/XPCOM extensions

#27 Updated by intrigeri 10 months ago

  • Related to Feature #15144: Consider migrating from Tor Launcher to anon-connection-wizard added

#28 Updated by anonym 10 months ago

  • Assignee changed from intrigeri to anonym

Even if we won't be able to run the new Tor Launcher as a XUL app we might be able to run it in a "full" browser dedicated to only Tor Launcher. We might have to put in some amount of work upstream for our "configure then quit" use case (e.g. a "Save settings and quit" button).

Whatever we end up with, let's make sure it works in Wayland!

#29 Updated by intrigeri 9 months ago

#30 Updated by intrigeri 9 months ago

#31 Updated by intrigeri 8 months ago

  • Assignee deleted (anonym)
  • Target version deleted (Tails_3.14)

#32 Updated by anonym 7 months ago

GeKo pinged me on IRC resulting in an impromptu discussion about Tails vs the integrated Tor Launcher.

So the integration is done by making Tor Launcher into a system add-on (like pdfjs). It's unclear whether we can run that as a XUL standalone application. If we cannot the approach from comment #28 should work: we run a "full" browser with a dedicated profile where this system add-on enabled, and disable it in all other profiles. To achieve that we might have to add a "disable" pref to the add-on that makes it do nothing when set, because it seems difficult to disable such add-ons on a per-profile basis (according to GeKo, I don't know the details).

Finally, like mentioned above, we probably will have to do some work to get our "configure then quit" use case covered, e.g. add a pref that only Tails should set which adds a "Save and quit" button that kills the browser.

In short, it doesn't seem like this will be very scary work, so we can relax until 9.0a1 is out and we can see how it looks in practice.

#33 Updated by intrigeri 7 months ago

@anonym ACK, thanks for the update! Note that we may have to disable Torbutton in that dedicated browser, which might be tricky due to #16357 (see ongoing discussion on https://trac.torproject.org/projects/tor/ticket/10760 for details, feel free to add you to the CC list and take the lead there).

#34 Updated by intrigeri 7 months ago

  • Description updated (diff)

#35 Updated by intrigeri 7 months ago

Firefox 68.0a1 still supports running standalone XUL apps (see the tbb-dev thread for details).

#36 Updated by intrigeri 7 months ago

  • Subject changed from Deal with Tor Launcher being integrated into Tor Browser 9.0 and Firefox 68esr removing support for XUL/XPCOM extensions to Deal with Tor Launcher being integrated into Tor Browser 9.0 and Firefox 68esr possibly removing support for XUL/XPCOM extensions

#37 Updated by intrigeri 7 months ago

https://people.torproject.org/~gk/builds/9.0a1-build1/ has:

1) Tor Launcher is getting tighter integrated into the browser as a
preparation step for the switch to Firefox 68 ESR. That results in it
not showing up anymore on the about:addons page while still being
available (and we don't need to make a code-signing exception for it
either anymore, which is nice). See the underyling proposal for this
descision for full details.[1]

[…]

[1] https://gitweb.torproject.org/tor-browser-spec.git/tree/proposals/102-integrate-tor-launcher-into-tor-browser.txt

So we could now test how this works for us, in particular wrt. how we use Tor Launcher, how it impacts Tor Browser, and how things go wrt. the Unsafe Browser.

#38 Updated by intrigeri 7 months ago

  • Target version set to Tails_3.15

I think we should do this test ASAP in order to give the Tor Browser team as much time as we can to help us.

#39 Updated by anonym 7 months ago

  • Assignee set to anonym

I've successfully extracted Tor Launcher from Tor Browser 9.0a1 (it's located inside Browser/browser/omni.ja) and managed to run it as a standalone XUL application in Tails. All that was needed was moving files around and adjusting some paths.

So, yay, it works! :)

#40 Updated by intrigeri 7 months ago

I've successfully extracted Tor Launcher from Tor Browser 9.0a1 (it's located inside Browser/browser/omni.ja) and managed to run it as a standalone XUL application in Tails. All that was needed was moving files around and adjusting some paths.

So, yay, it works! :)

:)

#41 Updated by anonym 7 months ago

  • Status changed from Confirmed to In Progress

#42 Updated by anonym 7 months ago

  • % Done changed from 0 to 30
  • Feature Branch set to feature/16356-tor-browser-9.0

The feature branch has Tor Launcher running as a standalone XUL application, extracted from Tor Browser 9.0a1. My minimal testing indicates that everything works as it should, so as long as standalone XUL support remain in Firefox 68esr, we're good! \o/

#43 Updated by anonym 7 months ago

  • Feature Branch changed from feature/16356-tor-browser-9.0 to feature/16356-tor-browser-9.0+force-all-tests

#44 Updated by intrigeri 7 months ago

  • Status changed from In Progress to Resolved

anonym wrote:

The feature branch has Tor Launcher running as a standalone XUL application, extracted from Tor Browser 9.0a1. My minimal testing indicates that everything works as it should, so as long as standalone XUL support remain in Firefox 68esr, we're good! \o/

Yeah! Jenkins agrees so I think we can call this done :)

#45 Updated by anonym 6 months ago

  • Target version changed from Tails_3.15 to Tails_3.14.1

#46 Updated by intrigeri about 1 month ago

  • Related to Bug #17215: Deal with Tor Launcher potentially disappearing entirely added

Also available in: Atom PDF