infinity0 / mozilla-gnome-keyring-legacy

A firefox extension that enables Gnome Keyring integration (legacy version)
https://bugzilla.mozilla.org/show_bug.cgi?id=309807
Other
55 stars 8 forks source link

all tabs are re-opened on Firefox 13 (Ubuntu 12.04) start, no matter the settings - using current version of ppa:fat-lobyte9/ppa-public #13

Closed AndreasA closed 12 years ago

AndreasA commented 12 years ago

Hello,

I noticed that ever since installing the mozilla-gnome-keyring extension all my tabs are always re-opened on starting Firefox. Just so you know, I also deactivated all other extensions and I still had the same issue (at the beginning I thought the fault was with a different extension but I noticed pretty soon that that was not the case).

AndreasA commented 12 years ago

I wanted to add (just found out) that it seems that after installing mozilla-gnome-keyring the value "browser.sessionstore.resume_session_once" isn't changed open restart which means that after installing a new addon or something like this, this value is always true and therefore Firefox always reopens all windows. I changed that value manually to false and for now, it seems that it doesn't reopen all windows. Nevertheless, this should be fixed (regarding that value not being changed on start.

fat-lobyte commented 12 years ago

Could you please post the output of

dpkg -l | grep '\(xul-ext-gnome-keyring\|firefox \)'

? It seems weird that you can actually use the "current version" with Firefox 12, because it was compiled for Firefox 13 and should not work in Firefox 12.

And I cannot reproduce your problem with Firefox 13. I set "Show my home page" in Edit -> Preferences -> "When Firefox starts:", and the tabs are never restored, regardless of wether the Add-On is installed or not.

Does it work for you now? Can you find a way to reproduce the problem?

AndreasA commented 12 years ago

Ah, sorry my fault. I meant Firefox 13 but still here the output: dpkg -l | grep '(xul-ext-gnome-keyring|firefox )' ii firefox 13.0+build1-0ubuntu0.12.04.1 Safe and easy web browser from Mozilla ii xul-ext-gnome-keyring 0.6.4~git20120606-0ubuntu1 Store mozilla passwords in GNOME Keyring.

Regarding reproduce steps, e.g.: 1.) I have opened two tabs (works also with more but just to test) and set one to http://www.google.com and the other to https://www.github.com 2.) I open the Addons managemetn and disable (could also be that I install an extension but this is the fastest way) Ubuntu Firefox Modifications (for instance). 3.) I use the "Restart now" option of the disabled addon (not close and open Firefox manually. 4.) This should resume the current session (which is normal so far) 5.) Then I close the Addons management 6.) Close Firefox normally (e.g. the "X" or ALT+F4) 7.) Start Firefox again, the two tabs (google.com and github.com) will be opened again. 8.) Check about:config for the entry browser.sessionstore.resume_session_once it is still true (should have been reseted normally to false.

fat-lobyte commented 12 years ago

Wow, now that is weird. I found out why I had trouble reproducing:

In step 6), it matters if you close with "X"/Alt+F4 or with "File->Quit"/Ctrl-Q !! If you close with X/Alt+F4, all subsequent restarts will reopen with tabs open (now regardless of Quit/Close Window) If you close with Ctrl-Q, everything will be fine and tabs will be closed.

Can you confirm this behaviour, or did I mix something up?

fat-lobyte commented 12 years ago

Getting weirder: The real difference between xul-ext-gnome-keyring installed or not is that when it's installed, and you close the windows with "X" or Alt+F4, Firefox doesn't* ask if you "Really want to Close N tabs", and therefor doesn't close them.

I'm starting to doubt that this issue is really related to our extension.

AndreasA commented 12 years ago

Well, as said the issue is that it seems that with the xul-ext-gnome-keyring extension install this setting (in about:config) browser.sessionstore.resume_session_once stays always true, once it turns true. I believe this is also the reason why I doesn't warn when closing with multiple tabs.

infinity0 commented 12 years ago

closing - could not reproduce on a clean profile.

please re-open only if you can give specific instructions to reproduce this from a clean profile.

infinity0 commented 12 years ago

as for your "browser.sessionstore.resume_session_once" problem, you probably set that yourself at some point without realising it. i don't understand why you think this extension should be setting unrelated config values.

AndreasA commented 12 years ago

The problem is not that it is set. That value is always set upon Addon installation or deactivation or activation (when you use the restart option at the Addon management) because then the tabs are restored. The problem is that it should not "STAY" set which it does.

AndreasA commented 12 years ago

Furthermore, I also tested with a clean profile. I used firefox -P to create a new profile. That one only has 3 extensions installed afterwards - the two from Ubuntu, like Ubuntu Firefox Modifications and Global Menu Bar Integration) and then, of course, the Gnome keyring extension.

I did the same steps described above - exactly the same steps and I still was able to reproduce the problem (though now it is with Firefox 13.0.1 - there was an update yesterday).

Regarding reproduce steps, e.g.: 1.) I have opened two tabs (works also with more but just to test) and set one to http://www.google.com and the other to https://www.github.com 2.) I open the Addons managemetn and disable (could also be that I install an extension but this is the fastest way) Ubuntu Firefox Modifications (for instance). 3.) I use the "Restart now" option of the disabled addon (not close and open Firefox manually. 4.) This should resume the current session (which is normal so far) 5.) Then I close the Addons management 6.) Close Firefox normally (e.g. the "X" or ALT+F4) 7.) Start Firefox again, the two tabs (google.com and github.com) will be opened again. 8.) Check about:config for the entry browser.sessionstore.resume_session_once it is still true (should have been reseted normally to false.

AndreasA commented 12 years ago

Btw. I can't reopen this issue, so ...

fat-lobyte commented 12 years ago

@AndreasA Can you please check what happens, if in step 6) you close with Ctrl-Q instead of Alt-F4?

@infinity0

  1. Open Firefox, open one or more websites in tabs
  2. Open about:addons, disable or enable any plugin
  3. Click "restart now", wait for firefox to restart
  4. change to any other tab
  5. Close with Alt-F4 (or clicking "X" to close the window); observe that you are not asked if you really want to close all tabs although you should be. If it does ask, change to some other tab and try again.
  6. Start Firefox. Observe that all tabs are restored, although they shouldn't be. Observe that browser.sessionstore.resume_session_once is still true although it shouldn't be.
  7. Close Firefox with Alt-F4. Upon restart, tabs are still open and resume_session_once is still set.

The problem is the following: in step 4, in some tabs you are asked if you want to close all your tabs, in some you aren't. If the Add-On is not installed you are always asked if you want to close them, and they are all closed.

I suggest we let this bug alone for some time. It seems really minor and has a trivial workaround, and occurs only in rare cases. Since the plugin code doesn't even come close to the browser.sessionstore.resume_session_once key, this is probably a Firefox bug anyway, which is really not fun to deal with.

@AndreasA: just close your window with Ctrl-Q or File->Quit.

infinity0 commented 12 years ago

"2. Open about:addons, disable or enable any plugin" - so it's not specific to this extension? then, you should file the bug to mozilla instead of here.

fat-lobyte commented 12 years ago

It doesn't matter which extension you enable/disable, but the erronous behaviour is not present if mozilla-gnome-keyring is not installed.

AndreasA commented 12 years ago

The problem seems to be that this Addon prevents Firefox from changing browser.sessionstore.resume_session_once upon Firefox start. It doesn't need to change that value. It is enough to prevent Firefox to set it back to false on start which it normally does.

AndreasA commented 12 years ago

Will this ticket be fixed or...?

infinity0 commented 12 years ago

I cannot reproduce this on a clean profile with this extension enabled. Go file a bug to mozilla instead.

I will not respond further to this bug report until you convince me it is actually my problem.

AndreasA commented 12 years ago

Did you try the exact steps mentioned in this comment: https://github.com/infinity0/mozilla-gnome-keyring/issues/13#issuecomment-6500710

Because there I used a clean profile and this bug definitely exists there ONLY if this extension is installed, so it is a bug with the extension.

fat-lobyte was also able to reproduce this bug with this extension installed.

However, I want to add that I use the pre-compiled version by fat-lobyte - so maybe the problem only exists with this compiled version? Btw. I am using 64 Bit Ubuntu 12.04

infinity0 commented 12 years ago

OK, I managed to reproduce it, and yes it does only happen when this extension is enabled. (Disabling it "fixes" the problem.) But go file the bug report to mozilla anyway, I suspect the behaivour is due to certain general properties of this extension (it has a binary component, etc) rather this extension itself.

If you can find a similar extension (binary component, etc) where the problem doesn't exist, I will look into it further. But until you can supply that evidence, I will assume it's mozilla at fault and that's where I will tell you to file a bug.

fat-lobyte commented 12 years ago

@AndreasA: Did you realize, that there is a trivial workaround for this bug? Just close your window with Ctrl-Q or File->Quit

AndreasA commented 12 years ago

Actually the simplest workaround is to manually open about:config and change resume_session_once value back to false. You then get the expected behaviour back. No matter how you close Firefox. At least, until you install another extension or something similar

Regarding binary extension: It doesn't happen with DownThemAll or FlashGot. I am not sure if DownThemAll uses binary but FlashGot definitely has binary data in it.

Personally, I think that this extension just somehow prevents Firefox to write to the resume_session_once value after a restart (because that way it would be set to false automatically after every restart)

infinity0 commented 12 years ago

DownThemAll and FlashGot appear to be non-binary as in Debian they are architecture: all.

BTW, apologies if I'm sounding dismissive or rude, but I really can't see how this extension could be possibly the cause of the behaviour you're seeing. I also really don't want spend (potentially lots of) my free time trying to debug or fix someone else's (trivial) problem.

I would suggest you ask a Mozilla developer for another opinion, or dig up more damning evidence that this is something for me to fix.

AndreasA commented 12 years ago

OK. I filed a bug report for Firefox here: https://bugzilla.mozilla.org/show_bug.cgi?id=771065

You can also watch this one for answers.