Skip navigation
paulhart83
Currently Being Moderated

Android AIR App Random Error #2032: Stream Error (HTTPStatusEvent = 0)

Mar 27, 2012 10:39 AM

Tags: #air #error #android #stream #urlrequest #ssl

Hello

 

I am investigating an issue with failed requests and it's been difficult to narrow it down. When I put the URL into a browser I get a valid / expected response. However when I try to access the same URL using Actionscript 3 on my Android Devices (Nexus S and Xoom), I get stream error #2032 at random.

 

I am using URLRequest with a custom RequestListener class:

 

var loader:URLLoader = new URLLoader();                 

if(action == "zip") loader.dataFormat = URLLoaderDataFormat.BINARY;

 

var listener:RequestListener = new RequestListener(action, loader, endFunction, extra);

loader.addEventListener(Event.COMPLETE, listener.requestSuccessful);

loader.addEventListener(IOErrorEvent.IO_ERROR, listener.requestFailed);

loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, onHTTPStatusChange);

 

var req:URLRequest = new URLRequest(Global.apiURL);

req.method = URLRequestMethod.POST;

req.data = new URLVariables(paramString);

loader.load(req);

 

return loader;

 

Note that it works on one of my routers but not the access point:

 

onHTTPStatusChange: 0

requestFailed: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: { ... }" errorID=2032]

 

Since it works on one router but not the other, I can't say that it's an issue with the app, phone, or our request URL.

 

Note that I am using SSL / https.

 

Is it a timeout issue?? This is really frustrating.

 

Thanks.

 
Replies
  • Currently Being Moderated
    Apr 4, 2012 10:31 AM   in reply to paulhart83

    Have you been able to solve this issue? I am also experiencing it currently.

     

    Update: Turns out in my case that adding an HTTPStatusEvent.HTTP_RESPONSE_STATUS event handler fixed the issue.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 4, 2012 11:42 AM   in reply to paulhart83

    I ran into this exact problem recently and it was because the date/time on the computer was more than 24 hours off, causing SSL to fail. It's an Air issue - worked fine in any browser and  in a Flex app running in the browser that uses SSL, but not in an Air app until the date/time was set correctly.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 12, 2012 6:17 PM   in reply to Brian Vaughn

    wtf, that ended up fixing it for me too.. what the hell?

     

    weirdest thing for me was that even though i was getting IOError... the Event returned in the IOError actually had the DATA in it from the server...

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points