delthas / JavaSkype

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

java.net.SocketException: Software caused connection abort: socket write error #12

Closed MrPowerGamerBR closed 7 years ago

MrPowerGamerBR commented 8 years ago
An error occured while connecting...
java.io.IOException: java.net.SocketException: Software caused connection abort: socket write error
    at fr.delthas.skype.Skype.connect(Skype.java:102)
    at fr.delthas.skype.Skype.connect(Skype.java:68)
    at com.mrpowergamerbr.test.Whatever.main(Whatever.java:12)
Caused by: java.net.SocketException: Software caused connection abort: socket write error
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
    at sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:431)
    at sun.security.ssl.OutputRecord.write(OutputRecord.java:417)
    at sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:876)
    at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:847)
    at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
    at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
    at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282)
    at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)
    at java.io.OutputStreamWriter.write(OutputStreamWriter.java:207)
    at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:129)
    at java.io.BufferedWriter.flush(BufferedWriter.java:253)
    at fr.delthas.skype.NotifConnector.sendPacket(NotifConnector.java:515)

Same issue as #11, the only difference is that the moods are loaded but all contacts are shown as "OFFLINE"

delthas commented 8 years ago

Um, I'm not sure why this is happening. Does it only happen on your main account with a lot of contacts? I'll have to add some logging to understand the cause of the issue.

MrPowerGamerBR commented 8 years ago

Yes, this is only happening in my main account.

Em 3 de ago de 2016 23:05, "Delthas" notifications@github.com escreveu:

Um, I'm not sure why this is happening. Does it only happen on your main account with a lot of contacts? I'll have to add some logging to understand the cause of the issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Delthas/JavaSkype/issues/12#issuecomment-237432006, or mute the thread https://github.com/notifications/unsubscribe-auth/AJDnJ5O57MRvqm7AFXLyM5Y_OS6UQ3CQks5qcUjegaJpZM4Ja9yl .

delthas commented 8 years ago

I have added a lot of debug (1.0.12). Could you please run the lib with your bot account and your main account with debug enabled and send me the logs? (Just add Skype.setDebug(path) before skype.connect(), a log file will be created at path path).

MrPowerGamerBR commented 8 years ago

@Delthas

It seems the logger translated the level of the messages:

"DETALHADO": Fine.

"MAIS DETALHDO": Finest

"GRAVE": Fatal/Error

Link to the debug log: https://gist.github.com/MrPowerGamerBR/eedb366b723d8b4d2c069587a6c1e7a0

delthas commented 8 years ago

Thanks! I'll delve into the logs. :)

delthas commented 8 years ago

Okay, maybe I found the issue. Please run the lib on the latest (1.0.13) version with your main account with debug enabled and send me the logs.

MrPowerGamerBR commented 8 years ago

@Delthas logs? Why would you need logs?

You fixed the issue. :smile:

Well, I think you fixed, the logs still show "socket write error" but everyone has a status (OFFLINE, BUSY, AWAY or ONLINE) https://gist.github.com/MrPowerGamerBR/1911345d47857c383e49fa693afda51b

MrPowerGamerBR commented 8 years ago

@Delthas also, a little question...

I was rewriting my Skype client (which isn't finished yet) to use JavaSkype instead of Skype4J, and I found a little roadblock (at least for me)...

There isn't any way to get the messages sent to a contact/group? Skype4J allows to get all the messages in a conversation with a contact/group, however JavaSkype doesn't have a method to do it.

delthas commented 8 years ago

You fixed the issue. 😄

Yay!

the logs still show "socket write error" but everyone has a status (OFFLINE, BUSY, AWAY or ONLINE)

Yeah, that's why I need the logs to see what's the other issue that makes it throw a socket write error. There should be no errors at all. And actually the logs you've linked are apparently old logs pre-1.0.13 fix. Could you make sure you run the lib with debug on the latest version? Maybe delete the log file manually if it already exists, I don't know. I think we're almost there! :)

to get all the messages in a conversation with a contact/group

You mean the recent/last messages in a conversation? Like a User#getRecentMessages or a Group#getRecentMessages that returns a list of the last messages sent on a conversation? I can add that.

MrPowerGamerBR commented 8 years ago

It is? Whoops, I will test it again tomorrow (it is 22:33 in Brazil)

Yes, it would be awesome if you added that. :)

(In Skype4J it is like this: .loadMessages(int amount) loads the messages and getAllMessages returns the messages loaded in chronological order (from older to newest))

Em 4 de ago de 2016 21:43, "Delthas" notifications@github.com escreveu:

You fixed the issue. 😄

Yay!

the logs still show "socket write error" but everyone has a status (OFFLINE, BUSY, AWAY or ONLINE)

Yeah, that's why I need the logs to see what's the other issue that makes it throw a socket write error. There should be no errors at all. And actually the logs you've linked are apparently old logs pre-1.0.13 fix. Could you make sure you run the lib with debug on the latest version? Maybe delete the log file manually if it already exists, I don't know. I think we're almost there! :)

to get all the messages in a conversation with a contact/group You mean the recent/last messages in a conversation? Like a User#getRecentMessages or Group#getRecentMessages that return a list of the last messages sent on a conversation? I can add that.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Delthas/JavaSkype/issues/12#issuecomment-237727004, or mute the thread https://github.com/notifications/unsubscribe-auth/AJDnJ9vQc-PYsH90Q5Gm24ma6g6MeyKUks5qcocRgaJpZM4Ja9yl .

delthas commented 7 years ago

Opened #32 for this. Closing this issue.