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.
After all, I stopped to use Flex SDK version4.1 + AIR SDK version 2.5.
I found that in stuation of Flex SDK 3.5 + AIR SDK2.5, It's not appeared.
And in Flex4.5 + AIR2.5, it's also OK though not released yet now.
It may be better update SDK(and Enomouse Code I wrote for 3.5) to 4.5.not to 4.1.
Thanks.
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
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
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
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
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.
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:
Cheers, - Jon -
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
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......
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
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
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
North America
Europe, Middle East and Africa
Asia Pacific