Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Tor control socket error when network is disconnected #14630

Closed
srirambv opened this issue Jul 2, 2018 · 8 comments · Fixed by #14675, #14703 or #14721
Closed

Tor control socket error when network is disconnected #14630

srirambv opened this issue Jul 2, 2018 · 8 comments · Fixed by #14675, #14703 or #14721

Comments

@srirambv
Copy link
Collaborator

srirambv commented Jul 2, 2018

Description

Tor control socket error when network is disconnected. Found while testing #14585

Test plan / Steps to Reproduce

  1. Disconnect from network
  2. Launch brave beta from console and open a tor tab
  3. Console logs error

Actual result:
image

Expected result:
Should not encounter socket error

Reproduces how often:
100%

Brave Version

about:brave info:

Brave 0.23.21
V8 6.7.288.46
rev 7240522
Muon 7.1.4
OS Release 10.0.17134
Update Channel Beta
OS Architecture x64
OS Platform Microsoft Windows
Node.js 7.9.0
Tor 0.3.3.7 (git-035a35178c92da94)
Brave Sync v1.4.2
libchromiumcontent 67.0.3396.103

Reproducible on current live release:
Maybe

Additional Information

@btlechowski
Copy link
Contributor

Also reproduced on Ubuntu 17.10 x64, Brave v0.23.21

@riastradh-brave
Copy link
Contributor

Wacky! @btlechowski Do you have full console output from that?

@riastradh-brave
Copy link
Contributor

Also, can you share ${BRAVE}/tor/data/tor.log? (~/.config/brave/tor/data/tor.log on Linux, %appdata%\brave\tor\data\tor.log on Windows, substituting brave-development or brave-beta for brave if a nonstandard channel.)

@btlechowski
Copy link
Contributor

Ubuntu 17.10 x64, Brave v0.23.21

tor: control socket error: Error: read ECONNRESET
tor: authentication failure: Error: read ECONNRESET
An uncaught exception occurred in the main process Uncaught Exception:
TypeError: this._control.close is not a function
    at TorDaemon.kill (/usr/lib/brave-beta/resources/app.asar/app/tor.js:164:21)
    at _control.cmd1 (/usr/lib/brave-beta/resources/app.asar/app/tor.js:512:16)
    at TorControl.destroy (/usr/lib/brave-beta/resources/app.asar/app/tor.js:897:7)
    at TorDaemon._controlError (/usr/lib/brave-beta/resources/app.asar/app/tor.js:546:19)
    at TorControl._control.on (/usr/lib/brave-beta/resources/app.asar/app/tor.js:494:47)
    at emitOne (events.js:96:13)
    at TorControl.emit (events.js:191:7)
    at TorControl._onError (/usr/lib/brave-beta/resources/app.asar/app/tor.js:1058:10)
    at emitOne (events.js:96:13)
    at LineReadable.emit (events.js:191:7)

tor.log

@srirambv
Copy link
Collaborator Author

srirambv commented Jul 3, 2018

Even after connecting back to network, still doesn't connect to Tor and opening a new Tor tab doesn't show the retry/disable popup . The only option is to restart browser to connect again to Tor

@bsclifton
Copy link
Member

re-opening so that @riastradh-brave can add additional fix per @diracdeltas feedback:
#14675 (comment)

riastradh-brave added a commit that referenced this issue Jul 10, 2018
This should address the failure reported in:
#14675 (comment)

fix #14630

Auditors: @diracdeltas

Test Plan: see #14630
riastradh-brave added a commit that referenced this issue Jul 10, 2018
This should address the failure reported in:
#14675 (comment)

fix #14630

Auditors: @diracdeltas

Test Plan: see #14630
@srirambv
Copy link
Collaborator Author

Still happens on 0.23.33. When retry connnection is clicked i see the same error

I shared context.
tor: daemon listens on 127.0.0.1:9250, version 0.3.3.7 (git-035a35178c92da94)
tor timeout: Tor could not start.
tor: relaunch
tor: control socket error: Error: read ECONNRESET
An uncaught exception occurred in the main process Uncaught Exception:
AssertionError: false == true
    at TorControl._onError (C:\Users\IEUser\appdata\Local\Brave\app-0.23.33\resources\app.asar\app\tor.js:1149:5)
    at emitOne (events.js:101:20)
    at Socket.emit (events.js:191:7)
    at emitErrorNT (net.js:1283:8)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
[3964:10112:0711/152611.389:ERROR:tor_launcher_factory.cc(105)] Tor Process(4620) Crashed

@GeetaSarvadnya
Copy link
Collaborator

GeetaSarvadnya commented Jul 12, 2018

Verified on Windows x64 with
• 0.23.34 a471718
• Muon 7.1.6
• libchromiumcontent 67.0.3396.103

Verified on Ubuntu 17.10 x64

  • 0.23.37 47b1b59
  • Muon 7.1.6
  • libchromiumcontent 67.0.3396.103

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.