FDT – XML Security Sandbox Violation
Little problem that needed a little line to fix:
If you get this error in FDT when trying to load a XML file with paths obviously pointing to your own workspace and project:
*** Security Sandbox Violation ***
Connection to xml/sample.xml halted – not permitted from file:////Users/Jono/Documents/workspace/XML Test/bin/Main.swf
Exception fault: SecurityError: Error #2148: SWF file file:////Users/Jono/Documents/workspace/XML Test/bin/Main.swf cannot access local resource xml/sample.xml. Only local-with-filesystem and trusted local SWF files may access local resources.
at flash.net::URLStream/load()
at flash.net::URLLoader/load()
at com.kafkaris::Main/loadXML()[/Users/Jono/Documents/workspace/XML Test/src/com/kafkaris/Main.as:28]
at com.kafkaris::Main/init()[/Users/Jono/Documents/workspace/XML Test/src/com/kafkaris/Main.as:21]
at com.kafkaris::Main()[/Users/Jono/Documents/workspace/XML Test/src/com/kafkaris/Main.as:15]
You correct it by doing the following:
- In the Debug Configurations, click on the Compiler Arguments tab.
- Go to the end of the line and type in: -use-network=false
- Apply the change and click Debug.
And you are now loading XML error free! woo!
JK
PS – When configured right, I’m enjoying FDT more every day!
EDIT – I had to re-install FDT for a reason but since doing so found that allowing access through http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html as mentioned in the comments below has now resolved the issue for me.
ANOTHER EDIT – This may help also:
http://kafkaris.com/blog/2010/09/20/global-security-settings-panel-vs-on-osx/
Matan Uberstein
3 years ago
By default the flash player will not load local files. To fix this all you need to do is add your “working” directory as a trusted location on your flash player settings. You must do this online at:
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
Your fix is pretty sweet, but you’ll need to add that param for every run/debug configuration you create. Which might get annoying if you are dealing with a high volume of projects.
Hope this helps!
PS: FDT IS AWESOME!!!
Jonathan Kafkaris
3 years ago
@Matan Uberstein
Hi Mantan,
Thanks for sharing the info!
Funny thing is I tried that but I still got the error. Perhaps I don’t have something else set correctly?
Matan Uberstein
3 years ago
Usually I just add my entire drive as a trusted location. Never had problems with it. Other than that, I don’t know what you can do?!?
Jono Kafkaris
3 years ago
newer blog item may be the actual reason why this was happening – http://kafkaris.com/blog/2010/09/20/global-security-settings-panel-vs-on-osx/