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…
Hi Judah,
Fiddler and Charles both show the headers, but it wasn’t obvious at first that the “pragma” was incorrect. I’m glad to hear about the Network Panel in Gumbo. That will help. I think that, in my situation, it might have shown that the other browsers were not forwarding the bad header to flash.
Hi,
I had the same Error #2044: Unhandled ioError:. text=Error #2032: and I knew that was a problem of linkage between xml and the AS files and movieClips. I made again the links from mc to AS files. The problem was not there. The problem was in the PUBLISH SETTINGS which pointed to my old folder when making the swf, and not to the one I was using!! It took me about 30 minutes figuring it out. I hope my experience helps to someone else.
Awesome. You’re the first hit for “Error #2044″, that’s a certain fame I suppose. And, in my case, it was simply that I forgot the “q” in “search.json?q=” because I didn’t read the spec well enough. The error code lookup tool is awesome, though, thanks for building that!
It was a case of file structure for mine. I just changed the path to the XML document and the path to the images in the XML document and all was fine. Thanks all.
I have this error when a flash call a php and this php have some require_once, or include. Is there something to set in the php.ini ?
The html, and all php files are at the same place.
The require_once was tested with fullpath, relativepath and http url.
Thanks for answer.
I got this after not using my flex app for about 3 minutes.. then clicking to a page that had 3 queries running. I tried fixing it with the ?foo=rnd fix above.. no luck.
Obviously I’m thinking deep down its a cache issue.. i couldn’t figure the caching crap out.. but this ended up working:
The queries that fire are asynchronous, AND they are all accessing my php page that returns xml, so i thought that could be an issue.. Instead of just firing off my queries.. i made a util class that added them to an array.. and only fired the next one until the first one was complete. It just basically que’s the queries so they aren’t all trying to access my php page at once Seemed to fix it.. but i havent really gotten to test it TOO much.
Hey Guys. I am at the end of my rope with this. I have a C# 3.5 web service, and a Flex 3.0 application. It keeps throwing:
Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://localhost/ProjectTaskManagement/ProjectTaskManagementWS.asmx"]. URL: http://localhost/ProjectTaskManagement/ProjectTaskManagementWS.asmx
when I try to access the webservice. I added the webservice using the auto generator to the project, have tried crossdomain files(even though it is in the same directory as my Flex app), and the web service works properly.
In essence, I am getting and setting project objects that have lists underneath of them of tasks. The task is a complex object and so is the project.
Is there any tags I need to add to the web service, any extra code I need to add to make it work, etc.? Any help would be appreciated. Thanks.
Jesse
Hi, Jesse. Don’t give up hope. If you develop in Flex, you will see this error sooner or later. Here are a few thoughts:
– What format is the format of the result? Make sure you set the result format on the service object.
– Can you use the service successfully outside of Flex?
– Try using something such as Wireshark to do packet sniffing. This helped me in looking at what was being sent back and forth between the server app and the Flex app. I found out that Flex was expecting name/value pairs; I was sending it XML.
I’ve got an article on my blog on using Wireshark to sniff HTTP packets: http://devharbor.blogspot.com/2009/02/using-wireshark-to-sniff-http-packets.html
Hey Alex. I don’t see any way to set a format on the instantiated object. Where do you generally set the result format?
Yes, it works outside of the Flex environment. I have tested it thoroughly.
So, even though seems to be able to accept complex objects, since it generated my objects properly through its automated process, it cannot actually do so? Or is it the fact that I need to make my service Serializable or something? I have heard of this property, but never actually used it much. Thanks.
Jesse
This might help: http://livedocs.adobe.com/flex/3/html/help.html?content=data_access_2.html
I got this error when I was working with a ColdFusion webservice. As mentioned by other people, the default HTTP status code that gets returned when a webservice returns a fault response is 500 (internal server error). So if you get this error, be sure to test your webservice with a proxy debugger like charles or fiddler.
I was calling a function in a ColdFusion cfc using Webservice in a Flex 3 application. The file was Functions.cfc?wsdl. The path was correct because I did a select from the database and it worked fine. When I did an insert I got the error message listed in the thread. It was acting like an HTTP error. No weird domain issues, etc.
It was, in fact, a simple oversight on tired eyes – on the SQL insert I forgot the single quotes.
INSERT INTO Blah(name)
VALUES (#arguments.name#) should have been (‘#arguments.name#’)
I usually use cfqueryparam, but for testing I didn’t and overlooked the single quotes in my haste.
Simple and frustrating. Going to bed.
I got this error when trying to access a web server that’s connected through a wireless 3G network. I query the server every 15 seconds… and it works most of the time. (I’m using air so there are no sandbox problems).
Since this is a wireless network it gets disconnected every now and the so it’s normal to get a 2032 error from time to time. The problem is that once I get this error to often, it seems that it gets stuck and I keep getting the error every time even if the server gets back online.
Tryed cleaning the cache with the cacheResponse=false but no solution there.
This error can also be a response to a very simple, simple error. I had my text extension in the name of my file! (“file.txt” instead of just “file”).
Hope that helps.
And I’m stumped. I have a long web service running on Jetty. The flex code is running as an AIR app. The AIR flex service call requestTimeout is defaulting to -1. The flex service call fires off the long running request with no problem. However, after exactly 1 minute (60 seconds), the flex faults with the infamous error #232. The service is running locally via Jetty. If the service runs for less then 60 seconds everything works fine. The back end service works fine testing via curl or firefox. After the AIR app faults, the service happily keeps running and completes the request. Using tcpdump, there is no traffic after 60 seconds, so I believe this to be some flex timeout. I have tried both GET and POST requests….grrrrrr.
This can also be caused by using a URL that is too long.
http://www.brighthub.com/hubfolio/matthew-casperson/blog/archive/2009/10/23/urlloader-error-2032-stream-error.aspx
[RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL:
I get this error everytime I attempt a post, I first do a get and it populates the data fine, then I attempt to post and and I get this thing>>> any ideas
Linda, try doing a post using just a simple HTML page with a form. This way you take Flex out of the equation and know that the page is working. Also, see my comments elsewhere about using a tool such as WireShark to inspect the request data being sent and received to help you track down where the problem is.
I too get the same error. I am trying to get the file from my team mate’s machine. I gave the URLRequest as
var request:URLRequest = new URLRequest(“file://172.17.196.124/c:/sample/test.xls”);
But it throws up this error. Am I giving the url wrong? How to get that file from his machine?
hi i think i have the same problem as ximena but how can i change the linkage? please!!
I used flash by itself and your code didn’t work. I tried this one under a button/release function and works pretty well:
var s:Sound = new Sound();
var context:SoundLoaderContext = new SoundLoaderContext(10000);
s.load(new URLRequest(“otmaro.mp3″), context);
var channel:SoundChannel = new SoundChannel();
channel = s.play();
actually, this is the wrong board! sorry for the misspost.
I would really apreciate some helo. I’m trying to swf that is a gallery into a Uiloader and i get the same error.
The funny thing is that i let it load at the begining it’s ok but the broblem appears when i try to load on a mouse Event thanks.
I received this error: Error #2032: Stream Error. URL: /hello/sayhello”]. URL: /hello/sayhello”].
I am following the book “Flexible Rails: Flex 3 on Rails 2″ by Peter Armstrong. It seems like a good book but this error is very frustrating to have early on.
I am using Flexbuilder. After following the steps in the book and when I run the tutorial program (Pomodo) is when I received the error.
It turns out the Flexbuilder runs a url = file:///C:/flexrails/current/pomodo/public/bin/Pomodo.html. I am using FireFox as my browser.
I solved this by submitting the url: http://localhost:3000/bin/Pomodo.html. I’m not sure why Flexbuilder runs the url it does. I’ll have to do some digging.
At the top of our blog, you suggest manually trying to access the url outside my app. That saved my lots of time because I at least knew my connection and the url were correct.
Hope this helps
A quick fix for me was this:
var pageRequest:URLRequest = new URLRequest(“myurl”);
var pageLoader:URLLoader = new URLLoader();
pageLoader.load(pageRequest);
pageLoader.addEventListener(Event.COMPLETE, completePageLoader);
pageLoader.addEventListener(IOErrorEvent.IO_ERROR, errorIgnore);
…
protected function completePageLoader(evt:Event):void {
//…
}
protected function errorIgnore(evt:IOErrorEvent.):void {}
This of course only ignores the error, which was fine in my case though.
I hit the same error, and wanted to display a message within the UI to inform the user of the error. Thanks to GeekDeNZ I was able to write the following;
//Lets catch our errors for the external connection to the mailer file
loader.addEventListener(IOErrorEvent.IO_ERROR, errorIgnore);
//Lets deal with the error and display a meaningful error in the User Interface
function errorIgnore(evt:IOErrorEvent){
display.text = “Problem Connecting To External File”;
}
My problem was mentioned by someone here – I had set up src and deploy folders, the xml file I was trying to open was in the src folder, the swf was in the deploy folder.
i get the error when i try and publish the files to the server, it works fine on my development machine but when i publish to server, and try and run i get the following error – how can i fix?
Error: Error #2032: Stream Error. URL: http://145.1.5.176/Flex_Dev/FLARCameraParams.dat
at com.transmote.flar::FLARManager/onCameraParamsLoadError()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
Hi, Paul. Try creating a simple HTML page with a form that submits the file to the server. In other words, take Flex out of the equation altogether for now and see if the app works. You’ll also get far better error messages when it fails.
Make sure to set this attribute on the HTML form to enable uploads: enctype=”multipart/form-data”
Another method is to use an HTTP packet sniffer. I’ve used WireShark with great success; here are instructions on how to set it up for this purpose: http://devharbor.blogspot.com/search?q=wireshark
Fellas,
I solved this problem (after one day and a half searching the solution) just changing the required flash player version from 9 to 10 in Eclipse.
Motherfuckers at Adobe, please fix this bug!
I get this error, my request in the trace is fine but it shows the error at the button click event. Please help me how can i get rid off this error. trying this from Monday.
private function URLListRequestExample():void
{
var loader:URLLoader = new URLLoader();
var header:URLRequestHeader = new URLRequestHeader(“Content-Type”, “application/json”);
var request:URLRequest = new URLRequest(“http://dev1/StatService.svc/GetAvailableListJSON”);
request.method = URLRequestMethod.POST;
request.requestHeaders.push(header);
var locationArray:Array = myText.text.split(“,”);
var Ac:ArrayCollection = new ArrayCollection(locationArray);
request.data = ‘{“locations”:”‘+ Ac.list +’”}’;
loader.load(request);
}
The IStatService.cs interface has the following method which the flex code is trying to invoke. The StatService.cs takes the locations, iterates throught the list and build and returns a list (with number of people in each location)
[OperationContract]
[WebInvoke(ResponseFormat = WebMessageFormat.Json)]
List GetAvailableListJSON(List locations);
The trace is
Request sent{“locations”:”USA,Canada”}
Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: http://dev1/StatService.svc/GetAvailableListJSON
at WebserviceExample/URLListRequestExample()[C:\Documents and Settings\cont\My Documents\Flex Builder 3\WebserviceExample\src\WebserviceExample.mxml:87]
at WebserviceExample/__myListJSON_click()[C:\Documents and Settings\cont\My Documents\Flex Builder 3\WebserviceExample\src\WebserviceExample.mxml:243]
List GetAvailableListJSON(List locations)
{
if (locations== null || locations.Count == 0)
return null;
else
{
List peoples= new List();
foreach (string people in peoples)
{
switch (people.ToUpper())
{
case “”:
peoples.Add(0);
break;
case “USA”:
peoples.Add(12);
break;
default:
peoples.Add(20);
break;
}
}
return peoples;
}
}
web.config has
Maverick (and those working with rails),
It may pay off to change your contentType from “application/xml”
to
_service.contentType = “application/x-www-form-urlencoded”
I blogged about something funny Flex does to the HTTPService’s “method” property here : http://www.mcquilleninteractive.com/blog/?p=178
I hope this saves somebody time.
Daniel
Try creating a simple HTML page with a form that submits the file to the server. In other words, take Flex out of the equation altogether for now and see if the app works. You’ll also get far better error messages when it fails.
My experience…
SUMMARY: Check the url. If it is wrong, you will have a #2032.
Well, this error has proven how things can go irrational and stupid in a logic based (!) system again :) …
I was getting the source url from loaderInfo and parsing it to generate a reasonable target url. Be carefull doing this, because normally in your development environment, you might (probably) be directly running your flash application and having a url starting with ‘file://’ etc. So usually when we program, we write a mini bypass for a ‘http:// localhost/…’etc.
PITFALL 1 : Not making a bypass specially in a CS3 or CS4 environment.
SOLUTION 1:
// assume r is root movieclip
var u: String = r.loaderInfo.url;
if(u.substr(0,4)==’file’)u=’http://localhost/yourlocation…’;
PITFALL 2 : After making a bypass, forgetting to parse and generate a proper url from loaderInfo.url , because bypass works fine in development environment but it does not in real world.
Hope this helps,
IVT
My issue was that ive been using the latest edition of PHP and mySQL, and only had the latest PHP mySQL communication extension enabled.
turns out that flex 3 autogenerates PHP using an earlier mySQL extension. So all the flex generated code was trying to run mySQL functions that I had not enabled yet.
How to enable extensions:
1. open the php.ini file in a text editor ( i.e. notepad ) ( in the folder where you installed your php, mine is in C:\PHP )
2. about midway down, you will see a list of extensions that are “commented out” like this:
…
…
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_mysql.dll
;extension=php_mysqli.dll
;extension=php_oci8.dll
;extension=php_oci8_11g.dll
;extension=php_openssl.dll
;extension=php_pdo_firebird.dll
;extension=php_pdo_mssql.dll
;extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
;extension=php_pdo_sqlite.dll
…
…
( the “;” at the front tells php to ignore the line. you have to remove the semi-colon to “activate” the extension )
Here are the mysql extensions in the list:
;extension=php_mysql.dll <– this is the one flex 3 uses in its php
;extension=php_mysqli.dll <– this is the one i had activated
3. enable both of them to cover all scenarios by deleting the ";" ( this will add all the functionality php uses to talk to mysql )
extension=php_mysql.dll
extension=php_mysqli.dll
4. save the file
5. Restart your server ( i'm running the apache 2.2 server ) to update the php changes
6. Restart your flex 3 database connection ( may not be necessary, but I do it just to be safe! )
DONE!
now if you are me, then the 2032 error is gone when I run my Flex app, only to be replaced with a 1088 "badly formed XML error".
So we are through the first hang up, onto the second.
I solved this by doing what tons of people suggested, turning OFF PHP's error display option. Apparently this causes some sort of issue.
If you are also suffering from 1088,
1. Go back into the php.ini file
2. Find the line
display_errors = On
and change it to
display_errors = off
( i did the same for the "display_startup_errors" right below it. I don't know if that was required, but I did anyway )
3. Save php.ini
4. restart your server and your flex 3 database connection
DONE!
hopefully, everything will work now, and you will see a glorious editable database table, made by flex. ( Its nice to have that all done automatically for me, but I probably spent the same amount of time trying to figure this out!! )
one more note,
there have been some suggestions of using the flex 4 beta builder as the solution ( some people reported that the errors went away just by using it ). Flex 4 may use the newer PHP mysqli.dll extension in its autogenerated code, which would have solved my issue as well. But I'm not sure about that, just a guess.
anyway, hope this is helpful
-himmy
I got a similar error (Error #2032: Stream Error) on running my application within flex builder. In my case it turned out to be because I was accessing a https service on a server where the certificate was jacked. I accessed the url directly on safari and got a warning about the expired certificate. I went ahead and acknowledged it and after that I was able to get past the error.
I was receiving this error because of two issues.
1. I was using a self-generated certificate on my development webserver. When accessing my .swf file using https, the application would throw the error.
To fix it, I imported by self-generated certificate in IE.
But there was more…
2. There is a caching problem with some versions of IE when using an https connection. To get around this your server needs to tell IE not to cache the response. For more info see http://support.microsoft.com/kb/q234067/
Hope that helps.
Easy to overlook.. but one other source could be that you are working on a pc where the settings are that the extensions of files are hidden in the explorer. When you then give your file you want to load the name “text.txt”.. the actuall file name will ben “text.txt.txt” and flash can’t find your file. Rather than giving a 404 specific error it will show you this error.
With kind regards,
Dennis Korf
Isioux
Hey all! I just resolved this issue for my app. I don’t know if it’ll help anyone here, but I had an entry in my hosts file pointed to my site for testing. My hosting provider had updated my ip address and I still had the old ip address in my host file. Once I commented the entry out, all worked as expected.
Best wishes,
Jeremy