skype-bot icon indicating copy to clipboard operation
skype-bot copied to clipboard

Skype for Java throws exception while using in a newly created Group Chat

Open sandeeprock12 opened this issue 10 years ago • 6 comments

I am seeing an issue with Skype 4 Java working in group chats. It works well on old group chats but it does not work at all on new and recently created group chats. The messages are being received in a fine fashion. But, I get the below mentioned exception while sending out the message:

com.skype.CommandFailedException: Invalid/uknown chat name given at com.skype.Utils.checkError(Utils.java:77) at com.skype.Chat.send(Chat.java:275) at skypePackage.MyListener.myListener(MyListener.java:113) at skypePackage.MyListener.chatMessageReceived(MyListener.java:245) at com.skype.ChatMessageConnectorListener.fireMessageReceived(ChatMessageConnectorListener.java:58) at com.skype.ChatMessageConnectorListener.messageReceived(ChatMessageConnectorListener.java:38) at com.skype.connector.Connector.fireMessageEvent(Connector.java:1119) at com.skype.connector.Connector.access$500(Connector.java:37) at com.skype.connector.Connector$13.run(Connector.java:1098) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

Could you throw any idea on this issue...

sandeeprock12 avatar Jul 02 '14 07:07 sandeeprock12

Do you know how old a chat has to be for the Skype bot to work properly?

Also, once added to a new group and you start getting exceptions, is there a way to make it work on those chats again?

Please help me details that you have...

sandeeprock12 avatar Jul 02 '14 07:07 sandeeprock12

Hi,

I found out the root cause of this issue. The issue is due to change in version of Skype desktop client for Windows and MAC. The issue can be attributed to the change in the format of the Group Chat ID.

You can get the change in formats of the Group Chat ID by printing the values of "getChat.getID()". Below are some sample Chat IDs:

Old Skype Version - #--Username--/$--Username--;19a7be37a4cf94de New Skype Version - 19:[email protected]

I have tested the creation of group chats in previous versions of Skype client on MAC and Windows and it works fine then. Skype bot fails in group chats only created using the latest version of Skype.

The Skype for Java API code base needs to be updated to account for the new format of Chat ID.

sandeeprock12 avatar Jul 07 '14 17:07 sandeeprock12

I was looking at the Skype for Java API code and found the area where we are receiving the exception while using the new chat IDs. The place the new ID is coming into play is in the 'executeWithId()' and 'execute()' methods within the 'Connector' class in the 'com.skype.connector' package.

If anyone has a good understanding of the Skype for Java API code base, I can work with you to try and fix the issue of chat ID in updated versions of Skype.

sandeeprock12 avatar Jul 14 '14 17:07 sandeeprock12

The issue with the newer versions of Skype is that we are able to receive all the messages from the group chat. But, the issue is when we are trying to send response message to the group chat. So getting the information from the group chat is not the issue. Only the sending part is the issue...

com.skype.CommandFailedException: Invalid/uknown chat name given at com.skype.Utils.checkError(Utils.java:77) at com.skype.Chat.send(Chat.java:275)

sandeeprock12 avatar Jul 18 '14 18:07 sandeeprock12

Hi, did you solve this problem ?

p0l0us avatar Apr 26 '16 14:04 p0l0us

Skype discontinued the API so I presume right now it is impossible to get it working.

toomasr avatar Apr 26 '16 19:04 toomasr