question

brendan avatar image
brendan asked

NetworkError: 404 Not Found -- crossdomain.xml -- Unity Webplayer

zacb
started a topic on Tue, 19 May 2015 at 4:19 PM

Question from a developer:

I get an error if I try to run PlayFab from a Unity3d WebPlayer build.

Eror: "NetworkError: 404 Not Found - https://xxxx.playfablogic.com/crossdomain.xml"

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Best Answer
zacb said on Tue, 19 May 2015 at 4:20 PM

Answer:

When creating web player builds, ensure that you have the proper WWW Security Emulation


14 Comments
zacb said on Tue, 19 May 2015 at 4:20 PM

Answer:

When creating web player builds, ensure that you have the proper WWW Security Emulation


xeon said on Sat, 05 September 2015 at 4:49 AM

Hello!

I have a similar problem, but your decision to me did not help.

When I perform in PlayFabClientAPI.RunCloudScript in compiled webplayer file, there is the same mistake.

I'm doing:

  1. Edit> Project Settings> Editor -> and replace my address application

  2. Run the editor - all works, and enjoy :)

  3. Run the compiled file - and not working :(

  4. Run webplayer app in hosting - and it does not work either.

Help me please. I long time search, and not result...

Thanks for anyone answers!


xeon said on Sat, 05 September 2015 at 7:36 AM

Maybe the problem is that I am hosting on http, and the game appeals to https?

But ...

Why, then, the user successfully logs in the game? After all, then the game is associated with https://xxxx.playfabapi.com.

The error occurs only when running the script PlayFabClientAPI.RunCloudScript, and the game is associated with https://xxxx.playfablogic.com/1/prod

Maybe page https://xxxx.playfablogic.com/1/prod no file crossdomain.xml?))

it does not work only in the compiled file under webplayer.

In the editor, everything works as expected,

Help me please


Brendan Vanous said on Mon, 07 September 2015 at 2:01 PM

You can usually query the crossdomain.xml from a server directly. In the case of our service, if you enter https://xxxx.playfablogic.com/crossdomain.xml in your browser, you'll see that our crossdomain file contains the following:

<cross-domain-policy>

<allow-access-from domain="*" secure="false"/>
<allow-http-request-headers-from domain="*" headers="*" secure="false"/>

</cross-domain-policy>

So it should be good from that perspective. Can you send us the code snippet(s) of how you're querying for the URL, and how you're making the RunCloudScript call, as well as a Netmon or Wireshark capture showing the traffic?

Brendan


xeon said on Mon, 07 September 2015 at 10:17 PM

Brendan,

I call RunCloudScript in this function:

public void AllocateViewIDAndCallInstantiate()

    {

        if (!enteredGame)

        {

            enteredGame = true;

            myID = PhotonNetwork.AllocateViewID();



            RunCloudScriptRequest request = new RunCloudScriptRequest();

            request.ActionId = "onJoin";

            PlayFabClientAPI.RunCloudScript(request, onJoinResult, OnPlayFabError);

        }

    }

This function called from function OnLevelWasLoaded (after join room in photon).

I get analyze from wireshark, in attach.

Thanks!

Dmitry


xeon said on Tue, 08 September 2015 at 1:06 PM

Brendan,

I think this bug on the side playfab. (RunCloudScript doesn't work, but other scripts is works)

Because of this bug, I can not go further in the development of the game.

I look forward to any response. Thank you for understanding.


Brendan Vanous said on Tue, 08 September 2015 at 3:21 PM

Hi again,

We do have the team looking into why the webplayer might behave differently. In the meantime, I did have a look at the Wireshark capture, and sadly it does not contain any calls to our service. I was hoping to at least see the call to a login or the GetCloudScriptUrl method. Do you have a capture that shows this?

Brendan


xeon said on Tue, 08 September 2015 at 10:06 PM

Hi Brendan,

In a previous post I made the analysis only when called RunCloudScripts.

Now I did a complete analysis. Since since entering the site and downloading the game,

prior to receipt of error. Thanks for answer!

Dmitry


Brendan Vanous said on Tue, 08 September 2015 at 11:21 PM

Actually, one question: The Web Player does behave differently in that it has its own security layer. Can you confirm that you've reviewed this guide, and applied their recommendations? http://docs.unity3d.com/Manual/SecuritySandbox.html

From reviewing the crossdomain.xml in our API server and our Cloud Script logic server, they are set up identically. Can you confirm that you're making the call to get the Cloud Script URL for your title successfully in your Web Player testing (that is, that the only issue is with calling the Cloud Script, not with calling other PlayFab API methods)?

Brendan


xeon said on Tue, 08 September 2015 at 11:39 PM

Yes, i reviewed this guide. I have tried many ways to write crossdomain.xml. I even copied and pasted your file to my site.

And yes, i confirm, that i get the call to get the Cloud Script URL is successfully in web player.

I have problem only when calling the Cloud Script.


xeon said on Thu, 10 September 2015 at 9:37 AM

Hi, Brendan

Any ideas?

What do I do now in this situation?

Thanks for any reply

-Dmitry


Brendan Vanous said on Thu, 10 September 2015 at 11:17 PM

Hi Dmitry,

Sorry for the silence - our SDK team has been looking into this, and will update as soon as we have more info.

Brendan


xeon said on Thu, 10 September 2015 at 11:21 PM

I deleted a file crossdomain from my site, but the situation has not changed.

RunCloudScript - doesn't work. All other scripts - work. If no use cloud script - my game is worked perfectly. But I don't want my game with cheaters...

Do I have to give up playfab? But I really like the service in the rest :(


Brendan Vanous said on Thu, 10 September 2015 at 11:29 PM

Hi again,

To be clear, no, you don't need to give up. We updated our crossdomain setup for our Cloud Script logic server, to ensure that it's not the issue. Meanwhile, our SDK team is investigating the issues with the Unity Web Player (there are extensive threads on issues with crossdomain when using Web Player, if you search their forums), and they'll update as soon as they know more. Rest assured, we will solve this issue.

Brendan

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.