Skip navigation

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

Dec 16, 2010 4:41 PM

  Latest reply: 72Pantera, Dec 26, 2013 8:26 PM
Replies 1 2 Previous Next
  • Chris Campbell
    9,448 posts
    May 4, 2010
    Currently Being Moderated
    May 25, 2011 1:24 PM   in reply to canaca

    For those running into this error, could you please add a new bug to bugbase.adobe.com and post back with a link so that others can cast their votes?  In the bug, please include sample source code and a full description, including a link to this thread.

     

    Thanks,

    Chris

     
    |
    Mark as:
  • Currently Being Moderated
    May 26, 2011 5:44 AM   in reply to Chris Campbell

    Bug created: https://bugbase.adobe.com/index.cfm?event=bug&id=2881807

     

    Please vote on this bug if you experience the same!

     
    |
    Mark as:
  • Currently Being Moderated
    May 27, 2011 8:00 AM   in reply to ShinyaArao

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    May 30, 2011 6:26 AM   in reply to ShinyaArao

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

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 3, 2011 10:32 AM   in reply to ShinyaArao

    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!

     
    |
    Mark as:
  • Chris Campbell
    9,448 posts
    May 4, 2010
    Currently Being Moderated
    Dec 1, 2011 11:31 AM   in reply to chris_emerson

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 6, 2011 3:48 PM   in reply to ShinyaArao

    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.

     
    |
    Mark as:
  • Chris Campbell
    9,448 posts
    May 4, 2010
    Currently Being Moderated
    Dec 7, 2011 12:54 PM   in reply to chrispeck303

    Chris,

    Is this happening on iOS or Android?

     

    Chris

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 7, 2011 2:38 PM   in reply to Chris Campbell

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 7, 2011 3:23 PM   in reply to chrispeck303

    Hi Chris

     

    Don't worry about this one. My bad. There was a firewall issue blocking requests to our dev servers from the phone.

     

    Thanks for your time all the same.

     

    ChrisP.

     
    |
    Mark as:
  • Chris Campbell
    9,448 posts
    May 4, 2010
    Currently Being Moderated
    Dec 7, 2011 3:27 PM   in reply to chrispeck303

    Hi Chris,

    Np, and thanks for the update.  Glad you got it working.

     

    Chris

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 5, 2012 4:54 PM   in reply to Chris Campbell

    Chris Campbell,

     

    from my post at http://forums.adobe.com/thread/943234, here is the code that reproduces this bug with Flash Builder 4.6/Air 3.1 (essentially if you load any valid https url in to UrlLoader in Flash Builder it works, however in the Android Emulator (I don't have a physical device) it gives an IOError 2032) - I see a certificate error in adb logcat but not sure if it is the cause:

     

    <?xml version="1.0" encoding="utf-8"?>

    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"

                        xmlns:s="library://ns.adobe.com/flex/spark"

                        xmlns:mx="library://ns.adobe.com/flex/mx"

                        xmlns:ns1="*"

                        xmlns:local="*"

                        creationComplete="windowedapplication1_creationCompleteHandler(event) "

                        actionBarVisible="true" tabBarVisible="true">

              <fx:Script>

                        <![CDATA[

                                  import mx.events.FlexEvent;

     

                                  protected var requestTokenUrl:String = "https://www.google.com";

     

                                  protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void

                                  {

     

                                            var loader:URLLoader = new URLLoader();

     

                                            loader.addEventListener(ErrorEvent.ERROR, onError);

                                            loader.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onAsyncError);

                                            loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);

                                            loader.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, httpResponseStatusHandler);

                                            loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);

     

                                            var urlRequest:URLRequest = new URLRequest(requestTokenUrl);

     

     

                                            loader.load(urlRequest);

                                  }

     

                                  protected function requestTokenHandler(event:Event):void

                                  {

                                  }

     

                                  protected function httpResponse(event:HTTPStatusEvent):void

                                  {

                                            label.text += event.status;

                                            // TODO Auto-generated method stub

                                  }

     

     

     

                                  private function completeHandler(event:Event):void {

                                            label.text += event.toString();

                                            trace("completeHandler data: " + event.currentTarget.data);

                                  }

     

                                  private function openHandler(event:Event):void {

                                            label.text +=  event.toString();

                                            trace("openHandler: " + event);

                                  }

     

                                  private function onError(event:ErrorEvent):void {

                                            label.text +=  event.toString();

                                            trace("onError: " + event.type);

                                  }

     

                                  private function onAsyncError(event:AsyncErrorEvent):void {

                                            label.text += event.toString();

                                            trace("onAsyncError: " + event);

                                  }

     

                                  private function onNetStatus(event:NetStatusEvent):void {

                                            label.text += event.toString();

                                            trace("onNetStatus: " + event);

                                  }

     

                                  private function progressHandler(event:ProgressEvent):void {

                                            label.text += event.toString();

                                            trace("progressHandler loaded:" + event.bytesLoaded + " total: " + event.bytesTotal);

                                  }

     

                                  private function securityErrorHandler(event:SecurityErrorEvent):void {

                                            label.text +=  event.toString();

                                            trace("securityErrorHandler: " + event);

                                  }

     

                                  private function httpStatusHandler(event:HTTPStatusEvent):void {

                                            label.text += event.toString();

                                            //label.text += event.responseHeaders.toString();

                                            trace("httpStatusHandler: " + event);

                                  }

                                  private function httpResponseStatusHandler(event:HTTPStatusEvent):void {

                                            label.text +=  event.toString();

                                            trace("httpStatusHandler: " + event);

                                  }

                                  private function ioErrorHandler(event:IOErrorEvent):void {

                                            label.text +=  event.toString();

                                            label.text += event.text;

                                            trace("ioErrorHandler: " + event);

                                  }

     

     

                        ]]>

              </fx:Script>

     

     

              <fx:Declarations>

                        <!-- Place non-visual elements (e.g., services, value objects) here -->

              </fx:Declarations>

              <s:Label id="label" y="185" width="100%" color="#0A0909" horizontalCenter="0" text=""/>

    </s:View>

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 9, 2012 1:02 AM   in reply to tolga_erdogus

    Hi Chris Campbell,

     

    I am using Flash Builder 4.6/AIR 3.1.0. I am using RESTful web service to get XML results and to display on my mobile application. I am getting the same below error when accessing the webservice from mobile app (Android - Galaxy Tab 7 inch).

     

    Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error # 2032"] URL: http://adfdevp.alshaya.com:7013/RESTEmployeeDetails-http://adfdevp.alshaya.com:7013/RESTEmployeeDetails-EmployeeDetails-co ntext-root/jersey/restlabEmployeeDetails-context-root/jersey/restlab

     

    The same code is working in Flash Builder 4.6 Android emulator. I have checked Network Monitor to "Disabled" before deploying to mobile. What am i doing wrong here? I am pasting my code below-

     

     

    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView" xmlns:dao="dao.*"
      xmlns:mx="library://ns.adobe.com/flex/mx">

    <fx:Script>
      <![CDATA[
       import mx.collections.ArrayCollection;
       import mx.collections.IList;
       import mx.collections.XMLListCollection;
       import mx.events.FlexEvent;
       import mx.rpc.events.FaultEvent;
       import mx.rpc.events.ResultEvent;
       import mx.rpc.xml.SimpleXMLDecoder;
       import mx.utils.ArrayUtil;
      
       import valueObjects.EmployeeDetail;
       [Bindable]
       private var myXml:XML;
      
       [Bindable]
       public var resultCollection:IList;
       public function handleXml(event:ResultEvent):void
       {
        var xmlListCollection:XMLListCollection = new XMLListCollection(event.result.children());
        var xmlListCollectionValues:XMLListCollection = new XMLListCollection(event.result.emp.children());
        var resultArray:Array = xmlListCollection.toArray();
        var resultArrayValues:Array = xmlListCollectionValues.toArray();
       
       
        var objEmployeeDetails:EmployeeDetail;
        var resultCollection:ArrayCollection = new ArrayCollection();
       
        var j:int = 0;
        for(var i:int=0;i<resultArray.length;i++){
        
         objEmployeeDetails = new EmployeeDetail();
         objEmployeeDetails.brand = resultArrayValues[j];
         objEmployeeDetails.division = resultArrayValues[j+1];
         objEmployeeDetails.email = resultArrayValues[j+2];
         objEmployeeDetails.employee_name = resultArrayValues[j+3];
         objEmployeeDetails.employee_number = resultArrayValues[j+4];
         objEmployeeDetails.grade = resultArrayValues[j+5];
         objEmployeeDetails.mobile = resultArrayValues[j+6];
         objEmployeeDetails.position = resultArrayValues[j+7];
        
         j = j + 8;
         resultCollection.addItem(objEmployeeDetails);
        
        }
        list.dataProvider = resultCollection;
        //return resultCollection;
       }
      
       public function handleFault(event:FaultEvent):void
       {
        //Alert.show(event.fault.faultDetail, "Error");             
       }
      
       protected function sesrchEmployee():void
       {
        xmlRpc.send();
       }

      
      ]]>
    </fx:Script>


    <fx:Declarations>
      <dao:EmployeeDAO id="srv"/>
     
      <mx:HTTPService id="xmlRpc"
          url="http://adfdevp.alshaya.com:7013/RESTEmployeeDetails-EmployeeDetails-co ntext-root/jersey/restlab"
          result="handleXml(event)"
          fault="handleFault(event)"
          resultFormat="e4x" showBusyCursor="true">
       <mx:request xmlns="">
        <data>{key.text}</data>
        <data>{key1.text}</data>
       </mx:request>
      </mx:HTTPService>
     
     
    </fx:Declarations>

    <s:navigationContent/>

    <s:titleContent>
      <s:VGroup width="100%">
      <s:HGroup width="100%">
       <s:Label top="40" paddingTop="10" paddingRight="13" height="29" text="Employee Name:"/>
       <s:TextInput id="key" width="559"/>
      </s:HGroup>
      <s:HGroup width="100%">
       <s:Label height="30" paddingTop="10" text="Employee Number:"/>
       <s:TextInput id="key1" width="100%"/>
      </s:HGroup>
     
      </s:VGroup>
    </s:titleContent>

    <s:actionContent>
      <s:Button icon="@Embed('assets/search.png')" click="sesrchEmployee()"/> 
    </s:actionContent>

    <s:List id="list" top="0" bottom="0" left="0" right="0" 
       change="navigator.pushView(EmployeeDetails, list.selectedItem)">
      <s:itemRenderer>
       <fx:Component>
        <s:IconItemRenderer label="{data.employee_name}"
             messageField="position">
        </s:IconItemRenderer>
       </fx:Component>
      </s:itemRenderer>
    </s:List>

    </s:View>

     

    Appreciate your quick response in this regard.

     

    Thanks,

     

    Murtaza Ghodawala

    Mobile: +965 97180549

    murtaza.ghodawala@alshaya.com

     
    |
    Mark as:
  • Chris Campbell
    9,448 posts
    May 4, 2010
    Currently Being Moderated
    Jan 9, 2012 5:25 PM   in reply to Murtaza_Ghodawala

    Hi Murtaza and tolga,

    Could you both create new bugs (and please include the sample code you've added here) over at bugbase.adobe.com?  Please post back with the bug URL's once they've been created.  I encourage anyone else running into these problems to please visit the bug and vote/comment as appropriate.

     

    Thanks,

    Chris

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 9, 2012 11:27 PM   in reply to Chris Campbell

    Hi Chris,

     

    Please find the below bug URL -

     

    https://bugbase.adobe.com/index.cfm?event=bug&id=3083203

     

    Appreciate your quick response in fixing this issue as soon as possible. Thanks.

     

    Thanks,

     

    Murtaza Ghodawala

    Mobile: +965 97180549

    murtaza_ghoda82@hotmail.com

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 10, 2012 6:52 AM   in reply to Chris Campbell

    Chris - I had already created one: https://bugbase.adobe.com/index.cfm?event=bug&id=3082218

     

    Though - i must say that this is a type of error that seems to be happening with a lot of people (on and off with some potential fixes and regressions since 2.X) and is in the URLLoader network stack.  It basically is in the critical path of any internet based Air app.

     

    Call me crazy, but I would say this bug is critical enough to just skip a democratized vote process and fix ASAP.  And in all honesty, there isn't enough Adobe activity in the forums for people to keep the faith and come back to vote for bugs.  From the outside, just by looking at the Adobe employee activity in forums, there seems to be a "pause" of Adobe Air right now.  It is sad because it is by far the coolest and most productive cross platform/device development environment. I am barely hanging on to the idea of building an Air app even though it is so poweful. I made a tremendous amount of progress in the first 3 days of starting to build my app and it has been on hold for 2 weeks after that.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 7, 2012 2:34 PM   in reply to ShinyaArao

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    May 23, 2012 3:42 PM   in reply to blogtom

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

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 8, 2012 4:39 AM   in reply to banzai76_

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 8, 2012 6:50 AM   in reply to Suat Korkmaz

    Do you have a valid security certificate for the domain of the URL you are calling? If you don't, it will fail. This is a known AIR for iOS bug.

     

    If you can use the same code to successfully download a file from that domain using http (not https), then this would likely be the explanation.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 8, 2012 9:21 AM   in reply to banzai76_

    Thank you for your reply.

     

    I added an image file to the root of the domain and downloaded it. No problems.

     

    We debug'ed the backend side. The loginUser.jsp file clearly returns 302 status with a redirection url but I receive this as an ioError. This is totally strange.

     

    AFAIK the cert I use is valid. A few developers are using it with no problems but of course this dows not mean that it is valid. I'll check it.

     

    I don't know what to do next.

    Any further help will be appreciated too.

     

    My Best,

    Suat

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 9, 2012 2:50 AM   in reply to Suat Korkmaz

    I would suggest as next steps:

     

    1. Download that image file again, this time using https. If that works then you know that there are no security problems.

    2. If possible, submit the login details directly to whatever URL you are trying to redirect to, and see if that works?

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 9, 2012 3:35 AM   in reply to banzai76_

    1. I downloaded the file with https with success. No problems at all.

    2. I tried this. Result is the same. ioError.

     

    Thanks again.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 9, 2012 4:03 AM   in reply to Suat Korkmaz

    The last post says that https calls are not allowed in Adobe Air. Tell me that it is not true.

     

    http://stackoverflow.com/questions/10249793/problems-with-https-on-ipa d-from-air-app

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 9, 2012 4:19 AM   in reply to Suat Korkmaz

    That isn't true.

     

    HTTPS is supported in AIR, including on iOS. I'm using it in development right now with exactly the same code as you. There are live apps in the itunes app store that use it, but there also a lot of posts around like this one where people are having trouble.

     

    In the test where you submitted data directly to the redirected url, can you see what the server log says it is returning? i.e. does it it receive the request and respond correctly?

     

    I'm out of ideas really. Maybe you could it on an android phone and try it from a swf hosted on the website? Just to see if the code works in those situations?

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 9, 2012 6:01 AM   in reply to banzai76_

    I didin't like it but i soved the issue another way. I created a StageWebView and moved it outside the stage. Made the https call with it and thats all. Cookie created. All other services are now accessible.

     

    Thanks for your help banzai. I'm appreciated.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 13, 2012 1:13 AM   in reply to chris_emerson

    My previous problem was similar like what you've had, and finally today the problem is solved!

     

    I simply replace File.documentsDirectory.resolvePath("blablabla").nativePath into File.documentsDirectory.resolvePath("blablabla").url

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 13, 2012 3:07 AM   in reply to Fathah Noor

    Can you please post the whole code?

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 13, 2012 4:00 AM   in reply to Suat Korkmaz

    I think our problem is somewhat different? CMIIW

    I was responding to comments from chris_emerson particularly on this section:

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

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 18, 2013 3:03 AM   in reply to Murtaza_Ghodawala

    I know it's quite a late reply but I'll just add the following for future reference.

    I was having a very similar problem but with a desktop app, one specific request I'd used for a long time stopped working and I would always get the generic 2032 error.

    This was with a standalone Air app, using 3.1. After going through tons of posts and trying to figure out what was going on I finally solved it by simply cleaning all caches from my browsers (chrome, safari and firefox). It might seem silly since it's a standalone app but it did work.

    Hope it may help someone with this problem.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 26, 2013 8:26 PM   in reply to Chris Campbell

    Vote? for a bug fix? How about just fix it?  Still present in 3.9.

     

    Air is dead. The pace of bug fixes and features has slowed to a crawl.

     
    |
    Mark as:
1 2 Previous Next
Actions

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