8 Replies Latest reply on Jun 10, 2008 12:58 AM by eiprol2

    URLloader closes connection! AIR

      I'm working at an AIR application which uses YouTube Api.
      When i try to send a +1Mb POST form request with URLloader, it closes connection at ~30secs telling me an IOerrorEvent #2032.

      When I use a Sniffer (as "Charles") to check what happens, the sniffer tells me that "client closed connection before receiving an answer"; However, the data request is still being sent.

      Which is the problem? URLloader Time limit? Size limit?

        • 1. Re: URLloader closes connection! AIR
          Are you on Windows with IE7 installed?

          We ran into similar issue in our app too. AIR seems to be using ReceiveTimeout that IE7 uses. In IE7, this timeout limit is 30 secs but it was 60 minutes in IE5/IE6. You can increase this limit by setting a registry entry mentioned in the following link.


          Although Microsoft does not encourage this approach, you can change the default time-out setting for Internet Explorer. To do this in Internet Explorer 4.01 Service Pack 1 or later, follow these steps:
          1. Add a ReceiveTimeout DWORD value with a data value of (<number of seconds>)*1000 in the following registry key:
          HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
          For example, if you want the timeout duration to be 8 minutes, set the ReceiveTimeout data value to 480000 (<480>*1000).
          2. Restart your computer.

          • 2. Re: URLloader closes connection! AIR
            eiprol Level 1
            Yes, I have IE7 Installed. I'm going to check it.

            If it works... Fine, but... Is it the only way to solve the problem? because I want to give my app to many people, and they may not know how to change the Reg...

            • 3. Re: URLloader closes connection! AIR
              eiprol Level 1
              yeaaaaaaaaaaaaaaaaaaaaaah! It works!!! Thank you very much!! :) :) :)

              And now... Do you know any parameter to set in Flex ReceiveTimeout? Or any trick to add a regustry key from the AIR app...

              • 4. Re: URLloader closes connection! AIR
                Level 1
                I don't know any option to change the timeout from flex as we found out whatever high timeout we specify AIR still uses the one that IE7 uses (in our case it was for web service call). Since we have a native component for our product we were able to do the registry change using the msi installer. In your case providing a .reg file with something like the following might be an option

                Windows Registry Editor Version 5.00

                [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings]

                Or create a .bat file that calls .reg file and then calls .air.

                If you are using badge install you are out of luck. May be create a .reg file in app storage folder on first run and instruct the user to run it manually by providing the link to the .reg file. Not ideal, but just a work-around.
                • 5. Re: URLloader closes connection! AIR
                  eiprol Level 1
                  Isn't possible to execute a BAT file which loads the reg file by fscommand?
                  • 6. Re: URLloader closes connection! AIR
                    I have a related question on this topic. I am creating an rss reader that uses AS3 URLLoader to load xml from feedburner. My client says that some of the locations they deploy to block port 80 and they have to use proxies for apps like IE to get to the web. What port does URLLoader default to and can I change the port in the url, or is there a specific method for using proxies with AIR apps? Any links to the relevant info would be appreciated!
                    • 7. Re: URLloader closes connection! AIR
                      Oliver Goldman Adobe Employee
                      The 30-second timeout issue has been fixed in the next release. (No, I can't tell you when that is.)

                      AIR uses the system proxy settings. On Windows, those are the same settings used by IE.

                      Oliver Goldman | Adobe AIR Engineering

                      • 8. Re: URLloader closes connection! AIR
                        that's fine...i will wait

                        but which will be the default timeout?-1?