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
yes, i got a same issue...
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
I'm also getting this exact same issue, which is breaking a bunch of code. Only happens in 2.5
Copy link to clipboard
Copied
Hi guys,
Sorry for the delay. I'll take a look into this and let you know what I find.
Chris
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Thanks Justin. I'll investigate and get back to you shortly.
Chris
Copy link to clipboard
Copied
Thanks Chris, I'm eager to see if you can at least recreate it. Much appreciated!
Justin
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Is there any update on this issue? I am also seeing it with version 2.5.
Regards,
Rajesh
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Thanks for the quick followup. Is there any known workaround other than using air 2.0?
Regards,
Rajesh
Copy link to clipboard
Copied
Not that I'm aware of, but I'll update as our investigation continues.
Chris
Copy link to clipboard
Copied
Ok, thanks for taking the time for the update.
Regards,
Rajesh
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
i got this problem in XP and Windows 7, and i requested was a JSON API.
Copy link to clipboard
Copied
Any news about this thread?
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Thanks for the update and potential timeline.
Regards,
Rajesh
Copy link to clipboard
Copied
Please, could you provide a workaround to
send and load variables to a remote server using 2.5?
Regards
Copy link to clipboard
Copied
I guess you must change Flex SDK version from 4.x to 3.x
I can send URL Variables in Flex SDK 3.5 and Air SDK 2.5.
Copy link to clipboard
Copied
But I am using Flash CS5 ,not even have linked Flex SDK libs
Copy link to clipboard
Copied
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