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
Good day Chris, I've updated Flash Builder and installed AIR 19.0 SDK.
The issue still persists. I have attached an .fxp project which describes the issue with Bug #: 4069486
The API calls work on Macintosh, however not on Windows machines.
Copy link to clipboard
Copied
Also doesn't work on iPad 2,1 ios 9.0.2 with Air SDK 19.0.0.190
_request = new URLRequest( url );
_request.method = URLRequestMethod.GET;
variables.receipt = InAppBilling.service.applicationReceipt.getAppReceipt();
_request.data = variables;
_loader.addEventListener( HTTPStatusEvent.HTTP_STATUS , httpStatusHandler );
_loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
_loader.addEventListener( IOErrorEvent.IO_ERROR , onLoader_IOError );
_loader.dataFormat = URLLoaderDataFormat.TEXT;
_loader.load( _request );
Copy link to clipboard
Copied
Problem is with apps compiled for iOS 9 requesting comms via unsecure links.
Fix
<!-- | |
Fixing IOError #2032 caused by ATS in iOS9 for Adobe AIR applications. | |
More: http://htmlspank.tumblr.com/post/130674234457/ioerror-2032-ios9-adobe-air-and-ats | |
//--> | |
<InfoAdditions> | |
<![CDATA[ | |
<key>NSAppTransportSecurity</key> | |
<dict> | |
<key>NSExceptionDomains</key> | |
<dict> | |
<key>yourapiurl.com</key> | |
<dict> | |
<key>NSIncludesSubdomains</key> | |
<true/> | |
<key>NSExceptionAllowsInsecureHTTPLoads</key> | |
<true/> | |
</dict> | |
</dict> | |
</dict> | |
]]> | |
</InfoAdditions> |
More here
Copy link to clipboard
Copied
ivanp2689695 , thank you. I have set NSExceptionRequiresForwardSecrecy=false
<InfoAdditions> | |
<![CDATA[ | |
<key>NSAppTransportSecurity</key> | |
<dict> | |
<key>NSExceptionDomains</key> | |
<dict> | |
<key>yourapiurl.com</key> | |
<dict> | |
<key>NSIncludesSubdomains</key> | |
<true/> <key>NSExceptionRequiresForwardSecrecy</key> <false/> | |
<key>NSExceptionAllowsInsecureHTTPLoads</key> | |
<true/> | |
</dict> | |
</dict> | |
</dict> | |
]]> | |
</InfoAdditions> |
Copy link to clipboard
Copied
Please let me know as soon as possible for this because i am way behind with my timeline.
Regards,
Sam
Copy link to clipboard
Copied
I've answered this question. Works perfectly with my app accessing remote Drupal website.
Copy link to clipboard
Copied
Hello Chris,
I know this thread is old, but I found this to be the most direct way to get the matter to your attention. I have already opened a bug: Bug#4140595 - URLLoader IOError #2032, iOS9, Adobe Animate, AIR SDK added via "Manage SDKs". I would really appreciate if you can have a look at this.
Thank you very much.
Copy link to clipboard
Copied
You can't make http calls in Ios 9, it has to be https. Since this is true for Ios development it should be true too for AIR. There are ways to turn this default behavior off.