Skip to main content
November 18, 2010
Question

Air connections to server problems

  • November 18, 2010
  • 3 replies
  • 3170 views

We have developed an Air application to deliver course material to clients. However, some clients are experiencing connectivity issues to our server, which we have managed to duplicate.

Some background. The App makes jQuery $.ajax POST requests to the server to log the user in using their username and password. The server responds with a json encoded response. This works perfectly except for particular scenarios, where the ajax attempt just times out trying to reach the server.

We managed to duplicate this issue by doing the following:

1. Boot computer.

2. Before internet connection has established itself, launch the Air app.

3. Attempt to log in

You can re-load the app, log off Windows & back in, stand on your head... the app will continuously report a connection failure ("Unable to connect..." < our timeout message after 15 seconds). The only remedy is a full reboot of Windows and to wait for something like Skype to connect, thereby ensuring a server connection is possible.

We suspect the issue is related to some level of caching that Air does, or something that Air creates on boot, related to an internet connection.

Any help or suggestions would be greatly appreciated.

Greg.

This topic has been closed for replies.

3 replies

June 8, 2011

Hi,

We are still continously receiving this error with our connections to the server. Having followed the last post suggestion of the Service Monitor, we implemented a solution that checks if the service is available before it attempts to call the server. However, this has not resolved our issue.

We did experience our application getting connection issues in the first few seconds of launching the application. By applying a delay to our calls to the server, we got around this. Yet this further has not solve the problem.

It appears to be more prominent on Windows XP pc's, and they have mixed versions of air, including the latest version.

With the one XP machine it just won't connect at all now. Firewall is disabled and no updates were made at the time.

Is there any other solution to resolving this?

June 12, 2011

The only way to solve this problem was to not use the jQuery ajax caller, and use the native URLRequest and URLLoader objects. I followed this tutorial: http://blogs.sitepoint.com/learn-adobe-air-part-3/.

Adobe Employee
November 19, 2010

Hi Greg,

Is your application doing anything different than a XHR with POST? While the AIR app keeps giving "Unable to connect ..." is your internet connection working?

The AIR application shouldn't cache anything related to the internet connection and even if it would do that a restart of the app should fix that. Can you send us your app or a small sample app that can reproduce your problem?

Regards,

Catalin

November 23, 2010

Hi Catalin,

Thank you for your response.

Currently we aren't doing anything different than a normal XHR with POST. We simple use the jQuery $.ajax method which works except for the situations we are experiencing.

I will investigate further and get back to you.

Greg

chris.campbell
Legend
November 18, 2010

Hi Greg,

Are you seeing this occur on more than one machine?  Different versions of Windows or Mac?  Does this reproduce when the code is run in a browser?  Also, do you think this might be related to a particular version of jquery or does this appear like a general network issue to you?  Finally, if you let your network connect, then disabled the internet connection, launched your app, then enabled the network would that also cause the problem to occur?

I haven't seen this before, but I'll ask our Webkit experts to take a look and weigh in.  They might have additional questions for you.  Is there any chance you could send us a sample app that would display the problem?  Please feel free to contact me at ccampbel@adobe.com.

Thanks,

Chris

November 23, 2010

Hi Chris,

Thank you for your response. I will investigate the issue further and see if we cannot get you a sample app as well.

Greg