Forum Multiplayer Changed a file on GameFS now I get this error

Discussion and help relating to the PlayerIO Multiplayer API.

Changed a file on GameFS now I get this error

Postby robertflesch » September 22nd, 2017, 6:54 pm

I updated a texture file on GameFS, and suddenly I am getting this. HELP!

Warning: Ignoring 'secure' attribute in policy file from http://r.playerio.com/crossdomain.xml. The 'secure' attribute is only permitted in HTTPS and socket policy files. See http://www.adobe.com/go/strict_policy_files for details.

Warning: Domain r.playerio.com does not specify a meta-policy. Applying default meta-policy 'master-only'. This configuration is deprecated. See http://www.adobe.com/go/strict_policy_files to fix this problem.

exception, information=SecurityError: Error #2122: Security sandbox violation: LoaderInfo.content: file:///myGame.swf cannot access http://playerio-a.akamaihd.net/GameID/a ... nk._v2.png. A policy file is required, but the checkPolicyFile flag was not set when this media was loaded.

I am using.
Security.loadPolicyFile( "https://content.playerio.com/crossdomain.xml" );

Why would changing the version of the file cause this?
robertflesch
Paid Member
 
Posts: 136
Joined: April 22nd, 2013, 9:18 pm

Re: Changed a file on GameFS now I get this error

Postby Henrik » September 23rd, 2017, 8:03 am

When you update a file in GameFS, loading that file through GetUrl might return a redirect url that starts at r.playerio.com, which in turn redirects to the specific version of the file on the CDN. When you upload a file to GameFS, we add a new file for the specific version, and we overwrite the main file. But because of cache headers, we have to wait two weeks before we can return the main file URL again.

But both r.playerio.com and the CDN have valid, permissive, crossdomain.xml files, so I don't understand what's going wrong here? Is it because you're using Security.loadPolicyFile from a third domain that's not involved that something goes wrong? What happens if you load the policy file http://r.playerio.com/crossdomain.xml instead?
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Changed a file on GameFS now I get this error

Postby robertflesch » September 24th, 2017, 12:26 am

Still getting error when loading as you can see when load policy from http://r.playerio.com/crossdomain.xml

Warning: Ignoring 'secure' attribute in policy file from http://r.playerio.com/crossdomain.xml. The 'secure' attribute is only permitted in HTTPS and socket policy files. See http://www.adobe.com/go/strict_policy_files for details.

Warning: Domain r.playerio.com does not specify a meta-policy. Applying default meta-policy 'master-only'. This configuration is deprecated. See http://www.adobe.com/go/strict_policy_files to fix this problem.

This is from Adobe site
Be careful with checkPolicyFile if you are downloading an object from a URL that may use server-side HTTP redirects. Policy files are always retrieved from the corresponding initial URL that you specify in URLRequest.url. If the final object comes from a different URL because of HTTP redirects, then the initially downloaded policy files might not be applicable to the object's final URL, which is the URL that matters in security decisions. If you find yourself in this situation, you can examine the value of LoaderInfo.url after you have received a ProgressEvent.PROGRESS or Event.COMPLETE event, which tells you the object's final URL. Then call the Security.loadPolicyFile() method with a policy file URL based on the object's final URL. Then poll the value of LoaderInfo.childAllowsParent until it becomes true.


And the server side redirect is what is happening here correct? So before I changed the file to v2, I was not getting the redirect, now that is it v2 I am. Is that correct?

Can you or someone else provide some example code of those this SHOULD look?
robertflesch
Paid Member
 
Posts: 136
Joined: April 22nd, 2013, 9:18 pm

Re: Changed a file on GameFS now I get this error

Postby robertflesch » September 26th, 2017, 5:01 pm

Problem mostly solved, still not clear why, I was doing SOMETHING wrong.
I consolidated all of my texture loading to a TextureBank.

here is some simplified code which is loading the versioned textures correctly.

Code: Select all
// Listens for a custom event, and returns a custom event when texture is loaded.
TextureLoadingEvent.addListener( TextureLoadingEvent.REQUEST, request );

private function loadGUITexture( $textureName:String ):void {
        var loader:Loader = new Loader();
        loader.contentLoaderInfo.addEventListener(Event.COMPLETE,        loadComplete );
        loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError );

   var fs:GameFS = PlayerIO.gameFS(Globals.GAME_ID);
   var resolvedFilePath:String = fs.getUrl(Globals.texturePath + $textureName);
   loader.load( new URLRequest( resolvedFilePath ) );

        function loadComplete (event:Event):void {
            loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, loadComplete );
            loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, loadError );

            var textureBitmap:Bitmap = Bitmap( LoaderInfo( event.target ).content );
            _bitmap[$textureName] = textureBitmap;
            _texturesLoading[$textureName] = false;

            TextureLoadingEvent.create( TextureLoadingEvent.LOAD_SUCCEED, $textureName, textureBitmap );
        }

        function loadError(event:IOErrorEvent):void {
            loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, loadComplete );
            loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, loadError );

            TextureLoadingEvent.create( TextureLoadingEvent.LOAD_FAILED, $textureName, null );
        }
    }
}


this is with NO Security policy set anywhere.
I am able to load multiple versions.

I DO still get these warnings for, which appear that ONLY player.io can correct.

Warning: Ignoring 'secure' attribute in policy file from http://r.playerio.com/crossdomain.xml. The 'secure' attribute is only permitted in HTTPS and socket policy files. See http://www.adobe.com/go/strict_policy_files for details.
Warning: Domain r.playerio.com does not specify a meta-policy. Applying default meta-policy 'master-only'. This configuration is deprecated. See http://www.adobe.com/go/strict_policy_files to fix this problem.

Warning: Ignoring 'secure' attribute in policy file from http://playerio-a.akamaihd.net/crossdomain.xml. The 'secure' attribute is only permitted in HTTPS and socket policy files. See http://www.adobe.com/go/strict_policy_files for details.
Warning: Domain playerio-a.akamaihd.net does not specify a meta-policy. Applying default meta-policy 'master-only'. This configuration is deprecated. See http://www.adobe.com/go/strict_policy_files to fix this problem.
robertflesch
Paid Member
 
Posts: 136
Joined: April 22nd, 2013, 9:18 pm

Re: Changed a file on GameFS now I get this error

Postby Henrik » September 27th, 2017, 4:04 am

Yes, you are getting a serverside redirect, and because of the convoluted way Flash handles the policy files, you had to implement it their way by getting the final URL and then calling loadPolicyFile based on that. That's annoying, but I'm glad you solved it.

I would expect the final URL to always be at the CDN, i.e. http://playerio-a.akamaihd.net/crossdomain.xml, have you tried setting it to that from the start and skipping the entire part where you listen for events?

You can ignore the warnings, they shouldn't affect anything. We'll look into fixing it on our end to at least get Flash to stop whining about it. :-)
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Changed a file on GameFS now I get this error

Postby robertflesch » September 27th, 2017, 6:07 pm

I would really appreciate fixing those warnings.

Warning: Ignoring 'secure' attribute in policy file from http://r.playerio.com/crossdomain.xml. The 'secure' attribute is only permitted in HTTPS and socket policy files. See http://www.adobe.com/go/strict_policy_files for details.
Warning: Domain r.playerio.com does not specify a meta-policy. Applying default meta-policy 'master-only'. This configuration is deprecated. See http://www.adobe.com/go/strict_policy_files to fix this problem.

I get this same warning for
http://r.playerio.com/crossdomain.xml
http://playerio-a.akamaihd.net/crossdomain.xml
http://api.playerio.com/crossdomain.xml

having these things screaming at me from my log file is quite annoying.
robertflesch
Paid Member
 
Posts: 136
Joined: April 22nd, 2013, 9:18 pm


Return to Multiplayer



cron