Skip navigation
Currently Being Moderated

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

Dec 16, 2010 4:41 PM

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.

 
Replies 1 2 Previous Next
  • Currently Being Moderated
    Dec 23, 2010 6:49 PM   in reply to ShinyaArao

    yes, i got a same issue...

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 31, 2010 8:57 PM   in reply to ShinyaArao

    I'm also getting this exact same issue, which is breaking a bunch of code. Only happens in 2.5

     
    |
    Mark as:
  • Chris Campbell
    9,455 posts
    May 4, 2010
    Currently Being Moderated
    Jan 7, 2011 1:35 PM   in reply to SpecialK

    Hi guys,

    Sorry for the delay.  I'll take a look into this and let you know what I find.

     

    Chris

     
    |
    Mark as:
  • Chris Campbell
    9,455 posts
    May 4, 2010
    Currently Being Moderated
    Jan 7, 2011 3:11 PM   in reply to Chris Campbell

    Hi guys,

    I've been unable to reproduce this problem on either Mac 10.6.6 or Windows 7 x64.  I'm using Flex 4.1 and AIR 2.5.  Would anyone be willing to share their project that illustrates the problem?  I'm attaching my sample project to this post if you'd like to modify it appropriately instead.

     

    Thanks,

    Chris

    Attachments:
     
    |
    Mark as:
  • Currently Being Moderated
    Jan 7, 2011 9:19 PM   in reply to ShinyaArao

    i got this problem in XP and Windows 7, and i requested was a JSON API.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 10, 2011 12:20 PM   in reply to Chris Campbell

    Chris,

     

    I believe I may have narrowed it down.  I started an AIR app from the ground up to try to recreate the problem I was having where any HTTP or HTTPS calls simply were not going out (not even attempted) from an installed AIR application in Windows (XP and 7).

     

    Seeming main culprit:  Flex Framework RSLs.

     

    I am using Flex 4.0.0.14159 with AIR 2.5.

     

    Link to my test project:  http://rokkit.net/urlLoaderTest.zip

     

    In my test project (modified from yours) I attempted to recreate the method in which we make our HTTP call.  Basically a main app upon button click sends a LocalConnection message.  Subcomponent gets message and processes.  Subcomponent then uses ModuleManager to load the module.  Module, upon button click will attempt to make an HTTP call.

     

    I'm not sure if it matters that I am using LocalConnection or ModuleManager, but this is the first scenario I was able to recreate the problem with.  Also I removed using URLLoader() and instead am just using HTTPService.  Also keep in mind the use of LocalConnection is simply recreating the scenario we were seeing.  The structure we use for our components/layers is considerably more complex and needs LocalConnection, whereas this test technically does not

     

    I then set the project to use RSLs for all of the following:

    framework.swc

    spark.swc

    textLayout.swc

    rpc.swc

    osmf.swc

     

    When you run from the IDE (using adl) it works.  When you install the application on windows (again, XP or 7), the HTTP call will not go out at all.

     

    Hope this helps!

     

    Thanks,

     

    Justin Nichols

     
    |
    Mark as:
  • Chris Campbell
    9,455 posts
    May 4, 2010
    Currently Being Moderated
    Jan 11, 2011 3:57 PM   in reply to jnichols21

    Thanks Justin.  I'll investigate and get back to you shortly.

     

    Chris

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 12, 2011 12:39 PM   in reply to Chris Campbell

    Thanks Chris, I'm eager to see if you can at least recreate it.  Much appreciated!

     

    Justin

     
    |
    Mark as:
  • Chris Campbell
    9,455 posts
    May 4, 2010
    Currently Being Moderated
    Jan 12, 2011 7:40 PM   in reply to jnichols21

    Hi Justin,

    I was able to repro using your sample project.  If I knocked the app descriptor back to 2.0 the app started working again.  We have a change that went in to our internal build this morning that might be related, I'll retest tomorrow and either add to the current bug or create a new one based on your sample code.  Thanks again for providing the sample project and description!

     

    Chris

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 12, 2011 11:00 PM   in reply to Chris Campbell

    That's great news!  Thanks a ton for your hard work.  I'll let my colleagues know and this will at least help us to know that for now if we want RSLs for the framework files, we'll just need to drop back to 2.0 for the time being while awaiting a fix build.  If you happen to get a bug number on this, would you mind posting the link here for us to be able to track?  Much appreciated!

     

    Thanks again for everything,

     

    Justin Nichols

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 13, 2011 12:56 PM   in reply to jnichols21

    Is there any update on this issue? I am also seeing it with version 2.5.

     

    Regards,
    Rajesh

     
    |
    Mark as:
  • Chris Campbell
    9,455 posts
    May 4, 2010
    Currently Being Moderated
    Jan 13, 2011 1:08 PM   in reply to rajeshchawla1

    Hi guys,

    I tried this out with our daily internal build and unfortunately it still occurs.  I just entered this as a new bug (internal number is #2788600) and I'll update this post as soon as I learn more.

     

    Thanks,

    Chris

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 13, 2011 3:22 PM   in reply to Chris Campbell

    Thanks for the quick followup. Is there any known workaround other than using air 2.0?

     

    Regards,

    Rajesh

     
    |
    Mark as:
  • Chris Campbell
    9,455 posts
    May 4, 2010
    Currently Being Moderated
    Jan 13, 2011 6:06 PM   in reply to rajeshchawla1

    Not that I'm aware of, but I'll update as our investigation continues.

     

    Chris

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 13, 2011 8:34 PM   in reply to Chris Campbell

    Ok, thanks for taking the time for the update.

     

    Regards,

    Rajesh

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 14, 2011 5:25 AM   in reply to rajeshchawla1

    I was actually having a similar issue with the MobileIconItemRenderer when loading thumbnails. They would get URL not found IO Errors when trying to read the thumbnail over http. On any subsequent viewing, during that session, the icons would load however.

     

    So my work around for that was to have a dummy http call go out when the application started. This dummy call actually gets the same Stream Error you had talked about. However any other HTTP calls load perfectly fine afterwards. This is also in Air 2.5 as I am developing a mobile application.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 19, 2011 9:24 AM   in reply to ShinyaArao

    Any news about this thread?

     
    |
    Mark as:
  • Chris Campbell
    9,455 posts
    May 4, 2010
    Currently Being Moderated
    Jan 20, 2011 3:55 PM   in reply to NekedX

    A potential fix was recently checked in and we're in the process of testing.  Assuming the fix addresses the issue, this will show-up in our next release.  The expect release date for this is within the next several weeks (mid to late March).

     

    Thanks,

    Chris

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 20, 2011 5:28 PM   in reply to Chris Campbell

    Thanks for the update and potential timeline.

     

    Regards,

    Rajesh

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 21, 2011 2:38 AM   in reply to ShinyaArao

    Please, could you provide a workaround to

    send and load variables to a remote server using 2.5?

     

    Regards

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 21, 2011 3:22 AM   in reply to ShinyaArao

    But I am using Flash CS5 ,not even have linked Flex SDK libs

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 22, 2011 9:35 PM   in reply to ShinyaArao

    I think that is a cache issue. When the URLLoader or HTTPService are using the browser cache you will get this error.

     

    You can  clear the browser cache to test and  configure any no-cache policy in your  middleware (php,asp,java, etc),

     

    regards,

     

     

    Jhon Carrillo

    @jhoncarrillo

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 23, 2011 2:58 AM   in reply to Jhon Carrillo

    the thread is about AIR sdk, so it's about AIR version not browser

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 10, 2011 9:26 AM   in reply to ShinyaArao

    WORKAROUND:

     

    Disable the network monitor before deploying to the device.

     

    Choose Window > Show View > Other > Flash Builder > Network Montitor, then click the Disable Monitor button.

     

    EXPLANATION:

     

    I had this problem when I tried to access a webservice:

     

    "faultCode:Server.Error.Request faultString:'HTTP request error' faultDetail:'Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL"

     

    Investigating the FaultEvent > [inherited] > Message revealed the following error:

     

    Error #2032: Stream Error. URL: http://localhost:37813/<service url>?WSDL?hostport=<server name>&https=N&id=<id>

     

    That is not the direct URL to my webservice. It seems to be modified by the network monitor to be able to catch the network I/O of the device during debugging. As far as I can see there are two problems: 1) it doesn't work when you debug on the device and 2) it is not removed when you deploy.

     

    STEPS TO REPRODUCE:

     

    1. create an AIR for Android app
    2. add a webservice
    3. call the webservice
    4. enable network monitor
    5. debug on or deploy to device

     

     

    Cheers,                  - Jon -

     

    http://www.webbsites.nl

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 28, 2011 12:10 AM   in reply to ShinyaArao

    Hi,

     

    new AIR 2.6 solve this error!!

     

    Thanks

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 28, 2011 9:14 AM   in reply to canaca

    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.

     
    |
    Mark as:
  • Chris Campbell
    9,455 posts
    May 4, 2010
    Currently Being Moderated
    Feb 28, 2011 5:06 PM   in reply to jnichols21

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

     

    Chris

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 1, 2011 4:44 AM   in reply to ShinyaArao

    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-av ailable.html

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 8, 2011 12:29 PM   in reply to canaca

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

     
    |
    Mark as:
  • Chris Campbell
    9,455 posts
    May 4, 2010
    Currently Being Moderated
    Mar 9, 2011 1:31 PM   in reply to ertr2

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 10, 2011 3:01 AM   in reply to Chris Campbell

    I got the same issue while connecting to HTTP calls from a native installation of AIR app. It is working fine when i run application which installed form AIR file but fails when i install it as EXE.

    Disabling Network Monitor really helped me. Not sure if this is something which was causing problem, but now i am able to run application from navtive installation also.

    Note: I am using Flex SDK 4.1 + AIR SDK 2.5

     
    |
    Mark as:
  • Currently Being Moderated
    May 24, 2011 12:58 AM   in reply to ShinyaArao

    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

     
    |
    Mark as:
  • Currently Being Moderated
    May 25, 2011 8:25 AM   in reply to penguan

    Yes I am also facing the same problem.

     
    |
    Mark as:
  • Currently Being Moderated
    May 25, 2011 8:35 AM   in reply to sankalp23

    this issue is fixed in air 2.6

     
    |
    Mark as:
  • Currently Being Moderated
    May 25, 2011 8:41 AM   in reply to NekedX

    Dear,

    The issue is still occurring when used in a mobile application compiled using the latest official Flash Builder 4.5 and Flex 4.5 SDK (I assume Flex SDK 4.5 comes with Air 2.6). I can confirm the issue is fixed when running the application on the desktop, but when it is deployed to a mobile device the issue occurs again.

     

    Kr,

    Kris

     
    |
    Mark as:
  • Currently Being Moderated
    May 25, 2011 8:42 AM   in reply to NekedX

    yep, it was fixed but after last update 2.6.0.1915 it is back I think. I must debug again but it is not working now

     
    |
    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