Opened 3 years ago

Closed 3 years ago

#18928 closed defect (fixed)

Mac OS: alpha channel upgrade is not smooth

Reported by: mcs Owned by: tbb-team
Priority: High Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: ff45-esr, TorBrowserTeam201605R
Cc: brade, gk, boklm, arthuredelstein Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by mcs)

On Mac OS, when I upgrade to Tor Browser 6.0a5 from an older version, it does not go well. After applying the MAR update and restarting, tor is not started and Tor Launcher displays this error:

Unable to start tor
The Tor executable is missing

Quitting and restarting a second time seems to fix the problem.

Child Tickets

Change History (11)

comment:1 Changed 3 years ago by mcs

Description: modified (diff)

comment:2 Changed 3 years ago by mcs

Kathy and I will have to do more debugging later, but it looks like the existing profile is not migrated at the time that the error message is displayed. I guess it must be using the old profile until the second restart.

comment:3 Changed 3 years ago by mcs

During the failed startup, a TorBrowser-Data directory is created but it is nearly empty:

TorBrowser-Data/
  Browser/
    Caches/

My current guess at what is happening: the restart-after-update passes the location of the old profile via an env var (which causes it to be used when we do not want it to be), and that env var is cleared before the second restart (which causes a new profile to be created and our profile migration code to be executed).

I know we tested this, but maybe not correctly and probably not with an ESR45-based browser.

comment:4 Changed 3 years ago by gk

Cc: gk added
Keywords: TorBrowserTeam201604 added

comment:5 Changed 3 years ago by brade

Cc: boklm added
Keywords: ff45-esr added

Before restart, XRE_PROFILE_PATH is set to the profile path. See:
http://mxr.mozilla.org/mozilla-esr45/source/toolkit/xre/nsAppRunner.cpp#4419

This causes the SelectProfile() function to use that profile (and therefore our migration code never gets a chance to run). See:
http://mxr.mozilla.org/mozilla-esr45/source/toolkit/xre/nsAppRunner.cpp#2333

The right fix is probably to ignore the XRE_PROFILE_PATH env variable if it contains the path of the old default profile location (.../TorBrowser.app/TorBrowser/Data/Browser/profile.default).

gk or boklm: We should add something to the TB 6.0a5 blog post to let people know to expect this problem (they should quit and start TB again to fix things).

comment:6 Changed 3 years ago by boklm

I updated the TB 6.0a5 blog post to mention this bug in the list of known issues.

comment:7 Changed 3 years ago by gk

Keywords: TorBrowserTeam201605 added; TorBrowserTeam201604 removed

Moving tickets

comment:8 Changed 3 years ago by mcs

Keywords: TorBrowserTeam201605R added; TorBrowserTeam201605 removed
Status: newneeds_review

comment:9 Changed 3 years ago by gk

Cc: arthuredelstein added

Looks good to me. Arthur, care about having a look too?

comment:10 Changed 3 years ago by arthuredelstein

Looks good to me as well.

comment:11 Changed 3 years ago by gk

Resolution: fixed
Status: needs_reviewclosed

Applied to tor-browser-45.1.0esr-6.0-1 (commit d4f5d1c3704007cadaf6a37f3b8330f4e1930828).

Note: See TracTickets for help on using tickets.