Error #2032: Stream Error.

Error #2032: Stream Error.

This is the most read post on this site. After reading this please post your comments to help future visitors.

Causes:
This error appears to occur when the url or file is blocked or not found by HTTPService call. For me, this error appeared when I had typed in the incorrect url in the HTTPService url property. Specifying the correct URL fixed it. To check this you can check your URL for typos or try to access the URL outside of your app to make sure it is there. Use Service Capture, Charles or Firebug to inspect the response from the server. If the file is not found the server still sends a response back (html or xhtml (xml)). Note: Additional tips and use cases are mentioned in the comments.

This error is also caused by a swf trying to access a file across a restricted domain. It’s not going to get the file if it is not allowed to access it. This behavior then generates the error. The fix in is to add a cross-domain policy file to the domain where the page is located at. The cross-domain file must specify that your domain (or any other domains) can access that URL. You can also use a proxy on your server to get the file (I have heard that there are issues with this approach with caching in certain situations).

Another cause for this error in certain browsers is caching. Use JabbyPanda’s technique to prevent caching in IE6 or set the response headers in your server side page to prevent caching.

A note from Mike Chambers:
If you run into this using URLLoader, listen for the:
flash.events.HTTPStatusEvent.HTTP_STATUS

and in AIR :
flash.events.HTTPStatusEvent.HTTP_RESPONSE_STATUS

It should give you some more information (such as the status code being returned from the server).


Please reply in the comments below if this helped you or not. You can also use the Error Lookup Tool to look up Flex compiler or runtime errors. more info…

This entry was posted in Flex. Bookmark the permalink.

294 Responses to Error #2032: Stream Error.

  1. Petit Jean says:

    I got this #2032 error from relative paths in a XML. Used with URLRequest() to load a mp3. Weird enough the same XML contained relative paths to flv video’s, loaded via FLVplayback.play(), but that worked fine! :S

  2. Mike Tucker says:

    I’ve also come across the dreaded “2032″ error when using URLLoader to load a php file on our server, but it appears to have nothing to do with the URL being incorrect, rather, it seems that the SWF is having trouble reaching our site entirely. Here’s the code I’m using:

    private var server_dir_loader:URLLoader = new URLLoader;

    server_dir_loader.load(new URLRequest(“http://www.megadev.co.uk/gg2/directory.php” + “?” + new Date().valueOf()));
    server_dir_loader.addEventListener(Event.COMPLETE, serverDirectoryLoaded);
    server_dir_loader.addEventListener(ProgressEvent.PROGRESS, serverDirectoryProgress);
    server_dir_loader.addEventListener(IOErrorEvent.IO_ERROR, serverDirectoryIOError);
    server_dir_loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, serverStatus);

    …and here are the errors:

    serverStatus([HTTPStatusEvent type="httpStatus" bubbles=false cancelable=false eventPhase=2 status=503])

    serverDirectoryIOError([IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://www.megadev.co.uk/gg2/directory.php?1269483330328"])

    Eight times out of ten the php file is successfully loaded and executed, but that’s just not reliable enough. We don’t have a particularly fast server, but you’d still expect loading a 1kb file to not cause too many problems. What’s strange is that on receiving the IOError I try loading the php file again but continually get same error, yet if I restart the SWF then more often than not it will load the file without any problems. Does anyone out there know where I’m going wrong?

    Cheers,

    Mike.

  3. Mark Craig says:

    You can not have special characters (@#$&^%) in media name.

  4. jdmurray says:

    I was happily developing using WAMPSERVER2 when I made a few changes in the server settings and my perfectly-working code started throwing the dreaded and ambiguous “Error #2032″ after calling HttpServer.send(). After a considerable amount of experimentation, it appears that what caused this error to appear was my changing from PHP version 5.3.0. to 5.3.1; switching back to 5.3.0 rendered my code working again. I haven’t checked if the same problem persists in PHP 5.3.2.

  5. Pola.venki says:

    I am facing this problem only in IE6 but in rest of all it is fine.
    So URL typo and crossdomain.xml problems are not causing this issue.

    May be the last reason “Caching” is the probelm. But unfortunately the link that you have suggested “http://www.jabbypanda.com/blog/?p=16″ does not seem working.

  6. Ghada says:

    I’v been trying to open an application on facebook, every time only this specific application gives me this error, and starts pop up .bin files to download, how can i fix it? i updated java, i updated flash player, i even updated IE and firefox, and it didnt work.

    Help please :(

  7. Alexander Torrado says:

    I got the same error testing a chatroulette clone script.

    The situation was that for testing purposes I used my Url with the directory and not directly input the domain. Example: I used http://www.myhostingdomain.com/subdirectorywherechatrouletteclone instead of http://www.mydomainforchatroulette.com

  8. Pola.venki says:

    At last my problem get resolved. Caching is the only problem.

    I tried to set header like

    response.addHeader(“Cache-Control”,”no-cache, no-store, must-revalidate”);

    This get worked.

    Previously we were setting ‘no-cache’ whereas IE6 is HTTP/1.0 that’s why it is unable to understand ‘no-cache’. To overcome these dependencies, now we were setting both ‘no-cache’ and ‘no-store’.

    Ghada:- I don’t get your problem.

    Is your problem related to #2032 stream error (or) opening popup?

    What is your browser?

    I am not sure that you will get stream error only on facebook.

  9. Niels Keetlaer says:

    I ran into this as well. The strange thing is, the error was reported on the line I initiated a Sound object, and not on the line where I asked it to load a non-existing file. Broke my head that one did, so I hope it doesn’t break yours, whoever reads this next.

  10. simon.otst says:

    I’ve got this issue too. The problem was in server side PHP script. Error in SQL query, so when try with no parameters in browser – everything was ok, but when pass params from air app – server return sql error, and application get #2032.
    Now everything is workin.

  11. Prateek says:

    I am using httpService… when i pass large chunk of data with POST method i get this error and if I pass small text it works perfectly…. any clues?

    I get following error

    rror #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: http://xyz.com/MVCSite
    at TestMVC()

  12. Simeon says:

    Hi

    I spent a couple of days struggling with AS3 errors #2032 and #2044 while making a swf that submitted a name and score to a PHP page which put them in a MySQL database. I wrote the cause and solution in a blog post at:

    http://peizweb.com/blog/?p=53

    Hope it stops some other folks losing valuable hours as the causes were not obvious.

  13. Nauman says:

    I started my web server and going to run the application and my system restarted. When i came back I tried to run application without starting web server. Because according to me I fired the server… After 15 mins of code review I searched and OOOPSsssss I found what I was doing wrong from this blog…

    Thanks alot

  14. tom says:

    Got same problem while importing data from txt file

  15. Sheldon says:

    There is one other reason this can happen. If you only see #2032 over HTTPS with IE, its a bug in IE. IE doesn’t properly interpret HTTPS streams with no-cache headers set.

    See http://www.adobe.com/support/documentation/en/flex/2/releasenotes_flex2_fds.html

    Options are to not set the header, or if you are using channels, there is a workaround shown in the above link.

  16. Doug says:

    Heya Juda, I had same issue in AIR app with httpService call. Issue was a result of malformed URL. It was initially interesting because the call would work on first send(), where successive calls failed with 2032. Following inspection of the fault event, I noticed that my url headers were missing, as I am building them dynamically. The problem was not with httpService but with how I was managing headers for recurring calls.
    Anyway, I was able to define the problem quickly by inspecting the event.fault.message of the FaultEvent.
    hth
    Doug

  17. Judah says:

    @thx doug!

  18. Nicolas says:

    Had decoding error with soap response of call to web services. Turn out it was #2032 and the Flex SDK was trying to decode an empty string because of that.

    Those errors appeared randomly regardless of the service call, but usually when several services were called at the same time, and only on internet explorer (6, 7 and 8)

    Even if those were POST request and not GET, adding the HTTP header “Cache-Control : no-cache” to each SOAP response seems to have solved the issue.

  19. Pingback: URLLoader Problem in AIR: Error #2032: Stream Error - Flashforum

  20. Pingback: Error #2032:IOError « Vivek Lakhanpal's Weblog

  21. I got this error #2032 but it was only in Chrome and not in any other browser. So when i drilled down the problem it boils down to ASP.net related issue. I blogged my experience with the problem and all reference i used including this blog in solving the problem at http://viveklakhanpal.wordpress.com/2010/07/01/error-2032ioerror/

    Thanks Everyone,
    Vivek

  22. Martin Sjåstad says:

    I tried fixing the problem by following the tips here. However I still keep getting the error.

    Error: There was an IOerror accessing the XML file: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: ./images.xml"]
    at noponies.net::LoadXml/handleError()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()

    My setup is as follows:
    * Imported flash catalyst into Flash builder
    * created a slideshow of images in flash cs4 which uses an xml file to get images
    * imported this slideshow swf to the flash builder project in a folder/package called assets.
    * all the slideshow files are on the same level ie. the swf is on the same level as the xml and the folder. The xml refers to images/img*.jpg

    Any help is very much appreciated.
    I’m literally about to rip my hair out, and eat it with milk on :)

  23. Tahir Alvi says:

    Hi everyone.

    i also got this error when i try to load images through URLaoder. The interesting thing is that the error say no image found at the location but when i go to that location the images are here.

    Why this is happen.

    My real code is that.

    private var pathStr:String;
    protected function loadPart(partName:String,cat:String,rawMaterial:String,subElements:XMLList=null):void{
    for(a=0;a<viewsArray.length;a++){
    var ldr:Loader = new Loader();
    ldr.name = cat;
    pathStr = xmlList.@images_folder+rawMaterial+"/"+viewsArray[a]+"/"+partName+".png";
    trace(pathStr);
    var req:URLRequest = new URLRequest(pathStr);
    ldr.load(req);
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, partLoaded);
    ldr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, partMissing);
    }
    }
    protected function partMissing(evt:IOErrorEvent):void{
    Alert.show('A Shoe part is missing at '+ pathStr,"Shoe Part is missing");
    }

  24. Alex C says:

    @Tahir: Try using an HTTP sniffer tool, such as Wireshark and look at the HTTP traffic to see what is happening. That’s the only way I was able to track down the problem and fix it in my Flex app. I have instructions on downloading and using Wireshark here: http://devharbor.blogspot.com/2009/02/using-wireshark-to-sniff-http-packets.html

  25. Martin Sjåstad says:

    THanks guys!!
    I actually managed to fix it.
    Definitely have to learn and understand more about using Flash builder. I was using flash cs5 pro and then importing it to flash builder and obviously I put it in some wrong directory. I ended up using a path like ../../../images/source/something.xml

    :S Super weird.
    Thanks for the tips :)

  26. Jarrod says:

    I was getting the same error when loading a sound file. My issue ended up being case sensitivity – I was trying to load “callModel150Hz.mp3″ instead of “callModel150hz.mp3″.

    The tricky thing is that it worked fine when in the Flash IDE (CS4), but not in any browser’s Flash player. Really strange.

  27. John says:

    Got this error using URLaoder to load an XML file. Everything worked fine when published in the IDE but from the webpage it wouldn’t even though there was no (obvious) cross-domain issue. The IO error led me to this blog…and the fix. All I had to do was use a FULL PATH instead of a relative path. Works great now.

    Thanks!

  28. flash noob says:

    i had the most bizarre experience with this error -

    today i tried my first ever flash application. i started, of course, with a very simple one. it worked fine on the flash development machine (windows), but worked only once on the production (lamp) box. all successive trials brutally displayed error #2032.

    reading tons of suggestions and pulling my hair had no affect, until i accidentally tried the “export release build (optimize swf, etc.) and voila – that was it.

    just thought this may help other people too.

    cheers !

    • Judah says:

      export release build copies resources out to your website directory. so you may have had the files there but unless flash builder “sees” them it won’t copy them out and you will get this error. selecting the project folder and choosing refresh will cause fb to scan the project directory and then be able to copy the files out. you only have to do this if you add or remove files outside of flash builder.

    • Hrvoje says:

      I was pulling my hair for almost a week now, but finally it is now solved.
      My webservice was pointing to .aspx file that returs XML data.
      All browsers, except Chrome worked just fine.
      For Chrome it didn’t work until I tried your solution “export release build” in Flex.

  29. sher says:

    make sure your flash file is saved before you try and load in same folder as xml file or whatever file u try to load.

  30. Pingback: Error #2044: Unhandled IOErrorEvent:. text=Error #2038: File I/O Error. « judah's blog

  31. flash noob says:

    i get errpr #2032: and cant seem to fix it
    heres my code:

    var music:Sound;
    var trans:SoundTransform;
    var channel:SoundChannel;
    var musicOn:Boolean = false;

    soundbtn.addEventListener(MouseEvent.CLICK,shuffling);

    function shuffling(e:MouseEvent):void{
    if (e.target.currentFrame==1){
    music=new Sound(new URLRequest(“TheBattleShip(loop).wav”));
    trans=new SoundTransform(1,-1);
    channel= music.play(0, 1000, trans);
    musicOn = true;
    trans.volume=1;
    SoundMixer.soundTransform = trans;
    }
    else {
    e.target.gotoAndStop(1);
    musicOn = false;
    trans.volume=0;
    SoundMixer.soundTransform = trans;
    channel.stop();
    }

    }

  32. Judah says:

    It might be having trouble with the parenthesis in the file name, TheBattleShip(loop).wav. Last I checked Flash can’t play wave files by itself.

    One way to check if a file is in the right place is add an embed tag to your code:
    [Embed(source="images/embedtest.wav",mimeType="application/octet-stream")]
    public var byteArray:String; // remove the public if in Flash IDE

    more info:
    http://stackoverflow.com/questions/668186/can-the-flash-player-play-wav-files-from-a-url

  33. ajay says:

    Hello,

    I have been trying to integrate flex component i.e. chart in to HTML page using object tag. But Browsers such as firefox and chrome are throwing error 2032.

    Html Code goes like

    Hello !

    It prints hello but does not show Flex componet.

    Flex code:

    Reply

  34. ajay says:

    Hello again!
    I got the problem. I was trying to put just .swf file instead of whole. I used Flex builder to export project in htdocs folder. It works fine now!

    ajay

  35. The wiredest thing for me is: My project is not yet in the web. I’m getting this error locally. I have a loader that loads a “swf” (with no errors). But when any of them tries to load an XML, I got this error.
    Any clues ?
    Tanx !

  36. Alex C says:

    @Renan: Try loading the XML into the browser to see if it’s well-formed.
    btw, how are you pulling in the XML?

  37. I’m trying to load it with the URLLoader. If I put them both (swf and xml) in the same folder, they work. But if I put the xml in another folder, like:
    >xml
    +myXml.xml
    >mySwf.swf
    I’ve got the error (with the path as “/xml/myXml.xml”).
    as I said, I haven’t put them online yet, because I’m still working with this project. And I hoped to get them to work before I did it.
    Any clues ?
    Tanx !

  38. Alex C says:

    Flash is finicky about where it loads content from. For a recent project, for the SWF to load FLVs, the SWF had to be in the same folder as the flv files. Otherwise it would blow up. So this might be the same thing.

  39. Eric says:

    I was encountering this issue and wanted to post about it here because this is the #1 google result when searching for this issue. For me the issue ended up being that my URL was too long for Internet Explorer (the only browser that produced the error), which has a limit of 2048 characters. This limitation is detailed here: http://support.microsoft.com/kb/208427 and will result in stream error #2032. Hope this helps someone!

  40. Well, in the same folders, it did worked. But this can’t be a final solution…
    Imagine a job with tons of xml’s and swf’s…
    Adobe must do something about this.
    But tanx for the help and attention ! ;)

  41. Alex C says:

    @Renan: Don’t give up. Try posting to the Adobe Flex forum: http://forums.adobe.com/community/flex/flex_general_discussion

    If this is a Flash project, try this forum: http://forums.adobe.com/community/flash

    One of my favorite places to get programming answers is http://stackoverflow.com

    Good luck.

  42. Isaac says:

    well, in my case, it was a matter of the .php file’s permission.
    it was set to 777 and it didn’t work, so I changed to 755.

  43. Pingback: HTTP Status 201 causing Flex #2032 Error in IE only

  44. George Burnett says:

    I’ve gotten this error a couple of times in Flash Builder when I’ve copied a new XML file to a data directory while the IDE was open and then tried to load it without refreshing the directory. Refresh and run again fixes it.

  45. John Evans says:

    I got this error when I was using a TextField to let the user enter a filename, then try to load from that file. After reading your blog post I hit upon the idea that the string *might* not be exactly the same. The problem was that the TextField puts an extra character at the end. (Possibly a newline? I didn’t bother investigating quite that far.) Anyway, trying to load the URL WITH that extra character at the end caused a problem. I solved it by using the String’s slice function to get rid of the last character!

  46. Rahul says:

    Hi,
    I am trying to load a http url through flex but i don’t know which type of data (image or video) is available at that path what should i do to understand which type of data is available at that link.
    Please let me know i u r having any idea.
    Thanks in advance.

  47. Thomas says:

    I was working on some company-internal AIR programs and received this error when retrieving an XML response from our server. It’s amazingly frustrating when the code is spotless, and you get this error! I am developing it in CS5. What worked for me: Properties for the swf –> ActionScript settings [edit...] button –> at the bottom of the window, under “Runtime Shared Library Settings”, the “Default linkage” drop box was set to “Runtime shared library”. I CHANGED THIS to “Merged into code.” …and no more errors. I’m not entirely sure why RSL is giving me this problem, but as I’m running an AIR application internally, lack of RSL is not a concern. Once I have the time, I will start digging in to this issue further and see if I can determine where the actually problem is – server?, UAC on Windows 7?, rainy weather on a Monday? (only half a joke there!)

  48. Kawika says:

    Researching an error regarding MP3 files and came across your blog. Thanks for the helpful post.

  49. Adam J says:

    Great post, solves my problem with this error for good!

  50. Ashish says:

    Hi ,
    I am getting this error and then my webcam freezes out. Can anybody tell me the reason behind it and what can be possible solution??

    Error: Error #2032: Stream Error. URL: file:///C|/Documents%20and%20Settings/sharmaas/Adobe%20Flash%20Builder%204/FLARTest/bin%2Ddebug/
    at com.transmote.flar.tracker::FLARToolkitManager/onCameraParamsLoadError()[C:\Documents and Settings\sharmaas\Desktop\AR\Actionscripts\com\transmote\flar\tracker\FLARToolkitManager.as:343]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()

Leave a Reply

Your email address will not be published. Required fields are marked *

Wrap your code before posting! Click the links below:

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="">