Help - Search - Members - Calendar
Full Version: Skype4COM unable to attach (Wait Timeout)
Skype Community > English > Development, Betas and Skype Garage > Skype Public API
keodark
We have a Javascript application which uses Skype4COM to interface with a running Skype instance. One of our testers' machine is running Windows Vista, IE 7, and the latest version (as of today, April 17) of Skype.

When this machine runs our main Javascript app, the command Skype.Client.Start works (brings Skype to the foreground). The next line, Skype.Attach, fails after a few seconds, with an error message: "Wait Timeout". This same Timeout error is also thrown on the line alert(Skype.CurrentUserHandle); if I put it before the Attach.

This exact code works correctly (achieves an Attachment) on every other computer in our company.

Another twist: If the above code is run within the Skype Plugin Browser via our company's plugin, on the affected machine, it _works_.... so the error only happens when Skype4COM is loaded in an independent browser window on this machine (as opposed to the browser used by the Plugin Manager).

Has anyone else seen Wait Timeout errors on Attach(), or has any suggestions for fixing this?

Thanks,
-Nathan Keeney
wongjoh
Nathan -- Did you ever resolve this issue? I am having similar problems.

Cheers,
Johnny
TheUberOverlord
You need to wait for the API available message before doing an attach with a wait of true, you can attach using a wait of false. Or wait for the API available message with a value of true.

Because, you could start the Skype client, and if there is NO auto-logon, it could be hours or days before your attach completes. An Attach call with the value of true ("Wait for Response") will timeout in these cases.
wongjoh
QUOTE(TheUberOverlord @ Mon May 21 2007, 18:31) [snapback]397602[/snapback]

You need to wait for the API available message before doing an attach with a wait of true, you can attach using a wait of false. Or wait for the API available message with a value of true.

Because, you could start the Skype client, and if there is NO auto-logon, it could be hours or days before your attach completes. An Attach call with the value of true ("Wait for Response") will timeout in these cases.


Would it be possible to revise the Skype4Com for Internet Explorer examples (the ones on testing.onlytherightanswers) so that they work for Vista? That way, I can see what the mechanics are for resolving this issue. Thanks in advance. Johnny
TheUberOverlord
QUOTE(wongjoh @ Thu May 24 2007, 21:09) [snapback]399106[/snapback]

Would it be possible to revise the Skype4Com for Internet Explorer examples (the ones on testing.onlytherightanswers) so that they work for Vista? That way, I can see what the mechanics are for resolving this issue. Thanks in advance. Johnny


Don't they work for Vista? If not what are the errors? do you have ActiveX enabled?
wongjoh
QUOTE(TheUberOverlord @ Fri May 25 2007, 20:43) [snapback]399405[/snapback]

Don't they work for Vista? If not what are the errors? do you have ActiveX enabled?

No they don't work. I get a Wait Timeout error. ActiveX is enabled (the Skype.Client.Start directive does work but the Skype.Attach is timing out). My skype client is active and on the foreground. Does it work for you in Vista?

Cheers,
Johnny
TheUberOverlord
QUOTE(wongjoh @ Sat May 26 2007, 19:18) [snapback]399802[/snapback]

No they don't work. I get a Wait Timeout error. ActiveX is enabled (the Skype.Client.Start directive does work but the Skype.Attach is timing out). My skype client is active and on the foreground. Does it work for you in Vista?

Cheers,
Johnny


Yes, those Examples were not designed for showing Skype initialization.

Use False as an attach option for the wait, and you should get an attached status message or API available status message, this is the only proper way to make sure you will not timeout in all possible situations.
keodark
QUOTE(TheUberOverlord @ Sun May 27 2007, 12:10) [snapback]399872[/snapback]

Yes, those Examples were not designed for showing Skype initialization.

Use False as an attach option for the wait, and you should get an attached status message or API available status message, this is the only proper way to make sure you will not timeout in all possible situations.


ZOverLord - isn't false the default parameter for attach? We've been using Skype.Attach(); since our first prototype version. Everyone in our company has gotten attach to work this way - in fact, if the Skype application is not running, it still works (launches it and then attaches)... It has worked for everyone up until our first employee installed Vista on his machine. That's when we hit the Wait Timeout error... and the Skype app is definitely open & the user signed in - it's not timing out waiting for Skype to launch or anything like that.

Does Attach() with the default parameters break in Vista? Does a wait parameter of 'true' -- and a rearchitecturing to block until the attach callback before continuing -- fix this problem?

-Nathan
YourJovi
Yes, I got the same problem.
When I run in Win2000 or XP, it works.
But vista appear "Wait Timeout" error.
Any solution for the problem so far ??
If yes, please tell me, thank you.

QUOTE(keodark @ Tue Apr 17 2007, 21:12) [snapback]384453[/snapback]

We have a Javascript application which uses Skype4COM to interface with a running Skype instance. One of our testers' machine is running Windows Vista, IE 7, and the latest version (as of today, April 17) of Skype.

When this machine runs our main Javascript app, the command Skype.Client.Start works (brings Skype to the foreground). The next line, Skype.Attach, fails after a few seconds, with an error message: "Wait Timeout". This same Timeout error is also thrown on the line alert(Skype.CurrentUserHandle); if I put it before the Attach.

This exact code works correctly (achieves an Attachment) on every other computer in our company.

Another twist: If the above code is run within the Skype Plugin Browser via our company's plugin, on the affected machine, it _works_.... so the error only happens when Skype4COM is loaded in an independent browser window on this machine (as opposed to the browser used by the Plugin Manager).

Has anyone else seen Wait Timeout errors on Attach(), or has any suggestions for fixing this?

Thanks,
-Nathan Keeney

TheUberOverlord
Currently, I don't have a Vista system to see if there is any difference. My comment before was that some of my IE examples, located on the Skype4COM example pages, do not use false when calling attach, so some of those examples, could cause a timeout, if for example, the Skype client was running but not logged in, and one of those IE examples was started.

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.