BlueBox Sandbox Security Violation!

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

NewJersey
Posts: 27
Joined: 12 Mar 2012, 07:56

BlueBox Sandbox Security Violation!

Postby NewJersey » 12 Mar 2012, 23:21

Okay, trying to explain the following weird error:

I have the server down, so if someone access the application on another web server, a deployed flex application on my Apache Instance, I get the following error when trying to connect to the sfs2x instance:

Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: http://myapacheurl/myapp/MyFlexApp.swf cannot load data from http://MySFS2XJettyInstance:8080/BlueBox/BlueBox.do.
at com.smartfoxserver.v2.bitswarm.bbox::BBClient/getLoader()
at com.smartfoxserver.v2.bitswarm.bbox::BBClient/sendRequest()
at com.smartfoxserver.v2.bitswarm.bbox::BBClient/connect()
at com.smartfoxserver.v2.bitswarm::BitSwarmClient/connect()
at com.smartfoxserver.v2::SmartFox/handleConnectionProblem()
at com.smartfoxserver.v2::SmartFox/onSocketSecurityError()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.smartfoxserver.v2.bitswarm::BitSwarmClient/onSocketSecurityError()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::Socket/onTimeout()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()

Is there a way to better handle this error? It is not a security Exception, but, a failed connection attempt I guess!

Cheers,

NewJersey
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: BlueBox Sandbox Security Violation!

Postby Lapo » 13 Mar 2012, 21:34

You don't seem to be using the latest API 1.0.x
Please double check and if necessary get the latest update.
Lapo
--
gotoAndPlay()
...addicted to flash games
NewJersey
Posts: 27
Joined: 12 Mar 2012, 07:56

Re: BlueBox Sandbox Security Violation!

Postby NewJersey » 17 Mar 2012, 06:57

Hello Lapo, unfortunately I am.

Here is the output of the code:

API Version: 1.0.2

Cheers,

NewJersey
NewJersey
Posts: 27
Joined: 12 Mar 2012, 07:56

Re: BlueBox Sandbox Security Violation!

Postby NewJersey » 17 Mar 2012, 07:03

I've just got this on the debug part:


[SFS - WARN] A connection attempt is already in progress
## SocketError: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2031: Socket Error. URL: 127.0.0.1"]
## BlueBox Error: Error #2032: Stream Error. URL: http://127.0.0.1:8080/BlueBox/BlueBox.do
## SecurityError: [SecurityErrorEvent type="securityError" bubbles=false cancelable=false eventPhase=2 text="Error #2048: Security sandbox violation: file:///Users/me/Documents/Adobe Flash Builder 4.6/FlexProject/bin-debug/MyFlex.swf cannot load data from 127.0.0.1:9933."]

Any hints?
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: BlueBox Sandbox Security Violation!

Postby Lapo » 18 Mar 2012, 09:35

If SFS2X is down then the error is normal. All you have to do is handle the connection error in your code.
Example:

Code: Select all

private function onConnection(evt:SFSEvent):void
{
   if (evt.params.success)
      trace("Connection Success, Connection Mode = " + sfs.connectionMode)
   else
      trace("Connection Failure: " + evt.params.errorMessage)
}
Lapo

--

gotoAndPlay()

...addicted to flash games
NewJersey
Posts: 27
Joined: 12 Mar 2012, 07:56

Re: BlueBox Sandbox Security Violation!

Postby NewJersey » 18 Mar 2012, 10:20

Right, I did exactly as you've described, but it seems that because I have the flash debugger it pops out that sandbox error message.

Do you have the debugger as well?

If so, try logging in into a server with it disconnected and bluebox as true, see if you get the same sandbox violation message warning. This only happens in the flash debugger player.

Cheers,

NewJersey
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: BlueBox Sandbox Security Violation!

Postby Lapo » 18 Mar 2012, 10:28

Yeah, that's perfectly normal
Lapo

--

gotoAndPlay()

...addicted to flash games
NewJersey
Posts: 27
Joined: 12 Mar 2012, 07:56

Re: BlueBox Sandbox Security Violation!

Postby NewJersey » 18 Mar 2012, 10:34

Great, thanks Lapo...excellent support

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 136 guests