Copy link to clipboard
Copied
Hi everyone.
First of all sorry for my english 😕
I have been working with Adobe Air a long time but lately I´m facing some issues with the latest releases of the SDK.
The problem is displaying data from xml or json objects, everything works fine with Air SDK 17 but when I test on some recent releases always displays an error, not even load the data at all.
I don´t know if it is a bug or something like that, the code works perfect but as I mentioned fails to load on the resent releases of the SDK.
If anyone have a solution for this will be highly appreciated.
OK how about testing for a Security Error:
xmlLoaderA.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
private function securityErrorHandler(event:Event):void {
trace("************ XML SECURITY ERROR *************");
trace("SECURITY error occured with " + event.target);
}
Also, have you added the now required NSTransportSecurity XML to your iOS app descriptor as described here:
actionscript 3 - Flash CS6 - AS3 - Check internet connection not working at all - Stack Overflow
...Copy link to clipboard
Copied
Can you show the code that is failing?
I am loading XML in AIR 25 SDK and it works fine.
Copy link to clipboard
Copied
Is it working on the device? because on emulator runs normal and everything works.
The code I´m using.
LoadPlaylist("Some URL");
private function LoadPlaylist(Uri:String):void{
xmlLoaderA = new URLLoader();
xmlLoaderA.addEventListener(Event.COMPLETE, onCompleteA);
xmlLoaderA.addEventListener(IOErrorEvent.IO_ERROR, onError);
xmlLoaderA.load(new URLRequest(Uri));
}
private function onCompleteA(e:Event):void {
//Do Something
}
I have tested with SDK 21,22,23,24,25 currently working with SDK 17 for iOS. on Android is working.
Copy link to clipboard
Copied
Do you get anything if you put a trace statement inside the onError handler (not shown in your code)?
private function ioErrorHandler(event:Event):void {
trace("************ XMLERROR *************");
trace("errorHandler: " + event);
}
Copy link to clipboard
Copied
Yes, sorry I forgot that.
This is the error: Error #2032: Stream Error. URL: "Same URL"
But the url is fine and working.
Copy link to clipboard
Copied
Why not try listening for flash.events.HTTPStatusEvent.HTTP_RESPONSE_STATUS?
flash - Error #2032: Stream Error - Stack Overflow
xmlLoaderA.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
private function httpStatusHandler(event:HTTPStatusEvent):void {
trace("httpStatusHandler: " + event);
trace("status: " + event.status);
}
Copy link to clipboard
Copied
On SDK 25 got this
httpStatusHandler: [HTTPStatusEvent type="httpStatus" bubbles=false cancelable=false eventPhase=2 status=0 redirected=false responseURL=null]
status: 0
on SDK 17
httpStatusHandler: [HTTPStatusEvent type="httpStatus" bubbles=false cancelable=false eventPhase=2 status=200 redirected=false responseURL=null]
status: 200
not sure what to do.
Copy link to clipboard
Copied
Are you using a secure connection for the URL, https not http?
Copy link to clipboard
Copied
No, I'm using only http. But is the same with https thats why I guess is a bug from the latest releases.
Going ahead testing with a simple php chat is the same connection error.
Copy link to clipboard
Copied
OK how about testing for a Security Error:
xmlLoaderA.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
private function securityErrorHandler(event:Event):void {
trace("************ XML SECURITY ERROR *************");
trace("SECURITY error occured with " + event.target);
}
Also, have you added the now required NSTransportSecurity XML to your iOS app descriptor as described here:
actionscript 3 - Flash CS6 - AS3 - Check internet connection not working at all - Stack Overflow
(Search the page for the text "Also, have you added the now required NSTransportSecurity XML to your iOS app descriptor")
Copy link to clipboard
Copied
Genius!!! Thanks a lot I did not know about the NSTransportSecurity requirement now is working!!!
Copy link to clipboard
Copied
Glad to hear it's working for you.
That's why I asked about the http/https connection. If you do not edit your application descriptor xml file to include the NSTransportSecurity bit, you need to connect over https and the server must have a valid certificate.