Opened 15 months ago

Closed 13 months ago

Last modified 13 months ago

#31303 closed defect (fixed)

Browser Toolboxfails to open when tor-launcher is present

Reported by: pospeselr Owned by: pospeselr
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: TorBrowserTeam201909R, tbb-9.0-must-alpha
Cc: tbb-team Actual Points: 0.35
Parent ID: Points: 1
Reviewer: Sponsor:

Description

In latest dev branch origin/tor-browser-60.8.0esr-9.0-1 the Firefox chrome debugger ( enabled in about:debugging -> Enable add-on debugging ) does not launch. When you attempt to launch it ( via Menu -> Web Developer -> Browser Toolbox OR via Ctrl+Shift+Alt+I key combo ) the tor-launcher dialog pops up claims that it cannot connect to Tor, and the permission dialog asking whether you want to allow the local debugger to connect never appears.

Building firefox with --disable-tor-launcher in your .mozconfig does allow the debugger to work.

Child Tickets

Change History (14)

comment:1 Changed 14 months ago by pospeselr

Owner: changed from tbb-team to pospeselr
Status: newassigned

comment:2 Changed 14 months ago by gk

Keywords: TorBrowserTeam201909 added; TorBrowserTeam201908 removed

Moving tickets to September

comment:3 Changed 14 months ago by pili

Points: 1

comment:4 Changed 14 months ago by acat

Should this be tbb-9.0-must-alpha? Without this inspecting the background requests and debugging is a bit more difficult...

comment:5 in reply to:  4 Changed 14 months ago by gk

Keywords: tbb-9.0-must-alpha added

Replying to acat:

Should this be tbb-9.0-must-alpha? Without this inspecting the background requests and debugging is a bit more difficult...

If that is slowing down fixing the "real" esr68 issues, sure let's fix this quickly.

comment:6 Changed 14 months ago by pospeselr

I thought this was going to be a blocker for me in doing #31286, but I discovered that since (most of) the code I'm dealing with is in about:preferences so the regular in-page debugging tools work fine so I'm not actively working on this.

comment:7 Changed 14 months ago by mcs

I do not think Kathy and I will have time to work on this before our vacation next week. I did a little research and fixing this issue might be as simple adding a check for MOZ_BROWSER_TOOLBOX_PORT inside shouldStartAndOwnTor() (in src/modules/tl-util.jsm). That environment variable should only be present in the debugger process' environment:
https://searchfox.org/mozilla-esr68/source/devtools/client/framework/ToolboxProcess.jsm#258

I am not sure if more things need to be fixed though.

comment:8 Changed 13 months ago by acat

Keywords: TorBrowserTeam201909R added; TorBrowserTeam201909 removed
Status: assignedneeds_review

I tested mcs suggestion and everything seems to work as expected in browser toolbox (https://github.com/acatarineu/tor-launcher/commit/31303)

Alternatively we could add TOR_SKIP_LAUNCH=1 in https://searchfox.org/mozilla-esr68/rev/9fe22f6a90e0a5c495d22b2e8b56fac5f46b0ba0/devtools/client/framework/ToolboxProcess.jsm#258, but I think changing tor-launcher is fine.

comment:9 in reply to:  8 ; Changed 13 months ago by gk

Keywords: TorBrowserTeam201909 added; TorBrowserTeam201909R removed
Status: needs_reviewneeds_revision

Replying to acat:

I tested mcs suggestion and everything seems to work as expected in browser toolbox (https://github.com/acatarineu/tor-launcher/commit/31303)

Alternatively we could add TOR_SKIP_LAUNCH=1 in https://searchfox.org/mozilla-esr68/rev/9fe22f6a90e0a5c495d22b2e8b56fac5f46b0ba0/devtools/client/framework/ToolboxProcess.jsm#258, but I think changing tor-launcher is fine.

I agree. Just a tiny nit: please add the toolbox check after the skip launch check so that it a) matches the order in which you declared the constants and b) matches more likely the usage patterns of the env variables: I'd expect both to be low but the toolbox one still much lower.

comment:10 in reply to:  9 Changed 13 months ago by gk

Replying to gk:

Replying to acat:

I tested mcs suggestion and everything seems to work as expected in browser toolbox (https://github.com/acatarineu/tor-launcher/commit/31303)

Alternatively we could add TOR_SKIP_LAUNCH=1 in https://searchfox.org/mozilla-esr68/rev/9fe22f6a90e0a5c495d22b2e8b56fac5f46b0ba0/devtools/client/framework/ToolboxProcess.jsm#258, but I think changing tor-launcher is fine.

I agree. Just a tiny nit: please add the toolbox check after the skip launch check so that it a) matches the order in which you declared the constants and b) matches more likely the usage patterns of the env variables: I'd expect both to be low but the toolbox one still much lower.

Actually, that's stupid and won't work. But swap the const declarations instead?

comment:11 Changed 13 months ago by acat

Keywords: TorBrowserTeam201909R added; TorBrowserTeam201909 removed
Status: needs_revisionneeds_review

comment:12 Changed 13 months ago by gk

Resolution: fixed
Status: needs_reviewclosed

Looks good. Merged to master (commit 810ba7e93981511765ec1be667689ae2992e8c49).

comment:13 Changed 13 months ago by acat

Actual Points: 0.25

Not sure how to update the Actual Points here, since most of the work (investigating) was done by mcs. But let's say 0.25.

comment:14 in reply to:  13 Changed 13 months ago by mcs

Actual Points: 0.250.35

Replying to acat:

Not sure how to update the Actual Points here, since most of the work (investigating) was done by mcs. But let's say 0.25.

I added another 0.1 (it was probably even less, but 0.1 is close enough).

Note: See TracTickets for help on using tickets.