Skip to main content
Participant
June 29, 2009
Question

Socket connections blocked... (sandbox violation)

  • June 29, 2009
  • 1 reply
  • 797 views

I'm having trouble with Flash Player 10, regarding opening of sockets. I have a socket server responding on port 843, my custom port and a web server hosting a crossdomain.xml file.

The problem is that when I try to run with the debugger, it won't even attempt to make a connection.

The policy log shows this:

OK: Root-level SWF loaded: file:///xxxxx/Main.swf
OK: Searching for <allow-access-from> in policy files to authorize data loading from resource at xmlsocket://xxxxx.com:53280 by requestor from file:///xxxxx/Main.swf
Error: Failed to load policy file from xmlsocket://xxxxx.com:53280
Error: Request for resource at xmlsocket://xxxxx.com:53280 by requestor from file:///xxxxx/Main.swf has failed because the server cannot be reached.

The error is this:

Security error: [SecurityErrorEvent type="securityError" bubbles=false cancelable=false eventPhase=2 text="Error #2048: Security sandbox violation: file:///opt/Develop/glig/Flash/Widgets/chat/Main.swf cannot load data from xxxxx.com:53280."]

The sandbox mode is: localWithNetwork

The flash player version is: 10,0,22,87

I also used the line Security.loadPolicyFile("xmlsocket://xxxxx.com:53280"), but without success.

The remote server is reachable and responding to <policy-file-request/>, but does not register any connection attempts.

This all worked perfectly fine with version 9, where it would do a http request for crossdomain.xml. According to all the documentation I've read, my approach should work, but the player isn't even attempting to connect.

Does anyone have an idea?

This topic has been closed for replies.

1 reply

TaylorBastien
Participant
November 10, 2009

You may have already solved this, but here's a response anyways.

Is your socket server serving up the policy file, or your web server (i.e. through HTTP)? If you are connecting through sockets, then the policy file must be served up through the socket server, it doesn't care about an HTTP policy.

Good luck!

Taylor

4Point Solutions Ltd.

http://blogs.4point.com/taylor.bastien/