WWW returns 'Invalid arguments' error

Hello,

I’m trying to download simple file but getting strange error.
Simple test code is:

WWW www = new WWW( "http://download.unity3d.com/company/images/af2.jpg" );
...
if ( www.error != null )
	Debug.LogWarning(www.error);

And it gives:

Failed to connect to 87.245.215.30: Invalid arguments

I’ve checked everything and still can’t figure out what could it be. Could anyone help?

3 Answers

3

Probably a crossdomain policy thing. You should try getting files from the server you will deploy on or make sure a crossdomain.xml file is on the server you’re trying to get stuff from.

Well, actually images shouldn't be a crossdomain problem. An image is the only thing that doesn't require a crossdomain policy but the loaded image data can't be accessed. GetPixel GetPixels will fail on such a texture. And as far as i know you're no longer able to readback the framebuffer for screenshots. If you load "foreign" images the only thing you are allowed to do with it is displaying it to the user but you as game developer have no way to access the image data unless you have a crossdomain policy.

It seems you can’t reach the server or the URL is wrong. I’ve just tested your given URL but i have no problems to show that image on a guiTexture.

Are you really using this URL? the IP doesn’t match the url:

download.unity3d.com (aka a1986.g.akamai.net and download.unity3d.com.edgesuite.net) is represented by those two IPs:

84.53.146.76
84.53.146.82

At least from my country :wink:

The URL is right. This is IP for my country :)

The problem solved. It was because of firewall with two conflicting rules about same traffic. Don't know how it affected Unity requests that such error appeared.

Thanks everyone a lot for responses.