Skip to main content
December 17, 2010
Question

URLLoader doesn't work(IOError #2032) in AIR SDK version 2.5

  • December 17, 2010
  • 18 replies
  • 52182 views

Hi,

I'm troubling with URLLoader.load() method only in AIR SDK version 2.5.

Simply it doesn't work...

When 'load' method is called, the IOError below is raised

Error Event message:

>IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://localhost:8888/login/remoteLogIn?account=xxx" errorID=2032

# Additionaly, HTTPStatusEvent.status = 0

At the same code, same environment, it works if I chage AIR SDK version from 2.5 to Other(2.0/1.5)

#Flex SDK version is 4.1

The problem code is...

function initLoader():void{

        var url:String  = "http://hoge.com/servletName";

        var variables:URLVariables = new URLVariables();

         variables.account = "xxx";

        var request:URLRequest = new URLRequest(url);

         request.data = variables;

          var loader:URLLoader = new URLLoader(request)

         loader.load(_request);

        loader.addEventListener(Event.COMPLETE, completeEventListener);

        loader.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, responseListener);

        loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, responseListener);

        loader.addEventListener(IOErrorEvent.IO_ERROR, responseListener);

        loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, responseListener);

}

function completeEventListener(e:Event):void{

     //some codes...

}

function responseListener(e:Event):void{

     //catch error event here.

}

I tryed another environment and another simple test code but it happens in any situation if AIR SDK version is 2.5.

Is anybody has same problem and has resolution of this problem?

With this problem, I can't access http server with AIR for Android.

Thanks.

This topic has been closed for replies.

18 replies

Participant
November 11, 2014

We're still experiencing this bug occasionally.


We are using URLLoader to communicate with a php server. This happens under AIR 15 beta downloaded from adobe labs, on iOS, during the login call.

We can see in the server's logs that the response has been dispatched OK but it just doesn't reach the app. After a while, around 1 min, the IOError StreeamError comes with status 0.

This never happened on the first app install. It reproduces more often when closing the app during the login call, and restarting.

The php server is hosted with Amazon and we'd never experienced any problems with them.

The call is http not https.

chris.campbell
Community Manager
Community Manager
November 19, 2014

Sherif.elshazli,

Can we start a new thread?  This one is 4 years old and has conflicting information.  When adding the new forum post, please feel free to reference this thread and please include a link to your bug report.

Thanks,

Chris

Known Participant
October 5, 2015

Sounds like this thread is still open. I wonder how active the community still is..

I will narrow down the Issue. AIR 3.4 Flex 3.6.

var loader:URLLoader = new URLLoader();

  loader.addEventListener(Event.COMPLETE, resultUpdatedNotificationsEvent);

  loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); // <-- This gets fired with a IOError id 2032

  loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler); // <-- then this gets status : 0

  loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);

var request:URLRequest = new URLRequest('https://

loader.load(request);

On Mac - All Ok... runs well.

On Window - I get the IOErrorEvent.IO_ERROR event. How come?

Known Participant
April 7, 2012

You may need to add an "anti cache" var like this:

requestServer = new URLRequest("http://www.example.com/yourfile.xml?nocache=" + new Date().getTime());

Hope this helps.

Inspiring
May 23, 2012

I'd been getting similar https and urlloader-related #2032 errors, but they seem fixed when I compile with AIR 3.3 from the Adobe Labs site (in conjunction with Flex 4.6).

November 8, 2012

I too get this error on FB 4.6 + AIR 3.5. Trying to get this working on iPad 5.1. Also tested on iOS 6.0 device. No luck.

My code is simple:

var loader:URLLoader = new URLLoader();

loader.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, httpResponseStatusHandler);

loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);

loader.addEventListener(IOErrorEvent.IO_ERROR, IOErrorHandler, false, 0, true);

var request:URLRequest = new URLRequest("https://somedomain/loginUser.jsp");

request.manageCookies = true;

var vars:URLVariables = new URLVariables("userName=" + usn + "&pword=" + pwd + "&LOGIN=LOGIN&operation=CPLOGIN");

request.data = vars;

loader.load(request);

This code works on iPad emulator but not on iPad itself.

Any help will be appreciated.

My Best,

Suat

EDIT: I am also getting:

IDS_CONSOLE_SANDBOX

IDS_CONSOLE_NOT_PERMITTED

Participant
December 6, 2011

Hi

Another Chris to add to the mix.

I'm getting the same error. Im trying to convert a rather large web project to an Air for Mobile project in Flash Builder 4.5.

I have Air SDK 3.0 and Flex 4.5.1 and whilst my URL request work fine running via the desk top, it encounters IOError 2032 when running on the device.

Does anyone have a fix?

All the best

ChrisP.

chris.campbell
Community Manager
Community Manager
December 7, 2011

Chris,

Is this happening on iOS or Android?

Chris

Participant
December 7, 2011

Hi Chris

I'm using a Galaxy S2 running Android 2.3.3 for device debugging.

As far as the code is concerned there isn't much to it when it finally sends the request.

public function send (params:URLVariables, method:String="GET") : void

{

    var req:URLRequest = new URLRequest(url);

    req.method = method;

    req.data = params;

    addToQueue(req);

}

then when dequeued

urlLoader.load(req);

My current theory is that it encounters an invalid SSL Certificate, though I would have thought android would spit out a warning. My system's guys are investigating that avenue. Otherwise, I'm a bit stuck.

Any advice would be appreciated.

All the best

Chris.

Participating Frequently
November 3, 2011

Help! 

I have a traditional URLLoader/URLRequest setup that loads an external XML file.

It works flawlessly in the AIR Launcher ... but when I try on my device it fails... giving me this message over the remote debug session:

"...text=Error #2032: Stream Error. URL: app:/assets/xml/projects.xml"

I've even tried changing my code to use the File.applicationDirectory approach. But once again,... it only works in the AIR Launcher... not on the device!

What am I missing? Anyone have a clue?  Thanks in advance for anyone who can help or hint!

chris.campbell
Community Manager
Community Manager
December 1, 2011

Hi Chris,

If you're still having an issue with this, could you post your code so I can take a look and try it out?

Thanks,

Chris

Participant
May 30, 2011

Um....The point of My Question is 'Not working URLLoader in Local Network'...

For Example, When url is http://ertr2.mireene.com, URLLoader is good working in AIR 2.5,

but when url is http://192.168.0.10 , URLLoader is not working in this platform...

important point, this problem is appeared in IOS and Android development.

Finally I had solved this problem, not used local network(http://192.168......)  and using external network(exist server).

URLLoader is not working in localhost or internal network!!

May 27, 2011

I had a similar issue for iOS and determined that our web server certificate wasn't valid.  After updating the certificate, the 2032 no longer happens.

Participant
May 24, 2011

Hi,

We're experiencing the same when using URLLoader in a mobile project on Android... We used the latest Flex 4.5 SDK to build our application and the issue is only showing when we deploy/test the application to the test-device(s) (Android 2.2 and 3.1) When we debug using the simulator everything is running fine, also using the same code in a desktop application runs fine...

Someone experiencing the same with the latest Flex 4.5 release?

Thanks and kind regards,

Kris

May 25, 2011

Yes I am also facing the same problem.

May 25, 2011

this issue is fixed in air 2.6

Participating Frequently
March 1, 2011

SDK 2.6 has not been released only the runtime environment "Adobe is on target to deliver the AIR 2.6 SDK and desktop runtime before the 2nd half of 2011"

http://blogs.adobe.com/air/2011/02/adobe-air-2-6-for-android-is-now-available.html

Participant
March 8, 2011

hello..

Today testing after install air2.6 sdk,

But.....

Not working URLoader

My develop App is CameraUI pick Photo and send Photo Desktop..

exmaple)

bdata = new BitmapData(photoZone.width, photoZone.height);
bdata.draw(photoZone);
//roll.addBitmapData(bdata);
var objRequest:URLRequest = new URLRequest("http://192.168.123.106/save.php");
var objJPEGEnc:JPEGEncoder = new JPEGEncoder(80);
var objByteData:ByteArray = objJPEGEnc.encode(bdata);
objRequest.data = objByteData;
objRequest.method = URLRequestMethod.POST;
objRequest.contentType = 'application/octet-stream';
try {
  this.objLoader.load(objRequest);
} catch (error:ArgumentError) {
  trace("An ArgumentError has occurred.");
} catch (error:SecurityError) {
  trace("A SecurityError has occurred.");
}

not air is good send photo..

air not working still......

chris.campbell
Community Manager
Community Manager
March 9, 2011

Hi, was this done using a prerelease version of the AIR 2.6 SDK?  If so, could you give me the version number?

Thanks,

Chris

February 28, 2011

Thanks for all your comments.

I guess this problem is solved in AIR2.6.

Just update your AIR SDK Version to 2.6 if you are in trouble this problem.

Thanks.

Participating Frequently
February 28, 2011

Hi,

new AIR 2.6 solve this error!!

Thanks

February 28, 2011

Since Adobe AIR 2.6 SDK at the moment is only released for Android, does anyone know when to expect the released 2.6 SDK for desktop environments?  Our need is not limited to mobile as this affected Windows as well.

chris.campbell
Community Manager
Community Manager
March 1, 2011

The desktop releases are planned to follow in a few weeks (mid to late March.)

Chris