Skip to main content
Dec 17, 2010 12:39 AM UTC
Question

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

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 is closed to new replies. Start a new post to keep the conversation going.

82 replies

Participant
Nov 11, 2014 11:25 AM UTC

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.

Translate
chris.campbell
Legend
Nov 19, 2014 11:45 PM UTC

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

Translate
Known Participant
Oct 5, 2015 11:19 PM UTC

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?

Translate
Known Participant
Apr 7, 2012 9:34 PM UTC

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.

Translate
Inspiring
May 23, 2012 10:42 PM UTC

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

Translate
Nov 8, 2012 12:37 PM UTC

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

Translate
Participant
Dec 6, 2011 11:48 PM UTC

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.

Translate
chris.campbell
Legend
Dec 7, 2011 8:54 PM UTC

Chris,

Is this happening on iOS or Android?

Chris

Translate
Participant
Dec 7, 2011 10:38 PM UTC

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.

Translate
Participating Frequently
Nov 3, 2011 5:32 PM UTC

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!

Translate
chris.campbell
Legend
Dec 1, 2011 7:31 PM UTC

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

Translate
Participant
May 30, 2011 1:26 PM UTC

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!!

Translate
May 27, 2011 3:00 PM UTC

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.

Translate
Participant
May 24, 2011 7:58 AM UTC

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

Translate
May 25, 2011 3:25 PM UTC

Yes I am also facing the same problem.

Translate
May 25, 2011 3:35 PM UTC

this issue is fixed in air 2.6

Translate
Participating Frequently
Mar 1, 2011 12:44 PM UTC

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

Translate
Participant
Mar 8, 2011 8:29 PM UTC

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

Translate
chris.campbell
Legend
Mar 9, 2011 9:31 PM UTC

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

Translate
Feb 28, 2011 8:25 AM UTC

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.

Translate
Participating Frequently
Feb 28, 2011 8:10 AM UTC

Hi,

new AIR 2.6 solve this error!!

Thanks

Translate
Feb 28, 2011 5:14 PM UTC

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.

Translate
chris.campbell
Legend
Mar 1, 2011 1:06 AM UTC

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

Chris

Translate