Commit 7ee11f5d authored by Kathleen Brade's avatar Kathleen Brade
Browse files

Bug 18947: not starting on OS X if put into /Applications

Display a better error message if tor exits and Tor Launcher was
never able to establish a connection to the control port (pointing
users to a possible error in their torrc may help them find and
fix the startup problem themselves).
parent 1df3415e
......@@ -3,6 +3,7 @@
torlauncher.error_title=Tor Launcher
torlauncher.tor_exited_during_startup=Tor exited during startup. This might be due to an error in your torrc file, a bug in Tor or another program on your system, or faulty hardware. Until you fix the underlying problem and restart Tor, Tor Browser will not start.
torlauncher.tor_exited=Tor unexpectedly exited. This might be due to a bug in Tor itself, another program on your system, or faulty hardware. Until you restart Tor, the Tor Browser will not able to reach any websites. If the problem persists, please send a copy of your Tor Log to the support team.
torlauncher.tor_exited2=Restarting Tor will not close your browser tabs.
torlauncher.tor_controlconn_failed=Could not connect to Tor control port.
......@@ -150,8 +150,25 @@ TorProcessService.prototype =
var s = TorLauncherUtil.getLocalizedString("tor_exited") + "\n\n"
let s;
if (!this.mDidConnectToTorControlPort)
// The "tor_exited_during_startup" property string was added in
// May 2016. If it is available, we use it; otherwise, we fall back
// to the older "tor_exited" message (below). Once this new string
// has been translated into all of the languages that we ship, we
// can simplify this code.
let key = "tor_exited_during_startup";
s = TorLauncherUtil.getLocalizedString(key)
if (s == key) // No string found for key.
s = undefined;
if (!s)
s = TorLauncherUtil.getLocalizedString("tor_exited") + "\n\n"
+ TorLauncherUtil.getLocalizedString("tor_exited2");
TorLauncherLogger.log(4, s);
var defaultBtnLabel = TorLauncherUtil.getLocalizedString("restart_tor");
var cancelBtnLabel = "OK";
......@@ -178,6 +195,7 @@ TorProcessService.prototype =
var haveConnection = this.mProtocolSvc.TorHaveControlConnection();
if (haveConnection)
this.mDidConnectToTorControlPort = true;
this.mControlConnTimer = null;
this.mTorProcessStatus = this.kStatusRunning;
......@@ -282,6 +300,7 @@ TorProcessService.prototype =
// Private Member Variables ////////////////////////////////////////////////
mTorProcessStatus: 0, // kStatusUnknown
mDidConnectToTorControlPort: false, // Have we ever made a connection?
mIsBootstrapDone: false,
mBootstrapErrorOccurred: false,
mIsQuitting: false,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment