WWW In WEBPLAYER return Absolute URI is too short

In my project I need to access an image using the WWW class!
My game is in the same domain of the picture! And my game is a Browser Web Player.

But when I access my test in the browser, the image is not loaded!

Running my test in UnityEditor, I get this error message:

UriFormatException: Absolute URI is too short

 string url = "http://www.royalpoker.com.br/images/avatares/julex2014-06-22.jpg";
 Texture2D tmp;
 IEnumerator GetWWW()
  {

  WWW www = new WWW(url);

  yield return www; //UriFormatException: Absolute URI is too short

  if (www.error != null)
  Debug.LogWarning(www.error);

  tmp = www.texture;
   
  }

I do not know the cause of this error but I figured what the problem might be occurring due to lack of crossdomain.xml file

So, I put this file in the root of my domain (http://www.royalpoker.com.br), it content is the following!

<?xml version="1.0" encoding="ASCII"?>
<cross-domain-policy>
<allow-access-from domain="*"/>
</cross-domain-policy>

However, the same problem persists!

Could someone do me the courtesy to explain to me the correct way for me to get a good result?

I researched a lot here in the forum and on google but I found no solution to this problem. But I found several people with the same problem and are also unresolved!.
I’ll be really grateful for your help!

Works fine for me. Your image is accessible for WWW in unity.

Works for me too, both in Unity and as Webplayer build run from my desktop.

I made this quick script and placed it on a Cube so I could see the results:

using UnityEngine;
using System.Collections;

public class WWWTest : MonoBehaviour {

    string url = "http://www.royalpoker.com.br/images/avatares/julex2014-06-22.jpg";
    Texture2D tmp;

    void Start ()
        {
        StartCoroutine(GetWWW());
        }
  

    IEnumerator GetWWW()
        {

          WWW www = new WWW(url);
   
          yield return www; //UriFormatException: Absolute URI is too short
   
          if (www.error != null)
              Debug.LogWarning(www.error);
   
          //tmp = www.texture;
          renderer.material.mainTexture = www.texture;

        }
}

Does this code work for you in the same way?

To me, the problem remains , but now I found out the reason, but do not know how to fix!
Using the property: “WWW Security Emulation”, I managed to access the image as reading.

My real need is to read texture that received by the WWW class, and I only get this when I’m not using WEB Player!
So I suspect that:
My WebPlayer, not being able to read this crossdomain.xml file on my domain root.

Could this be the problem?
And if so, how can I make my WebPlayer find the crossdomain.xml file ?

Look the attachment of this post!
This is the result I want to achieve. In this picture i did not perform in WebPlayer mode.

Using the simple example that I put in the first post, I can only get the texture image but am not able to manipulate the image to create this effect! This is the reason I do not have access to reading pixels of this image. I read in the documentation that I can only read the texture if there is a crossdomain.xml in my area that I am accessing.

The Problem is that I already put the crossdomain.xml in the domain root, but my WebPlayer not reading it!.

1678365--105163--erro.jpg

I suspect that the issue is related to the domain, but it’s not something I know enough about to be able to say what the exact problem is :frowning:

I did find mention on Unity Answers that the crossdomain.xml file must be in UTF-8 Format, or it doesn’t work correctly.

Also the Debugging section on this page talks about an environment variable you can enable to get more console messages, perhaps this may help you see what’s happening.

Sorry I can’t be of more help.

I do not believe that is the configuration problem of the hosting because I place on my local test server also. And the same happens on my server!

I already did configured my system to read the LOG debug with the return of crossdomain.xml.
When I run my project in the editor and access the LOG I get no message regarding crossdomain.xml

But if I configure WWW Security Emulation, I can receive a message in the log file, referring to crossdomain. The problem is that he no is with the data I’ve set up in my domain in crossdomain.xml. It generates an automatic settings crossdomain.xml with him. I do not understand it!

Look This:
Game Teste - bug: http://www.royalpoker.com.br/game.html
Crossdomain - xml: http://www.royalpoker.com.br/crossdomain.xml
Image texture for download end Read: http://www.royalpoker.com.br/julex.jpg

Everything is correct, but it just does not work!

LOOK MY LOG:
In my unityEditor i Configure WWW Security Emulation: http://www.royalpoker.com.br/game.unity3d
And the result Log is:

Note that these data are not correct! Not my crossdomain.xml file.
If I run my project without configuring the WWW Security emulation, it does not return anything related to the crossdomain.xml and conseguentemente does not work!

I’m very sad with these results! I can not see anything wrong that I can be doing!. Would be the case for send report to staff unity?

Go to services, turn off collaboration & it will fix this issue.