Error #2048 (Sandbox Violation) in AIR prevents future hostname resolution

Scenario:
Create an application which tries opening 100 socket connections. This in turn triggers an Error #2031(Socket Error) on a few of them, I believe this is a limitation in Flash? or something similar? After a few seconds, those same socket connections will trigger an Error #2048 (Security Sandbox Violation).
If the hostname which you used to connect to the sockets is a name (ex: "localhost") it will prevent any new connections from opening at all and will trigger an Error #2048 on all those future connections even though they are completely unrelated to the first.
If the hostname which you use is an IP Address ("127.0.0.1") those individual connections will have failed but no future interaction will be affected.
Problem:
1) Why is an AIR application triggering a security sandbox error at all?
2) Why is this error locking up hostname resolution?
3) Is this in fact a hostname resolution problem since there are no issues when using an IP address?
3a) In my testing it appears that once the Error #2048 "locks" resolution, it can be "unlocked" by using an IP Address on any socket (any successful socket connection really) which will restore the name resolution capability. Or so it seems.
Any help would be greatly appreciated. Until I nailed down the specific cases where this was happening the errors appeared very byzantine.
It is not only the Error #2031 from too many connections that triggers the Error #2048. The main problem is that Error #2048 is triggered by unspecified socket errors (unexpected close for example) and hence locks up future connections.
The reason this is such a problem is that I'm creating an application specifically for the purpose of monitoring a custom server so errors do happen, and if future requests cannot complete a connection due to name lookup failure it can cause a huge problem for monitoring validity.

Any help with this would be greatly appreciated.

Similar Messages

  • Day 1 Ex. 3 Help! Error: Security Sandbox Violation

    When I run the solution code in Flex Builder, I get a ***
    Security Sandbox Violation *** message when debugging. Although,
    when I changed my default browser to Safari, everything seemed to
    work fine. Also, when I go directly to the bin-debug folder and
    opened the "AdobeODT.html" file, the data from the xml file loads
    properly. I played around with the "crossdomain.xml" solutions I've
    been finding on the net, but couldn't get it to work. Anyone else
    running into this problem? Any help would be greatly appreciated.
    Thanks.
    Running:
    Mac OS X 10.5.6
    Flex Builder 3
    FireFox (current)
    Safari (current)
    Opera (current)

    Hi everybody who is experiencing this same problem. A little
    research online directed me to the following page
    http://www.jetbrains.net/jira/browse/IDEA-21996.
    Which contains a good explanation why this is happening:
    quote:
    A SWF file can access one type of external resource only,
    either local or over a network; it cannot access both types. You
    determine the type of access allowed by the SWF file by using the
    use-network flag when you compile your application. When
    use-network flag is set to false, you can access resources in the
    local filesystem, but not over the network. The default value is
    true, which allows you to access resources over the network, but
    not in the local filesystem.
    So a sollution for this problem is:
    quote:
    you may specify the following string in "Additional compiler
    options" at "Flex Compiler Settings" tab: -use-network=false
    Hope this helps all of you experiencing this problem.

  • Error Invalid Number - 7 digit number prevents future SMS messages

    I can't send SMS messages to one of my contacts at all.
    my contact had only 7 digits under "Mobile" phone because he was in my area code.
    I tried to send a text to him and got this response:
    "####### Error Invalid Number. Please re-send using a valid 10 digit mobile number or valid short code. <my text message>"
    The ####### was his 7-digit number from the contact info.
    So, I modified the contact info and put in the area code to make it 10-digits. I tried sending another text message, but that had the same exact response (with only 7 digit number).
    I cleared the messages for that contact and tried again, same result.
    I synch'ed my iPhone and then tried again, same result.
    My contact now has the correct 10 digit number, but whenever I try to send a SMS message to him I get the response with the 7-digit number saying Error Invalid Number.
    How can I fix this?

    Apparently the phone is wrongly remembering the shorter number, so try this. Edit the contact to put back the 7 digit number, but add a NEW phone number with the 10 digit code, and a different label, perhaps a custom label. Try sending an SMS to that new number. If it works, you can just delete the old 7 digit number entry entirely.

  • How to resolve security sandbox violation (Error#2148) in Flex 3 on XP?

    Hi,
    When I tried to access an image on c:\ (on XP), I get the following error:
    *** Security Sandbox Violation ***
    Connection to file:///C:\DBFiles\3.jpg halted - not permitted from http://localhost/test-debug/test.swf
    -- Remote SWFs may not access local files.SecurityError: Error #2148: SWF file http://localhost/ullmanphp-debug/ullmanphp.swf cannot access local resource file:///C:\DBFiles\INDSprintOrgChart.pptx\3.jpg. Only local-with-filesystem and trusted local SWF files may access local resources.
    at flash.display::Loader/_load()
    at flash.display::Loader/load()
    It looks like some sort of mismatch on security settings. I have done the following so far (based on what I got by googling....)
    1. Flex comipler setting additional compiler arguments:  -use-network=false
    2. I have added a crossdomain.xml on the source directory with these lines...
    <site-control permitted-cross-domain-policies="master-only"/>
    <allow-access-from domain="*"/>
    <allow-http-request-headers-from domain="*" headers="SOAPAction"/>
    However, error is still appearing. How do I fix this for testing on my local machine. I cannot move to a webserver at this time.
    Thanks!.

    How do I set Security.sandboxType related to flash player? When I try to see it in my application through debugger it says "remote". I think I need to set it to one of the following from the adobe manual pages...
    Security.sandboxType has one of the following values:
    remote (Security.REMOTE)—This file is from an Internet URL and operates under domain-based sandbox rules.
    localWithFile (Security.LOCAL_WITH_FILE)—This file is a local file, has not been trusted by the user, and it is not a SWF file that was published with a networking designation. The file may read from local data sources but may not communicate with the Internet.
    localWithNetwork (Security.LOCAL_WITH_NETWORK)—This SWF file is a local file, has not been trusted by the user, and was published with a networking designation. The SWF file can communicate with the Internet but cannot read from local data sources.
    localTrusted (Security.LOCAL_TRUSTED)—This file is a local file and has been trusted by the user, using either the Flash Player Settings Manager or a FlashPlayerTrust configuration file. The file can read from local data sources and communicate with the Internet.
    application (Security.APPLICATION)—This file is running in an AIR application, and it was installed with the package (AIR file) for that application. By default, files in the AIR application sandbox can cross-script any file from any domain (although files outside the AIR application sandbox may not be permitted to cross-script the AIR file). By default, files in the AIR application sandbox can load content and data from any domain.
    Any input on how to set it would be greatly appreciated. Thanks!

  • Can't erase or paritition primary internal HD: "wiping volume data to prevent future accidental probing failed"

    Yesterday my computer (mid-2010 macbook pro) froze and after doing a hard reset my computer would hang during the bootup process.
    I then started the machine in recovery mode and tried to do a Repair Disk using the Disk Utility.
    The Repair Disk failed an indicated that the partition needed to be erased and recreated.
    Why I tried to erase and recreate the paritition, I got the error message: "wiping volume data to prevent future accidental probing failed"
    I am unable to create a new partition on my internal hd using Disk Utility. I keep on getting the error same message. I've already tried the fixes mentioned in https://discussions.apple.com/thread/4490281?start=0&tstart=0
    I've tried creating the partition using Parted Magic but that fails as well
    When I start the machine now in recovery mode, it goes to internet recovery.
    I would suspect that this is a hd failure, but there are a couple of things that seem to indicate otherwise:
    The Lion recovery parition is still visible in Disk Utility, and when I run a Verify Disk on it, everything is ok
    Using Parted Magic, I've run a complete HD self test, and there are no errors reported
    Any help would be greatly appreciated.

    Hi there!
    Sounds like i have similar problem but with my  MacBook Pro 13' (9.2, mid 2012)
    I have made some updates 500GB SSD Intel 520, and original kit of 500GB Toshiba 5400 (with Opticbay)
    It is time to change kit Toshiba to larges one. My choise is Hitachi 7K1000 Travelstar 7200 rpm for 1TB (SATA III).
    I try to set up new HDD to Opticbay, when using Disk Utility there is Error
    "wiping volume data to prevent future accidental probing failed"
    When i change it to original place for HDD - everything fine, but if SSD on Opticbay - MacBook does not see it.
    I have read a lot of forums about this problem, and there some issues how to fix it - need to install updates for EFI Frimeware manualy, but suddenly it is impossible - when i try to install update there is Alert -
    Actualy i realy need to help with that! Maybe some one?

  • Error #2048: Security sandbox violation

    I've been developing Flex apps for a couple of years now and feel comfortable with my development environment.
    I'm testing out Gumbo in my same environment (new workspace): WAMP based
    My test app works fine on my localhost set up... but when I upload the files to my hosted domain server... I get Error #2048: Security sandbox violation.
    Specifically:
    - I'm invoking an HTTPService by setting the url to a relative path (folder/file in same dir as the swf)
    - I set method to POST and useProxy to false
    (<fx:Declarations>
            <s:HTTPService id="contentService" url="data/verd_content.xml" method="POST" useProxy="false" resultFormat="e4x" />
        </fx:Declarations>)
    - I wrapped the send call in a try / catch block and show an Alert with the error message in the catch... here's what it says
    body = (null)
      clientId = "DirectHTTPChannel0"
      correlationId = "F4B9A542-8B00-5CDB-3C36-1316919FC255"
      destination = ""
      extendedData = (null)
      faultCode = "Channel.Security.Error"
      faultDetail = "Destination: DefaultHTTP"
      faultString = "Security error accessing url"
      headers = (Object)#1
        DSStatusCode = 0
      messageId = "E629F555-EF8B-E535-7CE4-13169662A82A"
      rootCause = (flash.events::SecurityErrorEvent)#2
        bubbles = false
        cancelable = false
        currentTarget = (flash.net::URLLoader)#3
          bytesLoaded = 0
          bytesTotal = 0
          data = (null)
          dataFormat = "text"
        eventPhase = 2
        target = (flash.net::URLLoader)#3
        text = "Error #2048: Security sandbox violation: http://****.com/Main.swf cannot load data from http://localhost:***/data/verd_content.xml?hostport=***t.com&https=N&id=F4B9A542-8B00-5CDB -3C36-1316919FC255."
        type = "securityError"
      timestamp = 0
      timeToLive = 0
    *NOTE: I obfuscated parts of the url for security reasons
    I read the other similar posts here about problems like this when using the PHP / Zend set up... but I checked the .actionScriptProperties file and it does not have any URLs in there (like localhost:port#)
    I'm not using a service-config.xml file in this project... but I have set up WebORB for PHP servers and use that all the time... so I know how that works...
    Is this a bug or am I missing something new in the Gumbo ?
    Again: my swf file is in a folder in the webroot on my ISP
    also inside that folder is another folder with an XML file in it
    I'm setting an HTTPService call using the url parameter on a POST with a relative file path (folder/filename.xml)
    changing the url to an absolute makes no difference...
    thanks in advance for any help

    Sure...
    here's the code that contains both the HTTPService setup and the URLLoader setup... like i said in the original post.. the HTTPService call throws the error described, whereas the URLLoader call does not:
    private var loader : URLLoader = new URLLoader();
    private var req : URLRequest = new URLRequest("data/***dant_content.xml");//path obfuscated
    protected function Application_creationComplete():void
        // This works...
        loader.addEventListener( Event.COMPLETE, parseContent );
        loader.addEventListener( IOErrorEvent.IO_ERROR, contentFault );
        // This does not...
        /* contentService.addEventListener( ResultEvent.RESULT, parseContent );
            contentService.addEventListener(FaultEvent.FAULT, contentFault ); */
        try
            loader.load( req );
        catch (err:Error)
            Alert.show("In Try Catch Error Block: " + err.message);
            currentState='home';
    the HTTPService was set up like this: (again, i obfuscate the URLs for security)
        <fx:Declarations>
            <s:HTTPService id="contentService" url="data/***dant_content.xml" method="POST" useProxy="false" resultFormat="e4x" />
        </fx:Declarations>
    the parseContent function setup in the event listener justs reads the XML file and uses that data to build an image gallery.
    hope this helps (for what its worth: I'm not doing anything serious with Gumbo as of yet due to these kinds of bugs)

  • Error #2048: Security sandbox violation: Urgent Checked the forum none of the solutions worked

    Hi all,
        I am new to flex . I am trying to connect to my localhost using the XMLSocket like below
        var xmlsock:XMLSocket = new XMLSocket(); // Line #187
        xmlsock.connect(127.0.0.1, 8080);
        xmlsock.send(xml);
      But after a Minute I get this below error
      Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: app:/main.swf cannot load data from 127.0.0.1:8080.
        at main/handleLogin()[C:\Documents and Settings\Vulcantech\My Documents\Flex Builder 3\src\main.mxml:187]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at mx.rpc.http.mxml::HTTPService/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\autobuild\3.2.0\framewor ks\projects\rpc\src\mx\rpc\http\mxml\HTTPService.as:290]
        at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:\autobuild\3.2.0\frameworks\ projects\rpc\src\mx\rpc\AbstractInvoker.as:193]
        at mx.rpc::Responder/result()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responde r.as:43]
        at mx.rpc::AsyncRequest/acknowledge()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\ AsyncRequest.as:74]
        at DirectHTTPMessageResponder/completeHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\s rc\mx\messaging\channels\DirectHTTPChannel.as:403]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at flash.net::URLLoader/onComplete()
    Thanks in advance
    Balaji

    Hi Alex,
       Thanks for the Link . I saw the link and have done the same steps as said in that . I have created a crossdomain.xml file in my 127.0.0.1 and i can also see that the policy being accepted in the  "C:\Documents and Settings\username\Application Data\Macromedia\Flash Player\Logs" . I have pasted the lines in policyfiles.txt below.
        OK: Root-level SWF loaded: app:/main.swf
        OK: Policy file accepted: http://127.0.0.1/crossdomain.xml
       But I still get that sandbox violation error. I have tried the below solutions and none of them worked
           1) security.allowDomain("*");
           2) crossdomain xml in the webroot of the accessing server like below
                        <?xml version="1.0"?>
                         <!DOCTYPE cross-domain-policy SYSTEM “http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd”> 
                         <cross-domain-policy>
                            <site-control permitted-cross-domain-
    policies="all" />
                             <allow-access-from domain="*" to-ports="*" />
                       </cross-domain-policy>
           3) I saw that adding the Application path in the  "C:\Documents and Settings\username\Application Data\Flash Player\#Security\FlashPlayerTrust\flexbuilder.cfg" will remove the sandbox violation but this also didnt work        
           4)  "Project - Properties - Flex Compiler - Additional compiler arguments:" add   -use-network=true  and then recompile and post to server
           5) I have also checked the policy file logs
    Thanks in advance
    Balaji

  • Air app, Rest service, Security sandbox violation

    Hi All,
      I wrote an app a couple of years ago using flex 3 that connects to a number of remote web services and does various things.
    This worked fine.
    Now I have been asked by the customer to update the app as it stopped working at some point.
    I am trying to use the resthttpservice library to do a PUT operation, but I am getting the following error when I try and create a socket to the remote server:
    Error #2048: Security sandbox violation: app:/main.swf cannot load data from http://my.host:8182
    Now, it's been a while since I've done anything with flex so I am rusty. But this error is usually fixed by having a crossdomains.xml file on the remote server. But it was my understanding that this was only required when one's app was running from within the browser and that desktop applications are not effected.
    Can anyone clarify this for me? It seems that there were changes made to the flash player in version 10 that might have changed this.
    I am very puzzled at this point!
    thanks for any help!

    These articles discuss security changes between FP 9 and 10:
    http://www.adobe.com/devnet/flashplayer/articles/fplayer10_security_changes.html
    http://www.adobe.com/devnet/flashplayer/articles/fplayer9-10_security.html
    What is impacted?
    This change can potentially affect any SWF file accessing cross-domain content. This change affects SWF files of all versions played in Flash Player 10 and later. This change affects all non-app content in Adobe AIR (however, AIR app content itself is unaffected).
    What do I need to do?
    Read the article: http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html

  • AIR:  Loading external Swf - sandbox violation

    Hello Mates ,
    I need a help ... an urgent one !!! i tried so hard to figured it out .. but i couldn't .. so I appreciate your help so much ..
    I'm developing an Air App using flash ... the app loads an external SWF file dynamically through an xml ... the SWF file has a movieclip that has a listener (ON click )
    function mouseDownHandler(event:MouseEvent):void {
    navigateToURL(new URLRequest(clickURL));
    everything is working fine until i click on this movieclip ... it displays the below message
    SecurityError: Error #2121: Security sandbox violation: navigateToURL: http://www.mydomain.com/maskot/avatar.swf cannot access http://www.yahoo.com. This may be worked around by calling Security.allowDomain.
    any help !!! because i really have a deadline !
    Thank you so much !

    that's why i added those comments about the swf's domain.  for locally loaded swfs, use:
    SFMltd wrote:
    Hi Kglad, Thanks for the Example.
    if i run my class with securityDomain = SecurityDomain.currentDomain; then it throws this error: SecurityError: Error #2142: Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property.
    The swf file im trying to load is stored locally so i guess this error makes sense. However if i comment out that line i get the same "cannot access Stage owned by app" error?
    See below for class:
    package  {
      import flash.display.MovieClip;
      import flash.filesystem.File;
      import flash.events.Event;
      import flash.net.FileReference;
      import flash.events.MouseEvent;
      import flash.display.Loader;
      import flash.net.URLRequest;
      import flash.system.LoaderContext;
      import flash.system.ApplicationDomain;
      import flash.system.SecurityDomain;
      public class assetPreview extends MovieClip {
      private var loader:Loader;
      private var mainSWF:MovieClip = new MovieClip();
      public function assetPreview() {
      addEventListener(Event.ADDED_TO_STAGE, initialise);
      public function initialise(e:Event):void
      removeEventListener(Event.ADDED_TO_STAGE, initialise);
      var allowSWF:LoaderContext = new LoaderContext(false,ApplicationDomain.currentDomain);
    // allowSWF.securityDomain = SecurityDomain.currentDomain;
      loader = new Loader();
      loader.load( new URLRequest(settingsXML.pathToSWF),allowSWF);
      loader.contentLoaderInfo.addEventListener(Event.COMPLETE, viewPreview);
      public function viewPreview(e:Event):void
      addChild(mainSWF);
      mainSWF.addChild(loader);

  • Flex 4 + AIR 2 + mx:Image = Security Sandbox Violation!

    Hi there!
    I've been using Flex 4 and AIR 2 for some time now and there's a bug (or is it really one) that I always get and can't understand...
    Whenever I use a <mx:Image> to load an image (JPG) on a remote server that has a valid crossdomain.xml I get some annoying warnings. Of course, these only are warnings and everything runs fine (except that) but it's a pain to debug an app that has lots of logs like that:
    *** Security Sandbox Violation ***
    SecurityDomain 'http://static-p3.fotolia.com/jpg/00/07/56/92/110_F_7569245_9hdeWKxUxFRNYuowdSDBNv0YFN9xTJ9 S.jpg' tried to access incompatible context 'app:/Main.swf'
    I've googled it and found lots of others folks/threads about this, but none of them provide a valid solution... Seems like it's specific to AIR because some answers/solutions I found work in a basic SWF, but fail in an AIR app.
    Is that a bug in Flex?
    Am I wrong about the crossdomain.xml?
    How could a JPG raise a Security Sandbox Violation?
    Tips or tricks, anyone?

    AIR has different security rules because it doesn't really have a "domain"
    to compare against crossdomain.xml.  The warnings are annoying and
    misleading and usually indicate that some code is trying to access the
    bitmap inside a try/catch block.  Usually you can ignore any warning that
    doesn't stop execution.

  • Error 2142 - security sandbox violation

    Hi,
    I have a problem when I try to compile my player, I get the following error:
    SecurityError: Error #2142: Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property. file:///C|/development/Flash/Pathe%20ads/New%20cmpt%20sample%20code/AS3ComponentDemoCode% 5Fv2.1/DemoPlayer3Component.swf was attempting to load http://objects.tremormedia.com/embed/swf/acudeo.swf?rand=949275459.
    What's odd is that:
    1. I have used Security.allowDomain("http://objects.tremormedia.com/"); in the source code
    2. This was working fine the day before last!
    I have tried adding a crossdomain.xml file in the folder where I build the player, still no joy.
    Can anyone help me with this? I tried throughout yesterday to fix it to no avail. I've even tried installing and building the player on a different machine to double check there wasn't something wrong on my PC.
    Any help would be great - I'm tearing my hair out!

    Hi,
    If you're still having issues, feel free to reach out to us directly. [email protected] or me personally at [email protected]
    Thanks,
    Andrew Baisley
    Sr Solutions Engineer
    Tremor Media

  • Installed m4 crucial SSD and I cannon erase and format new drive. I get an error "wiping volume data to prevent future accidental probing failed"

    Installed m4 crucial SSD and I cannot erase and format new drive. I get an error "wiping volume data to prevent future accidental probing failed." any suggestions? Thanks.

    are you trying to format/erase it while it's in your Macbook?
    I have 2 Crucial M4 SSD.
    Connect via external USB.  Boot your computer with your old hard drive and proceed with the erase feature if you're planning on cloning your drive.

  • SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: cannot access

    When we try to print the Google Map API for Flash component, it is throwing the Security Sandbox Violation
          SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: http://ps6143:8080/aa/XYZ/Main.swf/[[DYNAMIC]]/1 cannot access  http://mt1.google.com/vt/lyrs=m@171000000&hl=en&src=api&x=1&y=1&z=1&s=Gali&flc=x3t. No policy files granted access.
    at flash.display::BitmapData/draw()
    To avoid this error we tried to use the alternate API provided by library. But that also causing cross domain issue as it loading some 3d library internally which is not able to access our application.
    SecurityError: Error #2121: Security sandbox violation: BitmapData.draw: http://maps.googleapis.com/mapfiles/lib/map_1_20_10_3d.swf cannot access http://ps6143.persistent.co.in:8080/dv/SiteOptimizer/SiteOptimizer.swf/%5b%5bDYNAMIC%5d%5d /1http://ps6143:8080/aa/XYZ/Main.swf/[[DYNAMIC]]/1. This may be worked around by calling Security.allowDomain.
    at flash.display::BitmapData/draw()
    Please help us in resolving this issue.
    Thanks & Regrds,
    Ravi Darji

    There is no redirect... Charles is a web proxy so it will look completely legitimate to the browser.
    According to the help, it's getting the access request from the SWF itself and not the crossdomain.xml file:
    In the case of a source object other than a loaded bitmap, the source object and (in the case of a Sprite or MovieClip object) all of its child objects must come from the same domain as the object calling the draw() method, or they must be in a SWF file that is accessible to the caller by having called the Security.allowDomain()method.
    http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9 b90204-7d1b.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7c4a
    So the default state accessing a SWF on a different domain is protected, unless that SWF allows some or all domains to access it via the Security.allowDomain() method.

  • Sandbox Violation: AIR + contentLoader'd SWFs versus UI components?!

    I've written about this once before with respect to Yahoo Components but it just became a lot more urgent, as my attempt to add a Flash UI ColorPicker to my app resulted in generating
    *** Security Sandbox Violation ***
    SecurityDomain 'file:///H:/Path/To/Content/panelWithSwitchesAndTextFrames.swf' tried to access incompatible context 'app:/scribblingz.swf'
    on many of my SWF's.
    Is there any way around this issue that anyone is aware of? It's especially frustrating that it works perfectly without any components in the AIR library and breaks immediately after I add the first one!
    Thanks in advance,
    Eric.
    Flash CS4 10.0.2 on Windows 7 + AIR 1.5

    I was able to find a workaround of the security sandbox using Loader.loadBytes();
    Aleksandar Andreev's Loader class really helped:
    http://blog.aleksandarandreev.com/?p=42

  • This bug has been around for over a year: SecurityError: Error #2123: Security sandbox violation

    Hi,
    The bug of 'SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: file:///xxx/xxx.swf cannot access rtmfp://fms4.acrobat.com/cocomo/na2-sdk-xxx/xxx. No policy files granted access.' was first reported in lccs forum over a year ago:
    http://forums.adobe.com/message/2803074
    But the bug is still around. The bug can be generated by calling BitmapData.draw() on a flash.media.Video object which is attached to a p2p stream. It looks like the solution is to have the publisher to call:
    send("|RtmpSampleAccess", true, true)
    on the NetStream object _before_ the subscriber calls NetStream.play(), in order to give the permission to subscribers for audio and video streams.
    In lccs library, the above permission authorisation happens in WebcamPublisher:
    protected function onNetStatus(p_evt:NetStatusEvent):void
    if (p_evt.info.code=="NetStream.Connect.Success") {
    setTimeout(sendSnapShotPermission, 500);
    _stream.send("|RtmpSampleAccess", true, true);
    protected function sendSnapShotPermission():void
    _stream.send("|RtmpSampleAccess", true, true);
    but it doesn't help the problem. In fact, it is not clear to me when this 'snap shot permission' is sent to the subscriber.
    One more note: This is not a critisism for the lccs development quality, but rather a question on how ready lccs is for production use. After encountering this bug, I had to go through the lccs code (the open source parts), and found out that the library is not really written, well, carefully, and it is full of temporary quick-n-dirty fixes.
    For instance in the above example, sendSnapShotPermission() is called after 500 milliseconds, probably to allow something to happen before calling the method, but how can you be sure that it will happen in 500 milliseconds? Probably,an event listener should have been used. Immediately in the next line, we see:
    _stream.send("|RtmpSampleAccess", true, true);
    which is a duplicate of sendSnapShotPermission(). many examples like this can be found throughout the library.
    Aureliano

    Hi Nigel,
    Two questions:
    1. When the publisher sends the access permission to the subcriber by:
    netStream.send("|RtmpSampleAccess", true, true)
    , on the subscriber side, what event or function can handle the guaranteed receipt of the access permission? Currently it is possible to draw the incoming stream video upon receiving NetStream.Play.Star and waiting for 5 seconds or so:
    public class MyWebcamSubscriber extends WebcamSubscriber {
    override protected function layoutCameraStreams():void
    // trying the event listener seems to work here.
    _streamManager.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
    override protected function onNetStatus(e:NetStatusEvent):void
    super.onNetStatus(e);
    case "NetStream.Play.Start":
    setTimeout(function():void {
    // draw the video from the incoming stream here.
    }, 5000);
    The questions is, which event can let the subscriber know that it has the access permission to the video stream?
    2. In WebcamPublisher, why is that the access permission is sent 3 times?
    a. Once on receiving NetStream.Connect.Success with 0.5 second delay, as in below.
    b. Once immediately upon receiving NetStream.Connect.Success, as in below.
    protected function onNetStatus(p_evt:NetStatusEvent):void
    if (p_evt.info.code=="NetStream.Connect.Success") {
    setTimeout(sendSnapShotPermission, 500);
    _stream.send("|RtmpSampleAccess", true, true);
    protected function sendSnapShotPermission():void
    _stream.send("|RtmpSampleAccess", true, true);
    c. Once in onConnectionTypeChange() with 2 seconds delay:
    protected function onConnectionTypeChange(p_evt:StreamEvent):void
    if ( _streamManager.isP2P) {
    _stream= new NetStream(_connectSession.sessionInternals.session_internal::connection as NetConnection,NetStream.DIRECT_CONNECTIONS);
    setTimeout(sendSnapShotPermission, 2000);

Maybe you are looking for

  • Report according to mb5b

    Dear All, Can i use MB5B report to see  the opening and closing balance of a particular material in sub contracting scenario. "I tried using the following way": I gave the company code , plant and selection date. now in  special stock indicator  i se

  • Which table has the data for DeliveryBlock and DunnCount ??

    Hi SAP gurus I am trying to read values of DeliveryBlock and DunnCount, but couldn't locate a table that has these values. The help feature showed that the table name is V_TQ04A. However, when I try to use the command "select * from V_TQ04A into itab

  • Error in http dynamic streaming

    Hello everyone, I have making mutli-bitrate streaming in FMS and FFMPGE. In FFMPEG I create 4 bitrate of source video and publish on the FMS through RTMP protocol (rtmp://my-server/livepkgr/mystreamName1?adbe-live-event=liveevent). Now all configurat

  • FILE TO INBOUND ABAP PROXY - " LOOP_IN_MESSAGE_ROUTING  ERROR "

    Hi ,  Getting the following Error in *FILE TO INBOUND ABAP PROXY* which is updating a Database table in R/3. <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <!--  Call Adapter   --> - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30"

  • Problem with one master two details

    Hi, I have to create a form with one master and two detail blocks, both related via the same primarykey to the master block. Both detail blocks shall be based on joins (as shown in the white paper). First I have the master block with its items on the