proxy settings should be saved to disk right away to avoid trouble restoring session after crash




11 years ago
5 years ago


(Reporter: raphael, Unassigned)


3.6 Branch
Windows XP

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [notacrash])



11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20070309 Firefox/
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20070309 Firefox/

I connect through a proxy at work.  I've ran into the following scenario several times:

Get to work.
Set proxy (via switchproxy plugin, but doing so through options dialog should not make any difference).
Start browsing.  Have multiple tabs open.
Firefox crashes.
Restart firefox.  Attempt to restart session, but the proxy settings are not set for work, since they seem to be stored only after exiting firefox - so the session restore fails.

I'm guessing this applies to all settings - any reason not to write them to disk when you hit ok in the options dialog, rather than waiting until you exit the browser?

Reproducible: Always

Steps to Reproduce:
see description.
Actual Results:  
see description.

Expected Results:  
see description.

Comment 1

11 years ago
fwiw, life isn't that simple. for me, i tend to crash, take my laptop home (where the proxy doesn't exist), run firefox again, and choose restore.

when i do this, none of my pages work.

historically prefs weren't written for each pref change (rewriting a file 20-50 times w/in a second is fairly expensive and really silly), but the act of closing the pref dialog would be a perfectly logical place to flush prefs.

if you're actually worried about proxies, then your suggestion won't help me. and probably won't really help many people. the right fix is for gecko to recognize much earlier that the network isn't happy and give the user a chance to setup or disable the proxy before gecko goes too far into the weeds and loses too much potential state.

Comment 2

11 years ago
I'm pretty much entirely unfamiliar with the mozilla source, but how in the world do you get the 20-50 times per second rewrite?  I'm only suggesting a write every time you hit ok on the preferences dialog, or change preferences via switchproxy or similar tools... that seems to happen fairly seldom (once or twice per browsing session, at least in my usage, though I guess that's not exactly a broad sample).  Am I missing something?  Can you provide an example?

Comment 3

11 years ago
Btw, here's a question that may shed some light on the level of my ignorance:  where are preferences stored?  (I could just google my way to the answer, but since we're talking about it...)

Comment 4

11 years ago
Ok, I take it back.  10s of googling brings back some memories.  So my question now is:  what is wrong with writing to prefs.js as soon as you hit ok on the prefs dialog rather than waiting until firefox exits?

Comment 5

11 years ago
oh, nothing, i never said there was, in fact, i wrote:

> but the act of
> closing the pref dialog would be a perfectly logical place to flush prefs.

it just afaict hasn't been done. i'm not really a firefox ui dev. and i have other things to do. if you need help writing a patch, people on irc would help.
Whiteboard: [notacrash]
So, this an enhancement request? Is it still valid?

Comment 7

8 years ago
The bug seems no more valid. Here you are the test I did in a network connected via proxy with HTTP-auth:
1. Create a new Firefox profile and start it.
2. Connection error page (by default Firefox network setting is "No proxy").
3. Tools - Option - Advanced - Network - Settings - set proxy - OK.
4. Refresh connection error page ==> Firefox prompts for proxy credentials
5. Insert proxy credentials ==> Connection OK
6. Visit n sites, open n tabs.
7. Force Firefox closing via Task Manager.
8. Re-start the same Firefox profile.
9. Firefox correctly remember Network Settings and asks for proxy credentials.

This is WFM.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20100401 Firefox/3.6.3


7 years ago
Version: unspecified → 3.6 Branch

Comment 8

7 years ago
I think it's worked the way I suggested for a while.  That, and it seldom crashes nowadays.  Issue can be closed, AFAIC.  Thanks.

Comment 9

5 years ago
WFM per comments
Last Resolved: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.