delthas / JavaSkype

A lightweight, comprehensive Java API for Skype using MSNP24
MIT License
72 stars 28 forks source link

Error: Feature Set not enabled or wait forever at: connectLatch.await() #47

Closed apovn closed 6 years ago

apovn commented 6 years ago

Hi @delthas

I can't send the skype message. I describe the error below: Could you help me. Thank you.

Expected behaviour

Send message to an user

Actual behaviour

get error: fr.delthas.skype.ParseException: Error message received: 202 2 MSGR 26

Feature Set not enabled. at fr.delthas.skype.NotifConnector.readPacket(NotifConnector.java:552) at fr.delthas.skype.NotifConnector.lambda$new$0(NotifConnector.java:69) at java.lang.Thread.run(Thread.java:748) Exception in thread "Skype-Receiver-Thread" java.lang.AssertionError: Error message received: 202 2 MSGR 26

Feature Set not enabled. at org.junit.Assert.fail(Assert.java:88) at fr.delthas.skype.TestConnect.lambda$testConnect$0(TestConnect.java:48) at fr.delthas.skype.Skype.error(Skype.java:281) at fr.delthas.skype.NotifConnector.lambda$new$0(NotifConnector.java:81) at java.lang.Thread.run(Thread.java:748)

Steps to reproduce the issue

public void testConnect() { Skype skype = new Skype("myuser@outlook.com", "mypassword");

try {
    skype.connect();

    for (User user : skype.getContacts()) {
        System.out.println("user: " + user);
        if (user.getUsername().equalsIgnoreCase("my-friend-user")){
            user.sendMessage("Hi, " + user.getDisplayName() + ", what's up?");
        }
    }

} catch (Exception e) {
    e.printStackTrace();
    Assert.fail(e.getMessage());
}

}

Logs

Add debug logs (or link to them) if reporting a bug. For that call Skype.setDebug(path) at any time before calling skype.connect().

apovn commented 6 years ago

logs here when i set Skype.setDebug(path):

thg 3 15, 2018 1:12:56 SA fr.delthas.skype.Skype connect FINE: Connecting to Skype thg 3 15, 2018 1:12:56 SA fr.delthas.skype.Skype reset FINEST: Resetting the Skype object thg 3 15, 2018 1:12:56 SA fr.delthas.skype.NotifConnector generateEPID FINEST: Generated EPID: 8d662308-025e-a443-1acb-2432cf69ed6d thg 3 15, 2018 1:12:56 SA fr.delthas.skype.LiveConnector refreshTokens FINER: Refreshing tokens thg 3 15, 2018 1:13:03 SA fr.delthas.skype.LiveConnector refreshTokens FINER: Refreshed live tokens successfully thg 3 15, 2018 1:13:03 SA fr.delthas.skype.WebConnector refreshTokens FINER: Refreshing tokens thg 3 15, 2018 1:13:03 SA fr.delthas.skype.WebConnector generateToken FINEST: Getting Microsoft token thg 3 15, 2018 1:13:03 SA fr.delthas.skype.WebConnector sendRequest FINEST: Sending POST request at https://api.skype.com/rps/skypetoken thg 3 15, 2018 1:13:03 SA fr.delthas.skype.WebConnector sendRequest FINE: No token sent for the request at: https://api.skype.com/rps/skypetoken

delthas commented 6 years ago

I see you've closed the issue, how did you solve this?

apovn commented 6 years ago

Hi @delthas

Thank you for your reply. In fact, it's not solved. It's happened sometime and I didn't know why.