Flex :: Why Does The Flash Player Throw A Sandbox Error In This Case

Nov 10, 2009

I get a Flex 3 sandbox error #2048 after connecting to a Socket on a Java (1.5) server. The server code is all mine, i.e. not running under Apache. Flash Player 10.0 r32.The sequence is as follows...

1 Java server starts, listens on port 843 for policy file request and on port 45455 for my other requests.

2 Flex client served by Apache (although I get the same result if I run it from the file system), socket connection made on host:45455.

3 Flash Player requests policy file from port 843. This is the standard behaviour with the new security settings looking for a master file. It happens regardless of whether a different policy file has been specified.

4 I serve the following XML from Java through port 843:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" to-ports="*" secure="false"/>
</cross-domain-policy>

5 The player writes the following into the debug policy log...

OK: Root-level SWF loaded: http://localhost/bst/BasicSocketTest.swf
OK: Searching for <allow-access-from> in policy files to authorize data loading from resource at xmlsocket://192.168.2.3:45455 by requestor from http://localhost/bst/BasicSocketTest.swf
OK: Policy file accepted: xmlsocket://192.168.2.3:843
OK: Request for resource at xmlsocket://192.168.2.3:45455 by requestor from http://localhost/bst/BasicSocketTest.swf is permitted due to policy file at xmlsocket://192.168.2.3:843

6 I send a text message from the client to the server on port 45455 using writeUTFBytes() and flush() (this is my own home-baked message protocol, and is correctly processed at each end)

REG/REGISTER;simon;Si

7 Java server thread listening on port 45455 responds with

REG:0/REGISTER:SUCCESS;simon;Si

8 The Flex client receives a ProgressEvent and the event listener I bound to the socket gets called. I process the message (write it to a text box on the screen)

9 The Flash player throws a 2048 sandbox error and the socket is disconnected! This is after the message is received and processed successfully. In fact it is about 12 seconds after. Nothing else works through the socket.

I have tried explicitly loading a policy file with a call to Security.loadPolicyFile() in the Flex client, but the reality of the new player security is that it is basically ignored. The steps are that the policy request will not get sent until a socket i/o operation occurs. At that point the player always goes to port 843 first looking for a master policy file. If it finds one, and it is permissive, it goes no further.

I have tried a variety of alternative ways of terminating the policy file and policy file contents, including deliberate errors just to see if the Flash Player is awake.I can see no reason why I would have a 2048 being thrown. I accurately serve a socket policy file on the designated master security port, which the player itself logs as correct. The socket then successfully sends and receives a message from the server the contents of which are available to my code.

P.S. Please don't tell me to use BlazeDS or LCDS or Granite, or something else as a server, I'm looking for a solution to this problem, not a redesign. And please don't ask me to use an XMLSocket instead - I tried that and get exactly the same result. I have chosen my architecture carefully and deliberately and I want a binary socket.

EDIT :In response to James Ward's request in his comment, here is the entire error message:

Error #2048: Security sandbox violation: http://localhost/bst/BasicSocketTest.swf cannot load data from 192.168.2.3:45455.

I have a stripped down test client which has a handler for each socket event and outputs a message to the screen. This is what it shows:

RequestPolicy: 192.168.2.3:843
Create Socket: 192.168.2.3:45455
Connect: [Event type="connect" bubbles=false cancelable=false eventPhase=2]
Sending: REG/REGISTER;simon.palmer@gmail.com;Si
Receiving: REG:0/REGISTER:SUCCESS;simon.palmer@gmail.com;Si/
Close: [Event type="close" bubbles=false cancelable=false eventPhase=2]
Error #2048: Security sandbox violation: http://localhost/bst/BasicSocketTest.swf cannot load data from 192.168.2.3:45455.

The close event is fired immediately after successfully receiving a response from the server, however the Error #2048 does not appear until about 20 seconds later. If I try and send a further message after close, but before the error, the Flash Player throws an invalid socket exception.

View 9 Replies


Similar Posts:


Flash :: Escaped Characters In A Remote Asset Filename Throw A Sandbox Security Exception?

May 9, 2011

I'm calling remote images with with a Loader and the context has checkPolicyFile=true, images load fine with urls like :url....the only difference being escaped characters, is this a bug or am I doing something wrong?url...

View 1 Replies

Flash 9 :: Sandbox Security - Error #2044: Unhandled SecurityError:. Text=Error #2048: Security Sandbox Violation

Mar 5, 2008

I get following error: Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: [URL] cannot load data from 192.168.3.5:4854. at TicTacToe_fla::MainTimeline/TicTacToe_fla::frame1() ". I tryed to solve this problem about 3 hours, but I failed I have the file crossdomain.xml in the same folder like my .swf file on the server with this content:

[Code]...

View 7 Replies

Flash :: Flex Sandbox Error On ExternalInterface

Dec 9, 2011

My Flex application generates a sanbox error SecurityError: Error #2060: Violation securtity sanbox : ExternalInterface file:///C:/Documents and Settings/test/Bureau/FPtest/4.5/flashProspectus.swf cannot access file:///C:/Documents and Settings/test/Bureau/FPtest/4.5/flashProspectus.html.

1) this works when I do publish it on the web, does not work when I open the HTML file as file://

2) params.allowscriptaccess = "always";

3) I tested with c:flashProspectus.html (to avoid having SPACES in the file path)

4) in my flex init, I added: Security.allowDomain('*');

5) in my flex init I got

[CODE]..

View 1 Replies

Flex :: Flash Player 10.1 Causing Sandbox Violation No Previous Version Caused

Jun 19, 2010

Working with a SWf where it's worked all along, loading data from url...But, now, if you switch from Flash Player 10 to Flash Player 10.1, I get the standard security sandbox violation:[code]The crossdomain.xml is still in place and if I downgrade to FP 10 (or earlier), it works as expected.

View 5 Replies

Php :: Flash/Flex & PHP Socket Application Sandbox Error?

Dec 3, 2010

I am running a socket server using PHP. The socket server runs fine because I can connect to it using PHP.Now, I have a flash application that is trying to connect to it:

this.socket.addEventListener(Event.CONNECT, onSocketConnect);
this.socket.addEventListener(Event.CLOSE, onSocketClose);
this.socket.addEventListener(IOErrorEvent.IO_ERROR, onIOError);[code]....

When I run the application locally, it works! However, when I upload it to my server I get a sandbox security error (#2048). The flash app is actually hosted on the same server as the socket server, and there is cross domain policy file in place.

View 3 Replies

Java :: When Does Flex Throw NetConnection.Call.Badversion Error?

Nov 11, 2010

I am Using Flex as my client and java as my server. Using Weborb in remote host. At times I recieve this error.

faultCode:Client.Error.MessageSend
faultString:'Send failed'
faultDetail:'Channel.Connect.Failed error NetConnection.Call.BadVersion: :

[code].....

View 2 Replies

Actionscript 3 :: Security Sandbox With Flex And AppEngine - Getting Client.Error.MessageSend Channel.Security.Error?

Dec 20, 2009

I'm having trouble with an AS3 AMF RemoteObject request that is hosted on App Engine. I have a crossdomain.xml file in the root of the domain, and also one at the remoting endpoint.Here are the contents of the root crossdomain.xml:

<?xml version="1.0"?>
<cross-domain-policy>
<site-control permitted-cross-domain-policies ="all"/>[code].....

Loading the swf file and testing it on my machine works just fine... I think that may have something to do with me having the debugger version of Flash Player. When I push it up to App Engine to make it public, other clients access it and get a Client.Error.MessageSend Channel.Security.Error error Error #2048 url: http:[url].......I am using Flex 4 beta, and the App Engine Python runtime. I have tried full wildcard in the crossdomain, and even accessing the data endpoint at a relative URL so as to avoid this error.

View 1 Replies

ActionScript 3.0 :: Developed An Site In Flash Doesnt Throw Any Error In Flash IDE Debug Mode

Apr 26, 2009

I have developed an site in flash doesnt throw any error in Flash IDE debug mode, But when I launch this in web browser it throws error.

Disadvantage of showing error in browser window is that it wont show the line number of the error. Is there any otherway to get the line number of error, when running in the browser.

View 2 Replies

ActionScript 3.0 :: ZendAMF Error Handling - Make The PHP File Throw An Exception That Gets Traced As An Error Message

Jul 7, 2010

i am currently trying to learn ZendAMF, but i have a hard time troubleshooting which makes learning it quite hard. Is there a way to make the PHP file throw an exception that gets traced as an error message in AS3 (not Flex), the only error i seem to be able to get is "Error #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Call.Failed", but it tells me jack ****.

i have gotten ZendAMF working, i just want to know how i can make error handling better, so that as an example can use PHP to tell flash that no results were found, or that the typed text was invalid. Is it better to use AS3 to check if the field was filled properly?

View 1 Replies

Flash :: Flex - Running Good In Browsers But Error By Player Directly ReferenceError: Error #1056

Jul 13, 2011

I wrote a flex demo, customized spark TextInput skin with rounded corners and a search icon in it, like mac os x search box, it's running good in browsers (by Flash Player browser plug-in) either .html or .swf, but error by flash player directly.

[Code]...

View 2 Replies

Flex :: Make BlazeDS Name Conversion To Work For Properties Beginning With A Lower-case Letter Followed By An Upper-case One?

Jun 6, 2011

I have some trouble with the conversion applied by BlazeDS to the name of the properties when this name begins with a lower-case letter followed by a capital letter. I have an ActionScript class similar to this:

[Code]...

View 1 Replies

Flex :: Error #2048 Security Sandbox Violation - Cannot Load Data

May 30, 2011

I get the below error when i am trying to make a java call from flex.

[RPC Fault faultString="Send failed"
faultCode="Client.Error.MessageSend"
faultDetail="Channel.Security.Error error

[Code].....

View 2 Replies

Flash :: Security Sandbox Violation - Error #2028 ?

Oct 22, 2011

while running my flash application i get the below error

* Security Sandbox Violation *

Connection to rtmp://system ip/live halted - not permitted from file:///F:/Flash

work/RTS/RT/vlab/BIOTECH/NEO/passive-properties-of-a-simple-neuron/vi-characteristics-of-
solarpanel.swf

-- Untrusted local SWFs may not contact the Internet.

SecurityError: Error #2028: Local-with-filesystem SWF file file:///F:/Flash work/RTS/RT/vlab/BIOTECH/NEO/passive-properties-of-a-simple-neuron/vi-characteristics-of-solarpanel.swf cannot access Internet URL rtmp://system ip/live.[code].....

View 1 Replies

Actionscript 3 :: Loading An External SWF Throw An Error

Nov 19, 2011

I am trying to load an External swf.

But it throws an error when I compile.[code]...

View 1 Replies

Xml :: Error #2044: Unhandled SecurityError:. Text=Error #2048: Security Sandbox Violation?

Feb 27, 2010

I have created a crosdomain policy file, I have added code to my flex app, and I still get security sandbox violation...have I done something wrong? Here are my errors and file snippets:

Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: http://mysite.com/folder1/folder2/media/swf_demo.swf cannot load data from http://mysite.com/folder1/folder2/media/locXML.xml.

swf_demo.swf is my flex application

The following lines have been added to my flex application:

Security.allowDomain("mysite.com");
Security.allowDomain("www.mysite.com");
Security.allowDomain("http://mysite.com/folder1/folder2/media/locXML.xml");[code]..

View 1 Replies

ActionScript 3.0 :: Error #2044: Unhandled SecurityError - Text=Error #2048: Security Sandbox Violation

Nov 17, 2010

When i am running my file locally it runs well but when it runs from a server, it throws an error

[Code]...

I googled a lot. I found a solution of cross domain policy funda but i am not clear with it. Anybody has ideas of getting rid of this problem..?

View 2 Replies

ActionScript 3.0 :: Getting Sandbox Error #2048

Jan 2, 2010

Got a flash application that connects to a server. When I run the flash application from within Adobe Flash it connects no problem. When I try to run it from IE from the web it gives an error 2048. Now the interesting thing is that the server I connect to from flash is showing the flash application connects briefly then disconnects.  I have a crossdomain.xml file I have created but haven't figured out if I am missing something.[code]...

View 18 Replies

Actionscript 3 :: Error Returning Value From Switch Case?

Jan 19, 2011

after coding a custom event in AS3, i've come across a curious problem:

override public function toString():String
{
switch (type)

[Code].....

i can remedy the problem easily by adding return null; at the end of the function, but that's redundant and it annoys me that it seems to be the only solution.

why is returning a value from a switch case not seen by the compiler? is this an issue specific to the AS3 compiler or am i actually attempting something here that is so completely dangerous and adverse that it shadows counterculturists the world over.

View 2 Replies

Flex :: Referring A Component Id Throw A Variable?

Sep 7, 2009

I'm developing a flex application and I want to access a component by using it's id.
I know I must use .property of the component. The problem is I have the component Id in a String var and now I don't know how to access to it's properties.

View 2 Replies

ActionScript 2.0 :: Security Sandbox Error With LoadVars?

Feb 8, 2010

I am using loadVars to load an url from a txt file and then passing that to another loadVars.When I test the movie it gives me a security sandbox error,but if I type in the url by hand it works just fine.

PHP Code:

var url:String="";
var myData:LoadVars = new LoadVars();
myData.onLoad=function(){

[code]....

This gives a security sandBox error but if I remove url and type the url in directly it works fine.

View 1 Replies

ActionScript 2.0 :: Error Message Sandbox Violation

Feb 11, 2009

iget the error message when in test movie but the file works fine.

*** Security Sandbox Violation ***
SecurityDomain 'http://www.woodfieldinteriors.co.uk/flash/main/1/mc1.swf' tried to access incompatible context 'file:///D|/DanData/web%20sites/woodfield%20interoirs/public%5Fhtml/flash/index.swf'

View 0 Replies

ActionScript 3.0 :: Security Sandbox Error #2070

Dec 19, 2011

Any one know how to fix this problem? Security sandbox error #2070

View 1 Replies

ActionScript 3.0 :: Sandbox Error - Xml Isn't Loading The Content?

Feb 22, 2011

I've been creating a fla that reads an XML file, that tells which swf to import.Finally got that all working and put it on the local network at work, only to get a sanbox error. It seems for some people the main fla will work for people, but the xml isn't loading the content. I've read some about having to include a domain in the xml, giving permission to domains named. The problem I'm having trouble with is what do I do for a local network? And were going to be sending it to other people who will be running it on their local computers or their office networks.

View 1 Replies

ActionScript 3.0 :: Write Void With A Capital V Which Reads Void And Is Causing CS5 To Throw An Error?

Aug 17, 2010

I use Flashdevelop as my IDE. It is defaulting to write void with a capital V which reads Void and is causing CS5 to throw an error.

View 2 Replies

Flex :: Flash SecurityError About Sandbox. Force To LoadPolicyFile But It Didn't Work

Mar 1, 2011

i have a crossdomain.xml on my server. but it not in "/". and i use loadPolicyFile to load this crossdomain.xml.

Security.allowDomain("*")
Security.allowInsecureDomain("*");
Security.loadPolicyFile(AddressContext.getCurrentEnv().split("rest")[0]+"crossdomain.xml")

the PolicyFile's url is like this :[URL]and my restful webservices address is like this : [URL]crossdomain.xml include my flash's host url.the weird thing is flash still tried to load the [URL] like this first is right and response 200. the second response 400 .finally, the flash still told me SecrityError#2048

View 1 Replies

ActionScript 3.0 :: Error 2142 - Security Sandbox Violation?

Mar 18, 2010

I have a problem when I try to compile my player, I get the following error:

SecurityError: Error #2142: Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property.[code]....

1. I have used Security.allowDomain(url...); in the source code

2. This was working fine the day before last.I have tried adding a crossdomain.xml file in the folder where I build the player, still no joy. I tried throughout yesterday to fix it to no avail. I've even tried installing and building the player on a different machine to double check there wasn't something wrong on my PC.

View 2 Replies

Data Integration :: Sandbox Error On URLRequest To Php File?

Oct 26, 2011

I am running into an issue with passing variables from Actionscript 3 to PHP.This is a very basic program just for testing purposes to find out if this will work.Here is the Actionscript 3 coding (One button named 'btn_Submit' and one text box named 'txt_User' are on the stage).This is a very simple attempt to input text into an 'Input Text Box', upon pressing a submit button, it should pass the text to a php file named 'test.php'.The .swf file and the test.php files are both located in the same directory on my webserver (main directory for subdomain 'www.testing.budgetmylife.net')For the URLRequest parameter, I have even tried just ("test.php"), without success:

import flash.events.*
import flash.net.*;
var myVariables:URLVariables = new URLVariables();

[code]......

View 2 Replies

ActionScript 3.0 :: Error #2122: Security Sandbox Violation

Nov 19, 2011

I am working in my website in AS3. In the main file, when I click a movie_button, the movie_ swf file is loaded, but the movie swf_file uses an xml file which contains the url of thumbnails and videos which are located and addressed on my server. I have checked the paths and all of them are correct, but I receive Error #2122: Security sandbox violation yet. I tried to solve the problem with a crossdomain.xml

[Code]...

View 4 Replies

ActionScript 3.0 :: Error #2047: Security Sandbox Violation?

Dec 27, 2011

Does anyone know how to fix this problem? i have upload one swf (generated from proggram which made 3d galleries) on server and when my main swf load this i have this error at about 80% of loading.

View 10 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved