views:

89

answers:

3

I'm moving a Flex 3 site to Flex 4, but when I run the application, it attempts to download a .swz file from Adobe, and gives the following error:

*** Security Sandbox Violation ***
Connection to http://fpdownload.adobe.com/pub/swz/tlf/1.1.0.604/textLayout_1.1.0.604.swz halted - not permitted from http://localhost/Fl/CityGIS/main.swf
Error #2048: Security sandbox violation: http://localhost/Fl/CityGIS/main.swf cannot load data from http://fpdownload.adobe.com/pub/swz/tlf/1.1.0.604/textLayout_1.1.0.604.swz.
Failed to load RSL http://fpdownload.adobe.com/pub/swz/tlf/1.1.0.604/textLayout_1.1.0.604.swz
Failing over to RSL textLayout_1.1.0.604.swz

Following this is an attempt to download the same file from localhost.

Is there a way to configure the SDK to get these files, or an issue with the configuration of my application?

A: 

Hmmmm - generally this is because the site you are accessing does not contain a crossdomain.xml file. However I can download it from here.

Try adding this to your compiler options: -use-network=false

Then clean and force build your app.

If that doesn't work, and just grasping for straws, but have you tried to manually download it and place it in your project lib space?

Also, are you sure you are updated to Flex 4.1?

I just checked my local KB (evernote) and mentioned that FireFox sometimes has an issue with caching, and that restarting FF solved it once for me.

BigWorld
A: 

I think the problem is that the location it is using for the textLayout swc http://fpdownload.adobe.com/pub/swz/tlf/1.1.0.604/textLayout_1.1.0.604.swz

redirects to

/pub/swz/flex/4.1.0.15186/textLayout_1.1.0.601.swf

and the cross domains policy is not happy about that.

I think this points to an issue with the version of the sdk that you are using. You can go into sdks/<FRAMEWORK_VERSION>/frameworks/flex-config.xml (in the Flash Builder directory) and see exactly how the runtime shared library path is configured for textLayout.swc. This is what I have for flex_sdk_4.1.0.15186:

<!-- TextLayout SWC -->    
<runtime-shared-library-path>
  <path-element>libs/textLayout.swc</path-element>
  <rsl-url>textLayout_1.1.0.601.swf</rsl-url>    
  <policy-file-url></policy-file-url>    
  <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.1.0.15186/textLayout_1.1.0.601.swf&lt;/rsl-url&gt;
  <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml&lt;/policy-file-url&gt;
</runtime-shared-library-path>

I suggest try switching to the latest 4.1 sdk and recompiling.

kldavis4
A: 

I found I only had this problem when I using: -use-network=false, and I was attempting to run the html locally and the .swf was accessing locally files (outside the flex security free folders).

My workaround is to update sdks//frameworks/flex-config.xml (in the Flash Builder directory), and swap the order runtime shared paths: for example:

<runtime-shared-library-path>
    <path-element>libs/textLayout.swc</path-element>
    <rsl-url>http://fpdownload.adobe.com/pub/swz/tlf/1.1.0.604/textLayout_1.1.0.604.swz&lt;/rsl-url&gt;
    <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml&lt;/policy-file-url&gt;
    <rsl-url>textLayout_1.1.0.604.swz</rsl-url>
    <policy-file-url></policy-file-url>     
</runtime-shared-library-path>

TO:

<runtime-shared-library-path>
    <path-element>libs/textLayout.swc</path-element>
    <rsl-url>textLayout_1.1.0.604.swz</rsl-url>
    <policy-file-url></policy-file-url>     
    <rsl-url>http://fpdownload.adobe.com/pub/swz/tlf/1.1.0.604/textLayout_1.1.0.604.swz&lt;/rsl-url&gt;
    <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml&lt;/policy-file-url&gt;
</runtime-shared-library-path>

You'll have to do this for the other 5 or so entries.

Adobe should really look at this, and fix the problem.

Hope this helps.

Cheers

Parmy

Parmy