Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Chris,
Is this happening on iOS or Android?
Chris
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Hi Chris,
Np, and thanks for the update. Glad you got it working.
Chris
Copy link to clipboard
Copied
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>
Copy link to clipboard
Copied
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-context-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
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-context-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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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).
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
1. I downloaded the file with https with success. No problems at all.
2. I tried this. Result is the same. ioError.
Thanks again.
Copy link to clipboard
Copied
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-ipad-from-air-app
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
Hi Yozef0,
Can you try this out with AIR 19? If it still happens, please open a bug report at https://bugbase.adobe.com and attach a sample project. Once added, please let me know the bug number and I'll have someone take a look.
Thanks,
Chris