Opened 9 years ago

Closed 9 years ago

#1321 closed defect (fixed)

Torbutton Shutdown and Startup State Bug

Reported by: Tordilini Owned by:
Priority: High Milestone:
Component: Applications/Torbutton Version: 1.2.4
Severity: Keywords:
Cc: Tordilini, nickm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by mikeperry)

I'm having a problem where I can't get Torbutton to work properly in terms of its shutdown and startup state.

Right now I have on the Startup Settings:

On normal startup, set Tor state to: Shutdown state
On session restored startup, set Tor state to Non-tor
Have the session store save and restore these tabs:

Tabs loaded in Tor is unchecked
Tabs loaded in Non-tor is checked

With these settings, and Vidalia and Polipo running, if I have Torbutton disabled, X out of Firefox and then
reopen it, it opens properly with the shutdown state with Torbutton disabled.

With the same settings, if I have Torbutton enabled, X out of Firefox and then re-open it, it starts to open
with Torbutton enabled, but then it suddenly switches to disabled and Firefox says in the bottom left corner
"Stopped". My homepage's URL loads in the address bar, but the page itself doesn't load. And then Firefox
just stays there on a blank page.

My understanding is that it should simply open properly to my homepage (or likely a foreign version of it,
as I'll explain) with Torbutton enabled, which was the shutdown state.

So in other words, with these settings, it seems to startup properly if Torbutton is disabled, but improperly
if it's enabled.

My homepage is Google.com. With Torbutton enabled, I can tell it's working because it often goes to a foreign
Google page rather than US. So, for example, at my current Vidalia IP settings, when Tor is on it is going to
Google.de and when it's off it's going to Google.com.

One other interesting note that may shed light on this:

If I change the setting for On session restored startup, set Tor state to: to Tor

then the behavior changes.

With that setting, with Vidalia running, if I have Torbutton disabled, X out of Firefox and re-open it,
Firefox opens to my homepage with Torbutton enabled, not the shutdown state of it being disabled. Not
only that, but although Torbutton is enabled (which it shouldn't be since my shutdown state was disabled)
it goes to Google.com, not Google.de which tells me it isn't actually on, but only claims to be.

With this setting, if I X out of Firefox while Torbutton is enabled, it restarts accurately on my homepage
with Torbutton enabled (and shows it is really working because it goes to Google.de, not Google.com)

This points to the fact that perhaps for some reason, Firefox is doing some session-restored startup even
when I just X out and then restart Firefox. In both cases, whichever Torbutton state I have set for
"On session restored startup, set Tor state to" seems to work properly on re-start if that is the one I
have set when I close it. The other state is the one that doesn't work in both cases.

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Attachments (2)

torbutton-1.2.5pre10.xpi (383.2 KB) - added by mikeperry 9 years ago.
torbutton-1.2.5pre11.xpi (408.2 KB) - added by mikeperry 9 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 9 years ago by mikeperry

It looks like the quit-application-granted event is no longer being delivered to chrome observers. Firefox must have
changed its event order such that the event is emitted after the windows are already gone. That or something else
has gone wrong.

Digging deeper. Stay tuned.

comment:3 Changed 9 years ago by mikeperry

Ah, I think I've got it. The key is that Xing out of the last window causes the event not to fire, since the window
is destroyed *before* it can fire in that case.

We may need to move the observer into a component for this case to be covered.

Changed 9 years ago by mikeperry

Attachment: torbutton-1.2.5pre10.xpi added

comment:4 Changed 9 years ago by mikeperry

Ok. The issue should be fixed in the torbutton-1.2.5pre10 in the attachments tab for this bug (above). Can you please
test it thoroughly and let me know if it is ok for you?

comment:5 Changed 9 years ago by Tordilini

I tested out 1.2.5pre10 and it seems to work great. The shutdown and startup behavior definitely works. I will keep using it and let you know if there are any other issues, but as far as this particular issue it seems to be solved. Thanks!

Changed 9 years ago by mikeperry

Attachment: torbutton-1.2.5pre11.xpi added

comment:6 Changed 9 years ago by mikeperry

Cool, thanks a lot. I've uploaded 1.2.5pre11 to the attachments tab with a couple of other tweaks. Would you mind
running that one instead for the next day or so and let me know if anything turns up?

comment:7 Changed 9 years ago by Tordilini

The startup and shutdown state still seem to work in pre11. But now I'm noticing something else. It may or may not be related to Torbutton, but perhaps you can help.

If I open Firefox and put Torbutton on and go to http://www.whatismyip.com/ it will show me some IP other than my own, meaning Tor is working.

But then if I close Firefox, choose a New Identity on Tor, reopen Firefox (it opens correctly with Torbutton enabled still since that was the shutdown state) and go to http://www.whatismyip.com/ again, it gives me the same IP as last time. This seems to repeat indefinitely.

In other words, it seems like New Identity isn't actually working!

If I close Firefox AND close Vidalia, and then reopen Vidalia, then reopen Firefox, then it seems to give me a new IP.

So this points to some real problem where New Identities aren't getting picked up. Can you replicate this? Any ideas?

comment:8 Changed 9 years ago by mikeperry

Description: modified (diff)
Resolution: Nonefixed
Status: newclosed

Please try #vidalia or #tor on irc.oftc.net for this issue.

Note: See TracTickets for help on using tickets.