Closed ComradeWoland closed 7 years ago
Hey @ComradeWoland, what client are you using?
Could it be that you are using a .NET client?
Greetings marci4
No, man, this bug appears while Google Chrome (latest version) connects to my WSS server. My app uses WSS to support WebRTC connection establishing and text messaging inside Video chat roulette, but connection sometimes unstable, and server log is full of bugs.
Hey @ComradeWoland,
could you please activate the debug output with WebSocketImpl.DEBUG = true;
I cannot reproduce this problem with my private project right now (nether wss nor ws) Maybe you could also try rebuild the jar directly from the sources here on github (I merged some pull requests, but was not able to update maven/gradle yet)
Also I just got the idea that you maybe wanna use Draft17 and not Draft10 for your project (Read up on the drafts here), because as documented it implements Hybi 17/RFC 6455 and is currently supported by Chrome16+ and IE10.
Greetings marci4
Hi,
same error here. In my case it's always "bad rsv 3", seems to appear at random moments, but quite often. Didn't have this problem when using WS instead of WSS.
Thank you for any indication.
Hello @micamo2k17,
could you please activate the debug output with WebSocketImpl.DEBUG = true;
before you start the websocket server
and then post the log here please.
When does this problem occur?
Right now I don't have any problems using a wss in production.
Greetings marci4
Hi @marci4
I activated debug mode. The following are two cases of that error (one with debug off, one on). As you can see, the number following "bad rsv" actually changes also in my case:
Without WebSocketImpl.DEBUG = true;
E/SERVICE: WebSocket did fail with error: org.java_websocket.exceptions.InvalidFrameException: bad rsv 1
D/WSServer: onError: org.java_websocket.exceptions.InvalidFrameException: bad rsv 1
W/SERVICE: WebSocket closed
With WebSocketImpl.DEBUG = true;
E/SERVICE: WebSocket did fail with error: org.java_websocket.exceptions.InvalidFrameException: bad rsv 4
D/WSServer: onError: org.java_websocket.exceptions.InvalidFrameException: bad rsv 4
I/System.out: send frame: Framedata{ optcode:CLOSING, fin:true, payloadlength:11, payload:[3, -17, -65, -67, 98, 97, 100, 32, 114, 115, 118, 32, 52]}code: 1002
I/System.out: write(13): {��bad rsv 4}
W/SERVICE: WebSocket closed
Trying to answer to your questions:
Thanks for your help!
Hello @micamo2k17
first of all it looks like you are using an outdated version of the lib (Check the readme for the latest version)
Maybe this fixes your issue already.
If not please also include the debug print out when the connection is opened :)
Greetings marci4
Hi @marci4
I couldn't find a readme for a newest version of the lib. Tried 1.3.1 (I saw it from the available branches/tags list) but the dependency could not be resolved. However, when the connection is opened, the following is logged: I/System.out: open using draft: Draft_17 So I believe we're using the updated build.
Thanks
Hello @micamo2k17,
that is not an indication that you are using the latest build. It looks like you are actually using a outdated version.
How do you build your project? What do you use? Maven, Gradle?
Greetings marci4
Hi @marci4
I'm using gradle. How can I select a new version?
Thank you!
Hello @micamo2k17
please add a custom maven repository to your repositories list
maven { url "http://clojars.org/repo" }
The result may look like this
repositories { mavenCentral() maven { url "http://clojars.org/repo" } }
For compiling just add compile "org.java-websocket:java-websocket:1.3.2"
so you are using the latest version.
Greetings marci4
Hi @marci4
Just tried that, doesn't seem to resolve the dependency either: Error:Failed to resolve: org.java-websocket:java-websocket:1.3.2
Regards, micamo1k2017
Hello @micamo2k17 could you maybe join the IRC Server here http://webchat.freenode.net/?channels=java-websocket
I quess it will be easier for both of us to fix this :)
Greetings marci4
Ok, I'm logged in as micamo2k17. Thanks.
Hi @marci4
version 1.3.2 seems to solve the issue (no more errors thrown even in high-messages-rate situations)! I would now like to get back using the library retrieved via repository, rather than a JAR...
Thanks,
micamo2k17
hello @micamo2k17
I installed the android studio again on my laptop and this works for me
apply plugin: 'com.android.library'
repositories {
maven { url 'http://clojars.org/repo' }
}
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
minSdkVersion 17
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'org.java-websocket:java-websocket:1.3.2'
compile 'org.apache.commons:commons-lang3:3.0'
compile 'commons-codec:commons-codec:1.9'
compile 'commons-io:commons-io:2.4'
compile 'com.android.support:support-v4:25.3.0'
testCompile 'junit:junit:4.12'
//compile files('libs/commons-codec-1.3.jar')
}
so everything fixed itself with the following line
repositories { maven { url 'http://clojars.org/repo' } }
Greetings marci4
Hi @marci4
I figured out where my problem was: I'm using the library inside a custom library. I simply was not referring to the repository in the app that integrates my library, but just in my library's gradle.
Any clue about the timing of a possible "promotion" of version 1.3.2 to the master/official branch?
Thanks!
Michele
Hello @micamo2k17,
TooTallNate did not have any access to the maven repository so the clojars repository is now gonna be the main repository... Can't do much there...
Closing the issue since it is resolved with the latest version.
Greetings marci4
Hey, people! Huge sorries, i was some deep ill. But LOGS has been collected during this time.
Here two pieces of them. error.log and standard log files error.log.txt log.txt
Std. Log is much more bigger by size,and cutted at more early point
Hello @ComradeWoland,
hope you feel better now!
Could it be that you are not using the current version 1.3.3?
Greetings marci4
Hello, comrades! There are errors "RSV n" with stochastic "n"s detected. The WebSocket server is a small chat engine, available via wss: connection. It works with some stable periods, intermediated with periods of "RSV n" errors sent to stderr.
WTF may be this?
Also following errors were detected