9 Replies Latest reply on Jan 4, 2010 12:44 PM by jakehilton

    Flash Builder 4 Beta 2 throwing security error on every run

    danny_beard Level 1

      I just installed the beta 2 version of flash builder, but every time I try to actually run anything built on the 4.0 SDK, it throws a security runtime error when trying to access the 4.0 sdk swf.

       

      SecurityError: Error #2148: SWF file ......../Test.swf cannot access local resource ....../Test/bin-debug/framework_4.0.0.10485.swf. Only local-with-filesystem and trusted local SWF files may access local resources.

      at flash.net::URLStream/load()

      at flash.net::URLLoader/load()

      at mx.core::CrossDomainRSLItem/load()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\m x\core\CrossDomainRSLItem.as:235]

      at mx.core::RSLListLoader/loadNext()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx \core\RSLListLoader.as:184]

      at mx.core::RSLListLoader/load()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\cor e\RSLListLoader.as:156]

      at mx.preloaders::Preloader/initialize()[E:\dev\gumbo_beta2\frameworks\projects\framework\sr c\mx\preloaders\Preloader.as:279]

      at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::initialize()[E:\dev\gumbo_beta2\frameworks\pro jects\framework\src\mx\managers\SystemManager.as:1923]

      at mx.managers::SystemManager/initHandler()[E:\dev\gumbo_beta2\frameworks\projects\framework \src\mx\managers\SystemManager.as:2412]

       

      I'm running eclipse galileo (carbon) on OS X. If I create a 3.4 project, everything is fine.

       

      Any ideas?

        • 1. Re: Flash Builder 4 Beta 2 throwing security error on every run
          Flex harUI Adobe Employee

          Beta2 defaults to using the cached RSLs.  You can add -static-rsls to turn that off.  But Flash Builder should have put your bin-debug in the trusted folder list and avoided this problem.

           

          Alex Harui

          Flex SDK Developer

          Adobe Systems Inc.

          Blog: http://blogs.adobe.com/aharui

          • 2. Re: Flash Builder 4 Beta 2 throwing security error on every run
            danny_beard Level 1

            So, I'm assuming this is a bug in the new version of Flash Builder? - I just went ahead and merged the libraries into my swf to get it to work for now  during development.

             

            Thanks alot!

            • 3. Re: Flash Builder 4 Beta 2 throwing security error on every run
              tstatler Level 1

              This is a known issue (a result of a Flash Player bug, deferred for now).

              http://bugs.adobe.com/jira/browse/FB-11595

               

              In Beta 2 we pop-up a dialog when you first run/launch your project that looks like this:

               

                  Flash Player Warning
                   --------------------
                   Note: If the Flash player displays a "SecurityError" message or blank window
                   when you run your program, you may need to completely exit your browser and
                   try again.


              So, if you run into this just quit all your browsers and re-launch.

               

              Tim

              • 4. Re: Flash Builder 4 Beta 2 throwing security error on every run
                gers32

                That's weird, I've just installed FB4 beta 2 and didn't get the error message in the built-in browser; I just got the Flash Player 10 error message when I tried to access the application from Firefox.

                 

                Also, the IDE won't let me add "-static-rsls" to the compiler options: once on the Flex Compiler page, an error message prevents me from clicking OK or going to another page, telling me the page contains non valid values, when I haven't even started editing! Is this a known bug, or am I doing something wrong? I have to add that I imported a project from the Mate framework (http://mate.asfusion.com/page/documentation/getting-started) that was probably built using FB3...

                • 5. Re: Flash Builder 4 Beta 2 throwing security error on every run
                  gers32 Level 1

                  And now, after having rebooted my computer, I don't get the Flash Player message anymore, but the application still doesn't show up! I still see the initialization bar (very briefly), but the page remains blank.

                  • 6. Re: Flash Builder 4 Beta 2 throwing security error on every run
                    mike_morearty Level 1

                    gers32, if you are still having the problem with the error message in the Properties page, can you post a screenshot of that property page, so I can see your settings?

                    • 7. Re: Flash Builder 4 Beta 2 throwing security error on every run
                      gers32 Level 1

                      Hi Mike,

                       

                      It seems that part of my problem is due to an error in .actionScriptProperties (which file doesn't show up in the package explorer): the "mainApplicationPath" refers to a non existent file "StockQuotesExample.mxml" (see screen copy below):

                       

                      FB4_b2_Properties_Compiler.jpg

                       

                      So I manually modified the property to replace it with the correct file name:

                       

                      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
                      <actionScriptProperties mainApplicationPath="StockQuoteExampleWebService.mxml" projectUUID="2376e773-57bd-4f6a-9034-7911cb1df6d8" version="6">
                        <compiler additionalCompilerArguments="-locale fr_FR" autoRSLOrdering="true" copyDependentFiles="true" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
                          <compilerSourcePath/>
                          <libraryPath defaultLinkType="0">
                            <libraryPathEntry kind="4" path="">
                              <modifiedEntries>
                                <libraryPathEntry index="2" kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/framework.swc" useDefaultLinkType="false"/>
                                <libraryPathEntry index="4" kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/rpc.swc" useDefaultLinkType="false"/>
                                <libraryPathEntry index="3" kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/spark.swc" useDefaultLinkType="false"/>
                                <libraryPathEntry index="1" kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/textLayout.swc" useDefaultLinkType="false"/>
                              </modifiedEntries>
                              <excludedEntries>
                                <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
                              </excludedEntries>
                            </libraryPathEntry>
                            <libraryPathEntry kind="1" linkType="1" path="libs"/>
                            <libraryPathEntry kind="3" linkType="1" path="G:/Program Files/Adobe/Mate/libs/Mate_07_8.swc" useDefaultLinkType="false"/>
                          </libraryPath>
                          <sourceAttachmentPath/>
                        </compiler>
                        <applications/>
                        <modules/>
                        <buildCSSFiles/>
                      </actionScriptProperties>

                       

                      Unfortunately, I still get the same error message in the Flex Compiler settings page, in the project's Properties. Indeed, the message looks for the file in the wrong path: "G:\Program Files\Adobe\Mate\src\src", when it's really in "G:\Program Files\Adobe\Mate\src"... The screen shot below shows my directory structure:

                       

                      FB4_b2_Dir_Structure.jpg

                       

                      This is an example application that I downloaded to test the Mate framework; maybe it set it up wrong. Also, I created an SWC file with their new made-for-Flex 4 library, but that didn't solve my problem.

                       

                      Thanks for your help,

                       

                      Chris.

                      • 8. Re: Flash Builder 4 Beta 2 throwing security error on every run
                        mike_morearty Level 1

                        gers32, you have your project root files (e.g. .project, .actionScriptProperties, etc.) inside the "src" directory, which is the wrong place for them -- they should be one level up.  Not sure how they ended up there.

                         

                        Also, I have fixed the code so that the Compiler Properties page will work properly even if the main application file can't be found.  thanks for bringing it to our attention.

                        • 9. Re: Flash Builder 4 Beta 2 throwing security error on every run
                          jakehilton Level 1

                          No matter what I do I still can't get the security error to go away... I created a brand new flex project just to keep it simple.. but no dice.

                           

                          Any suggestions?

                           

                          Thanks,
                          Jake