Avg. Rating 3.0
Tags:



Problem

Flex Error #2032: Stream Error

Solution

note–First try in IE still the error occurs The only way to make it works is to go adding the arguments to compiler (via Properties – Flex Compiler) : -use-network=false

Detailed explanation

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.

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).

After reading this please post your comments to help future visitors.


+
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.

Report abuse

Related recipes