Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to fix this (probably) cross domain policy error using Flash, Socket.IO and NodeJS
    primarykey
    data
    text
    <pre><code>Error #2044: Unhandled SecurityErrorEvent:. text=Error #2048: Security sandbox violation: http://kipos.bluecodestudio.com/holdthebomb/HoldTheBombWeb.swf cannot load data from http://23.29.126.76:8000/socket.io/1/?t=1356891827452. at io::Socket/doHandshake()[/Users/airrider3/github/AS3-Socket.IO-XHR-Polling/xhr-polling/src/io/Socket.as:139] at io::Socket/connect()[/Users/airrider3/github/AS3-Socket.IO-XHR-Polling/xhr-polling/src/io/Socket.as:110] at io::Socket()[/Users/airrider3/github/AS3-Socket.IO-XHR-Polling/xhr-polling/src/io/Socket.as:90] at io::IO$/connect()[/Users/airrider3/github/AS3-Socket.IO-XHR-Polling/xhr-polling/src/io/IO.as:36] at MainController/endOfbluecodeSplash()[/Users/airrider3/Dropbox/Projects/Kipos/Minigames/HoldTheBombWeb/src/MainController.as:41] at bluecodeSplash/endOfSplash()[/Users/airrider3/Dropbox/Projects/Kipos/Minigames/HoldTheBombWeb/src/bluecodeSplash.as:55] at Function/http://adobe.com/AS3/2006/builtin::apply() at com.greensock.core::TweenCore/complete()[D:\_Flash\_AS3\src\com\greensock\core\TweenCore.as:178] at com.greensock::TweenLite/renderTime()[D:\_Flash\_AS3\src\com\greensock\TweenLite.as:477] at com.greensock.core::SimpleTimeline/renderTime()[D:\_Flash\_AS3\src\com\greensock\core\SimpleTimeline.as:93] at com.greensock::TweenLite$/updateAll()[D:\_Flash\_AS3\src\com\greensock\TweenLite.as:642] </code></pre> <p>I'm using Flash Builder, an ActionScript project, which connects to a server running NodeJS using the Socket.IO module.</p> <p>To connect Socket.IO with AS3 I'm using the following library <a href="https://github.com/sbquinlan/AS3-Socket.IO-XHR-Polling" rel="nofollow">https://github.com/sbquinlan/AS3-Socket.IO-XHR-Polling</a> which works perfectly while testing in local, from Flash Builder.</p> <p>However, if hosted on my domain<a href="http://kipos.bluecodestudio.com/holdthebomb/" rel="nofollow"> [http://kipos.bluecodestudio.com/holdthebomb/]</a>, I suppose it raises this SecurityErrorEvent because I am not using any crossdomain.xml files correctly? I've never gotten along with this topic, to be honest, so I'm not sure if this is the error.</p> <p>In any case, I have the following crossdomain.xml file:</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd"&gt; &lt;cross-domain-policy&gt; &lt;site-control permitted-cross-domain-policies="master-only"/&gt; &lt;allow-access-from domain="*" to-ports="*"/&gt; &lt;/cross-domain-policy&gt; </code></pre> <p>I have it in different places on my server. (Should it be on the hosting client?). Yes, the game is hosted on bluecodestudio.com, while the game's server is on the IP 23.29.126.76, running on the port 8000.</p> <p>If it's the case of the crossdomain policy error, is anyone kind to explain what should be done to fix the problem?</p> <p>Thanks for your attention.</p> <p><strong>Update 1:</strong></p> <p>I set up a server listening on port 843 giving the crossdomain file, but I can see how Flash doesn't try to load it. (I tested the command <code>python -c 'print "&lt;policy-file-request/&gt;%c" % 0' | nc 23.29.126.76 843</code> and checked how the policy server indeed works.</p> <p><strong>How come the SWF doesn't try to load a crossdomain policy file?</strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload