Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

AIR RemoteObject timeout in Windows - Is There A Solution???

Community Beginner ,
Aug 08, 2010 Aug 08, 2010

Essentially the issue is long running RemoteObject requests timeout on Windows and setting requestTimeOut on the remoteObject or setting URLRequestDefaults.idleTimeOut to a high number are ignored and the request times out after 30 seconds.

There's been quite a number of posts on this subject and at times the issue was reportedly addressed or worked around, but I'm still seeing this issue on Flex SDK 4.1 (AIR 2.02).  The request times out no matter what I do (on Windows).

A brute force approach would be to break down what I'm trying to retrieve into smaller chunks and assemble the results on the client, but that doesn't give complete confidence that some request may exceed 30 seconds when the servers are under load.

Any advice would be appreciated.

Here are a few posts/JIRA entries that reference the issue:

https://bugs.adobe.com/jira/browse/SDK-15403

https://bugs.adobe.com/jira/browse/SDK-22016

http://blogs.adobe.com/cantrell/2009/10/introducing_urlrequest_idletimeout.html

Thanks,

Jeff

TOPICS
Performance issues
11.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 24, 2011 Sep 24, 2011

Thank you jzgoda...you are correct..it was due to 'version' part which I am using for 2.7...!!! For 2.5 and greater, we should use 'versionNumber' instead of 'version'.But still I am getting the timeout issue after 30 seconds when I am using FileReference.download() method even if I am using 'URLRequestDefaults.idleTimeout = 180000;' ..!!! So that bug has not been fixed yet by adobe ???

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 24, 2011 Sep 24, 2011

Sorry, I'm not sure about FileReference.download()...I don't personally use that class or method. I was getting the errors with RemoteObject over SecureAMFChannel, which has since been resolved.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 24, 2011 Sep 24, 2011

So can we confirm that this bug still exists for FileReference.download() method as well ? Because now I am using Flex 4.0 SDK with 2.7 AIR SDK and 2.7 namespace .... but bug still there ..!!!

To reproduce this issue,please do the following steps.

*****************************************************************

1) Create a sample AIR application with one download button which invokes following method on 'click' event.

private function downloadFile():void {

  var fileRef:FileReference=new FileReference();

                                        fileRef.addEventListener(Event.COMPLETE, complete);

                                        fileRef.addEventListener(SecurityErrorEvent.SECURITY_ERROR, secerror);

                                        //fileRef.addEventListener(IOErrorEvent.IO_ERROR, ioerror);

                                        fileRef.addEventListener(Event.OPEN, open);

                                        fileRef.addEventListener(HTTPStatusEvent.HTTP_STATUS, httperror);

                                        fileRef.addEventListener(ProgressEvent.PROGRESS, progress);

                                        var url:URLRequest=new URLRequest();

                                        URLRequestDefaults.idleTimeout = 180000;

                                        url.url="http://localhost:8080/sampleproject/downloadservlet";

                                        fileRef.download(url, 'SampleExcel.xls');

}

2) create a java servlet class and run this servlet in one project 'sampleproject' in server.This servlet will create one excel and holds the request for 70 seconds and push this file to client (our flex request).

public void doGet(HttpServletRequest req, HttpServletResponse response)

                              throws ServletException, IOException {

                       OutputStream out = null;

                    try {

                                response.setContentType("application/vnd.ms-excel");

                                response.setHeader("Content-Disposition",

                                                  "attachment; filename=sampleName.xls");

                                WritableWorkbook w = Workbook.createWorkbook(response

                                                  .getOutputStream());

                              WritableSheet s = w.createSheet("Demo", 0);

                              for (int i = 1; i < 70; i++) {

                                        Thread.currentThread().sleep(1000);

                                        System.out.println("Thread running now .. " + i);

                              }

                              s.addCell(new Label(0, 0, "Hello World"));

                              w.write();

                              w.close();

                      } catch (Exception e) {

                              throw new ServletException("Exception in Excel Sample Servlet", e);

                    } finally {

                              if (out != null)

                                        out.close();

                    }

           }

3) When we click on download button,as you can see IO Error being poped up after 30 seconds ..!!!  Please provide a workaround for this ...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 25, 2011 Sep 25, 2011

Hi,

Please provide me a solution or please confirm that this bug has not been fixed yet by Adobe for FileReference.download() method .....

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 25, 2011 Sep 25, 2011

Thanks for the sample code.  I just posted in your other thread, but can you copy / paste your post into a new bug report over at bugbase.adobe.com?

Thanks,

Chris

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 26, 2011 Sep 26, 2011

Hi Chris,

  Thanks for your reply.I have raised the bug.

https://bugbase.adobe.com/index.cfm?event=bug&id=2984377

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 29, 2013 Aug 29, 2013
LATEST

This is a temporary (permanent?) solution to this problem

applying URLRequestDefaults.idleTimeout in AIR appa, then extending this setting to a SWF loaded from server, and allowing the setting to apply when the SWF loads other data from the server:

http://stackoverflow.com/questions/605791/loadercontext-and-applicationdomain-changes-with-adobe-air...

essentially:

loading with URLLoader.dataFormat = URLLoaderDataFormat.BINARY

setting context.allowCodeImport = true

load same bytes again with loader.loadBytes(bytes, context)

for anyone whom may need this...

/javier

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines