#flex: Security sandbox violation when using remoteobject to localhost

I have an application that connects to a amf-service located at localhost using RemoteObject.
When I compile and run with IntelliJ I get a security sandbox violation #2048.

[FaultEvent fault=[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Security.Error error Error #2048: Security sandbox violation: file:///Users/andreas heim/code/sio/samba/samba-boligoversikt-flex/target/_Main.swf cannot load data from http://localhost:9080/samba/messagebroker/amf. url: 'http://localhost:9080/samba/messagebroker/amf'"] messageId="2F0E36B9-41D2-7FC0-7D37-486938BE7217" type="fault" bubbles=false cancelable=true eventPhase=2]

My project is set up via flexmojos and maven, and when I use maven to compile the application and open it in safari, I do not get the same errors.

Other developers on my team (using flex/flash-builder) does not get this error.

I have tried the following:
re-importing entire project
setting --use-network=true

Nothing seems to work, this is a major blocker for this project, please respond.
Comment actions Permalink

Seems like this thread [http://www.jetbrains.net/devnet/message/5249531#5249531] answered my problems.

Now this is turning into a feature request for the IntelliJ-team, do as maven/flexmojos do and add the trusted-cfg-file automatically.

Comment actions Permalink

Yes, you are right, one of the options is to run your application trusted as written by link above. There's a request to make it easier in IDEA : http://youtrack.jetbrains.net/issue/IDEA-51966
The second option (which is probably closer to your real production scenario) is not to run swf as local file but to load it from the server as well. An example of such project configuration can be found here: http://blogs.jetbrains.com/idea/2009/11/graniteds-projects-in-maia/ . Project setup is similar for all server technologies like GraniteDS, BlazeDS, LCDS, WebORO or whatever.

Comment actions Permalink

It is correct that the production scenario is to put the .swf on a web server, but still this is too much hassle wile developing and debugging.


Please sign in to leave a comment.