7 Replies Latest reply on Dec 2, 2011 7:18 PM by Tangent Lin

    Security sandbox violation: file:///ProfilerAgent.swf

    SmugJustin

      Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: file:///ProfilerAgent.swf?host=localhost&port=9999 cannot load data from localhost:9999.

       

      So after doing some profiling on one of my projects I now get this error when doing release builds and pushing them to my live servers. How do I get this fixed? I'm not trying to profile, I did an "Export Release Build" which should get rid of the debug and profiling libraries but obviously its not.

        • 1. Re: Security sandbox violation: file:///ProfilerAgent.swf
          Gaurav J Adobe Employee

          Sounds like you have a stale entry for PreloadSwf in your mm.cfg file. Look for mm.cfg file in your home folder and remove the PreloadSwf entry from it.

           

          -Gaurav

          http://gauravj.com/blog/

          1 person found this helpful
          • 2. Re: Security sandbox violation: file:///ProfilerAgent.swf
            SmugJustin Level 1

            home folder doesn't have a mm.cfg, there is only one in /Library/Application Support/Macromedia/mm.cfg which doesn't have a preload or profiling entries in it.

             

            #flashlog

            # Beginning with the Flash Player 9,0,28,0 Update, Flash Player ignores the TraceOutputFileName property.

            # On Macintosh OS X, you should use colons to separate directories in the TraceOutputFileName path rather than slashes.

            TraceOutputFileName=/Users/justin/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt # Set TraceOutputFileName to override the default name and location of the log file

             

            ErrorReportingEnable=1 # Enables the logging of error messages.  0/1

            TraceOutputFileEnable=1 # Enables trace logging. 0/1

            MaxWarnings=100 # Sets the number of warnings to log before stopping.

             

            #flashlog - undocumented

            TraceOutputBuffered=0 # Traces will be buffered and write to disk multiple lines in one access

            AS3Verbose=0 # Traces detailed information about SWF ByteCode structure and Runtime parsing of the bytecode

            AS3Trace=0 # Trace every single call to any function that is being called in the SWF at runtime

            AS3StaticProfile=0 # Enables Just in Time Compiler (NanoJIT) logs.

            AS3DynamicProfile=0 # Shows dynamic information about the opcodes being called and gives statistic for each. The statistics include count, cycles, %count, %times and CPI

             

            #policyfiles

            PolicyFileLog=1 # Enables policy file logging

            PolicyFileLogAppend=0 # Optional; do not clear log at startup

            So unless there is another value I'm missing I don't think it is there. Is there another name or something in my home directory I should look for?

            • 3. Re: Security sandbox violation: file:///ProfilerAgent.swf
              Gaurav J Adobe Employee

              It should have been in mm.cfg in /Users/justin

               

              Does the problem persist after restarting the browser?

               

              -Gaurav

              • 4. Re: Security sandbox violation: file:///ProfilerAgent.swf
                mike.daross

                I'm having a similar issue.  This error occurs on application startup:

                 

                Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: file:///Users/owner1/Documents/Incenergy/Rebuilt Workspace/.metadata/.plugins/com.adobe.flash.profiler/ProfilerAgent.swf?host=localhost&po rt=9999 cannot load data from localhost:9999.

                at ProfilerAgent()

                 

                I do have a mm.cfg in my user folder (owner1), but it only has 3 lines:

                 

                ErrorReportingEnable=0 # Enables the logging of error messages.  0/1

                TraceOutputFileEnable=1 # Enables trace logging. 0/1

                MaxWarnings=100 # Sets the number of warnings to log before stopping.

                I've tried closing the browser entirely before running the profiler, but that doesn't seem to help.

                • 5. Re: Security sandbox violation: file:///ProfilerAgent.swf
                  Flex harUI Adobe Employee

                  Make sure that directory is allowed in the Global Settings for Security.

                  • 6. Re: Security sandbox violation: file:///ProfilerAgent.swf
                    mike.daross Level 1

                    It's been allowed for a long time.

                     

                    For some reason, despite me not really having changed anything apart from opening various views in FlashBuilder, the profiler now appears to have mysteriously started working again.  I'd like to list my repro steps, but I have no idea what they were.

                    • 7. Re: Security sandbox violation: file:///ProfilerAgent.swf
                      Tangent Lin Level 1

                      I have finally got mine working.  Just make sure that the ProfilerAgent.swf is included in Flash Player's security setting, and make sure that mm.cfg has the following settings:

                       

                      ProfileFunctionEnable=1

                      ProfilingOutputFileEnable=1

                      RendererProfilingEnable=1

                       

                      For more information, I have written a blog about this issue.