[tbb-bugs] #13247 [Tor Browser]: meek profile error after browser restarts (e.g., after update or add-on installation)

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Jun 25 19:29:09 UTC 2015


#13247: meek profile error after browser restarts (e.g., after update or add-on
installation)
-----------------------------+---------------------------------
     Reporter:  mcs          |      Owner:  tbb-team
         Type:  defect       |     Status:  needs_review
     Priority:  normal       |  Milestone:
    Component:  Tor Browser  |    Version:
   Resolution:               |   Keywords:  meek, tbb-usability
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+---------------------------------
Changes (by dcf):

 * status:  new => needs_review


Comment:

 It seems to come down to environment variables that Firefox sets when
 restarting. Specifically, XRE_PROFILE_PATH, which overrides the -profile
 option that meek-client-torbrowser uses. If I make this patch, then
 everything works with no profile error:
 {{{
 #!diff
 --- a/meek-client-torbrowser/meek-client-torbrowser.go
 +++ b/meek-client-torbrowser/meek-client-torbrowser.go
 @@ -146,6 +146,7 @@ func main() {
                 log.SetOutput(f)
         }

 +       os.Unsetenv("XRE_PROFILE_PATH")
         sigChan := make(chan os.Signal, 1)
         signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM)

 }}}

 I compared the environment that meek-client-torbrowser gets when started
 and restarted. The only difference is some added variables, which are:
 {{{
 +MOZ_APP_RESTART=1
 +NO_EM_RESTART=
 +TZ=UTC
 +XRE_BINARY_PATH=
 +XRE_PROFILE_LOCAL_PATH=/home/david/bug13247/tor-browser_en-
 US/Browser/TorBrowser/Data/Browser/profile.default
 +XRE_PROFILE_NAME=
 +XRE_PROFILE_PATH=/home/david/bug13247/tor-browser_en-
 US/Browser/TorBrowser/Data/Browser/profile.default
 +XRE_START_OFFLINE=
 +XUL_APP_FILE=
 }}}
 Notice that XRE_PROFILE_LOCAL_PATH and XRE_PROFILE_PATH point to
 profile.default, not profile.meek-http-helper. Firefox seems to prioritize
 XRE_PROFILE_PATH (didn't test XRE_PROFILE_LOCAL_PATH) over the -profile
 option on the command line. The profile error we've been seeing is
 actually caused by the headless browser trying to run the ''default''
 profile, instead of the meek-http-helper profile asked for on the command
 line.

 I can reproduce the profile error dialog now, using the meek-client-
 torbrowser delay from comment:16. This command raises the error if
 executed while Tor Browser is running (even if that Tor Browser is not
 running meek).
 {{{
 XRE_PROFILE_PATH=/home/david/bug13247/tor-browser_en-
 US/Browser/TorBrowser/Data/Browser/profile.default ./firefox -no-remote
 -profile TorBrowser/Data/Browser/profile.meek-http-helper
 }}}
 If you run the above command when Tor Browser is not running, then it
 starts a new Tor Browser instance with Tor Launcher and everything, so
 it's clear the problem is XRE_PROFILE_PATH overriding the -profile option.

 So do we just want to apply the Unsetenv patch to meek-client-torbrowser?
 It seems to suffice.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13247#comment:18>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tbb-bugs mailing list