PAC file loading fails on startup

This happens all the time for me (and others in my office), i have documented the bug as best i can to make it reproducable. It is certainly not urgent as i have ways to work around it, just more of an annoyance. It would be nice to figure out why it is happening.

Before Firefox Startup:
FoxyProxy: (2 proxies)
AutoProxy [enabled] = automatic (http://intranet/pac.pac) (pattern = allow(*), disallow(*intranet*))
Default [enabled] = Direct Connect (pattern = *)
Logging Cleared

Firefox:
Home page = Last page = startup page = http://www.google.ca/

Notes:
http://intranet/pac.pac accessible from default proxy (direct connection)

===============================================================

After Firefox Startup:
Cached page of http://www.google.ca/ loaded, reload = server not found

FoxyProxy: (2 proxies)
AutoProxy [disabled] = automatic (http://intranet/pac.pac) (pattern = *)
Default [enabled] = Direct Connect (pattern = *)
"Failed to load PAC for proxy AutoProxy" popup
Enable AutoProxy: PAC file loaded popup

Firefox:
reload page: http://www.google.ca/ displays

Logging:
Before Enabling AutoProxy: all log items have url pattern http://www.google.ca/*, all use Default proxy (pattern = *)
After Enabling AutoProxy: one new log item, url = http://intranet/pac.pac, used Default proxy (pattern = *)
After reload page: new log items have url pattern http://www.google.ca/*, all new items use AutoProxy (pattern = *)

===============================================================

Final Remarks:
* FoxyProxy for some reason refuses to load the PAC file on startup, but has no problem loading it after firefox has started up
* No messages in the logging window about the PAC file being loaded on startup
* text returned for the reload page step by AutoProxy is "PROXY intranet:8080; PROXY intranet:80" (two different intranet proxy addresses)
* intranet obfuscates actual intranet hostnames whereever it is used

Thanks,

Pat

Hi Pat, You've documented

Hi Pat,

You've documented your settings very well, but I don't clearly understand the problem/bug. Can you explain?

Thanks,
Eric
p.s. in the future, you can post your foxyproxy.xml file instead of typing all your settings (if you prefer)

The issue

The major issue is that the PAC file will fail to load when i start firefox.

I use a PAC for my catchall proxy but, when i start firefox i always get a message saying that the PAC file failed to load. Then when i go into options and try to re-enable the PAC proxy it loads fine. I won't be able to access any pages (other than pages i can connect to directly with my default proxy) until i re-enable the PAC proxy.

This behavior is very consistent. My guess is that on startup when it tries to load the PAC file, it is using a bad proxy. I'll play around with some settings and see if i can narrow things down.

Figured it out

Haha, the first thing I tried turned out to be the culprit. I had an old proxy in my firefox config from before I was using foxyproxy. This old proxy has since been taken offline and replaced with another proxy. So I guess the firefox config's proxy is used when loading the PAC file on startup.

To reproduce this behavior, setup a valid PAC proxy, and a valid NON-PAC proxy that can be used to load the PAC file in foxyproxy. Then in your firefox settings setup an invalid proxy address. When starting firefox, the PAC file will try to load using the invalid proxy and you will see a failed to load message. If you try and re-enable the PAC proxy, it will succede since it will use the valid NON-PAC proxy.

I have this problem as well.

I have this problem as well. Foxyproxy will retrieve a PAC file using the currently defined rules.

IMO Foxyproxy should NEVER use a proxy to load the PAC file - it would defeat the whole purpose of configuring proxies with PAC files if a proxy is needed to load it! It does not make sense to a site administrator to put the PAC file where it cannot be retrieved directly without proxy configuration. (No application before Foxyproxy would allow you to specify both a PAC and manual proxy configuration)

On the other hand, some people may want to load their own custom PAC from their own webserver (which the site administrator will block) - it would therefore be handy to have an option "Use this proxy to retrieve this PAC:" - and allow the PAC file to be retrieved via a proxy server.

This is not a problem. This

This is not a problem. This is by design. If you don't want to use a proxy to load the PAC file, blacklist the PAC file's URL.

This IS a bug

Hello, I have the same problem !

Ericjung, no, that's not the point. blacklisting the PAC url doesn't change anything! The problem is that the PAC is downloaded on startup using Firefox's legacy proxy setting!

As it fails and the proxy becomes disabled. When I re-enable it, the PAC is downloaded fine.

I need to set a proxy in firefox's legacy proxy settings, because else, the DNS requests are not routed to the socks proxy.

I am using foxyproxy version 2.8.11, and I didn't have such problem with the previous version I had.

Have you checked "Use SOCK

Have you checked "Use SOCK proxy for DNS lookups" in FoxyProxy's Global Settings tab?