Proxy error for some users

139 views
Skip to first unread message

Paul Peelen

unread,
Jan 21, 2011, 6:43:42 PM1/21/11
to ASIHTTPRequest
Hi,

One and a half week ago I release a new app onto the appstore. During
this time I have had only one user complaint from a users which claims
to get the following error message:

"Unable to obtain information on proxy servers needed for request"

I have not been able to re-create this on neither my iPhone 4, iPhone
simulator, iPad simulator or my iPad.
This user has an iPhone 4 running iOS4 (don't know which version). The
mobiledata settings are correct and the users seems to get this both
on their wireless at home and using the mobile network.

I have read some discussion here explaining this could have to do with
some kind of PAC file behind a VPN. In my app, this is not the case (I
guess, don't really know what an pac file is).
The weird thing in this case is, when I asked the user to download an
other app of mine using ASIHttpRequest, the user got the same problems
there. That app connect also to the same server as my latest app does.

What can be the problem in this case? What can I do to prevent this
from happening?

Best regards,
Paul Peelen

Ben Copsey

unread,
Jan 22, 2011, 7:14:51 AM1/22/11
to asihttp...@googlegroups.com
Hi Paul

> One and a half week ago I release a new app onto the appstore. During
> this time I have had only one user complaint from a users which claims
> to get the following error message:
>
> "Unable to obtain information on proxy servers needed for request"
>
> I have not been able to re-create this on neither my iPhone 4, iPhone
> simulator, iPad simulator or my iPad.
> This user has an iPhone 4 running iOS4 (don't know which version). The
> mobiledata settings are correct and the users seems to get this both
> on their wireless at home and using the mobile network.
>
> I have read some discussion here explaining this could have to do with
> some kind of PAC file behind a VPN. In my app, this is not the case (I
> guess, don't really know what an pac file is).

In a nutshell:

Some users (usually, only those in large companies or organisations) have to connect to the web via an intermediary server (a proxy server). This means that all requests have to be sent to the proxy server, and it will forward them on to the actual server you're connecting to. The address of and (if needed) credentials for a proxy server is usually set in your device's network settings. Sometimes, rather than specify the address of a proxy, it is instead necessary to specify the URL of a PAC file instead. A PAC file (proxy auto-configuration file) is a script that runs to determine which proxy server to use for a particular request. It allows network administrators to have requests use a certain proxy server for certain addresses, and perhaps a different proxy server, or no proxy server, for others.

When a request starts, ASIHTTPRequest asks the system if it needs to download a PAC file to obtain the proxy settings. If so, it attempts to download the PAC file, and will run the script when it obtains it to grab the address and port of the proxy server to use. If it is unable to download the PAC file, or unable to read the proxy settings for some other reason, it will fail with the above error.

There is an issue with the current version of ASIHTTPRequest where if the PAC file is unreachable for some reason, it can take some time for the request to realise (which basically makes things go very slowly). This problem is fixed in this branch: https://github.com/pokeb/asi-http-request/tree/async-pac-file-download . I have been meaning to merge this change into the main version of ASIHTTPRequest - if I get time I'll try to do it today.

I'd suggest it might be worth giving this version a try - I'm not certain if it will fix the above problem, but it does improve ASIHTTPRequest's handling of PAC files. Obviously, it can be quite tricky to test this yourself, as you won't have the same proxy setup as the user who reported this issue. If it's possible to send him or her a test version, that might be a good way to go.

Best

Ben


Paul Peelen

unread,
Jan 24, 2011, 9:50:22 AM1/24/11
to asihttp...@googlegroups.com
Hi Ben,

Thank you for your answer. I can't tell if this is the case for my client, but with regards to that I only got one complaint about this it might be so.
I will try to diff the branches and see what you have changed, and then merge it into my project. Hopefully that works. Otherwise, please let me know when I have merged it, I am very interested to test it.

Regarding to send a test version, the client doesn't seem to eager on helping me with this so I think its better not to try that.

Br,
Paul Peelen



--
You received this message because you are subscribed to the Google Groups "ASIHTTPRequest" group.
To post to this group, send email to asihttp...@googlegroups.com.
To unsubscribe from this group, send email to asihttpreques...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/asihttprequest?hl=en.


Reply all
Reply to author
Forward
0 new messages