Hi,
I'm trying to use BlueBox for a game and after the connection fails to connect to the Smartfox server it connects sucessfully to the BlueBox.
but after a while, the SmartFoxClient generate the following error:
Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: file:///game.swf cannot load data from localhost:9331.
is like the socket connection is not closed correctly when the http connection is established.
to simulate that the smartfox server is not available, the game is connecting to the port 9331.
do you know what could be happening?
Thanks a lot!
Socket error after connect to BlueBox
Hi,
we're aware of the error which seems to fire only under certain versions of the Flash Player 10. Actually we have tested several scenario and the error does not create any real problems to the proper functioning of the API.
Anyways we're going to handle it more gracefully with the next API update.
we're aware of the error which seems to fire only under certain versions of the Flash Player 10. Actually we have tested several scenario and the error does not create any real problems to the proper functioning of the API.
Anyways we're going to handle it more gracefully with the next API update.
I have inspected the code for the change and I have found that it's probably not necessary to patch it. In fact all you need to do is to handle the error directly in your code by adding an event listener. This way you can decide what to do with it and the API won't "swallow" it.
Example:
Let me know if it helps.
Example:
Code: Select all
smartFox.addEventListener(SecurityErrorEvent.SECURITY_ERROR, myHanlder)
Let me know if it helps.
Unfortunately it does not work here. I tried the exactly same thing but the event is not catched. I use the 1.6.6 as3 api. strangely the exception trace tells me the error appears in the line _sfs = new SmartFoxClient() but as no connecting is done there, that seems impossible. Also adding a try {} catch(e:SecurityError){} does not fix it. Any chance this is fixed within the 1.6.7 update?
In the latest release of the API we catch the exception internally and trace it to the console. Re-launching it one level up to the developer seems to be causing more harm than good because many don't remember to do it.
Latest API download:
http://www.smartfoxserver.com/products/ ... d.php?d=88
Latest API download:
http://www.smartfoxserver.com/products/ ... d.php?d=88
I still get the following exception when the server is offline
I am not able to catch it and it prevents me from connecting to our second server. We are using the latest version in client and server. What can be done?
Thanks in advance.
Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: [url] cannot load data from http://82.149.227.75:80/BlueBox/HttpBox.do.
at it.gotoandplay.smartfoxserver.http::LoaderFactory/getLoader()
at it.gotoandplay.smartfoxserver.http::HttpConnection/send()
at it.gotoandplay.smartfoxserver.http::HttpConnection/connect()
at it.gotoandplay.smartfoxserver::SmartFoxClient/tryBlueBoxConnection()
at it.gotoandplay.smartfoxserver::SmartFoxClient/handleSecurityError()
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()
I am not able to catch it and it prevents me from connecting to our second server. We are using the latest version in client and server. What can be done?
Thanks in advance.
I just did another test.. The code in the "onConnection" event is definitely not being executed. This is the exception including code lines:
Should I catch the exception myself manipulating the api code? As long as it helps this would be an option.
Thanks,
Ruben
Error #2044: securityError unverarbeitet. text=Error #2048: Verletzung der Sicherheits-Sandbox: [url] kann keine Daten von http://localhost:8080/BlueBox/HttpBox.do laden.
at it.gotoandplay.smartfoxserver.http::LoaderFactory/getLoader()[E:\01_http\rubens_doppelkopf\src\frontend\src\it\gotoandplay\smartfoxserver\http\LoaderFactory.as:36]
at it.gotoandplay.smartfoxserver.http::HttpConnection/send()[E:\01_http\rubens_doppelkopf\src\frontend\src\it\gotoandplay\smartfoxserver\http\HttpConnection.as:89]
at it.gotoandplay.smartfoxserver.http::HttpConnection/connect()[E:\01_http\rubens_doppelkopf\src\frontend\src\it\gotoandplay\smartfoxserver\http\HttpConnection.as:69]
at it.gotoandplay.smartfoxserver::SmartFoxClient/tryBlueBoxConnection()[E:\01_http\rubens_doppelkopf\src\frontend\src\it\gotoandplay\smartfoxserver\SmartFoxClient.as:2979]
at it.gotoandplay.smartfoxserver::SmartFoxClient/handleSecurityError()[E:\01_http\rubens_doppelkopf\src\frontend\src\it\gotoandplay\smartfoxserver\SmartFoxClient.as:3000]
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()
Should I catch the exception myself manipulating the api code? As long as it helps this would be an option.
Thanks,
Ruben
It sounds like we're not looking at the same thing.
I definitely get the onConnection event when running the client and the SmartFox is not running.
Can you please try the example found in {your-sfs-dir}/Examples/AS3/template_AS3
I can run that example both with the standalone player and the browser and get the same result. Tried with API version 1.5.8 and 1.6.2
Here's a screenshot
I definitely get the onConnection event when running the client and the SmartFox is not running.
Can you please try the example found in {your-sfs-dir}/Examples/AS3/template_AS3
I can run that example both with the standalone player and the browser and get the same result. Tried with API version 1.5.8 and 1.6.2
Here's a screenshot
Its printing the same exception here. My interface looks slightly different than yours and IIRC I downloaded the 1.6.6 installer version and upgraded to 1.6.8, so could you try it with the latest client API please?
http://www.imagebanana.com/view/nvcatyf ... atesfs.png
Translated to english the message says
Security sandbox violation: [url] cannot load data from [url2]
Thanks
http://www.imagebanana.com/view/nvcatyf ... atesfs.png
Translated to english the message says
Security sandbox violation: [url] cannot load data from [url2]
Thanks
Who is online
Users browsing this forum: No registered users and 21 guests