Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoClassDefFoundError: WebSocketHandshakeException #246

Closed
Shusek opened this issue Jun 24, 2022 · 2 comments
Closed

NoClassDefFoundError: WebSocketHandshakeException #246

Shusek opened this issue Jun 24, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@Shusek
Copy link

Shusek commented Jun 24, 2022

Describe the bug
When establishing websocket connection fails method extractHandshakeStatusCode throw exception NoClassDefFoundError with an indication of the class WebSocketHandshakeException on android because this class is available on java JDK 11+ while android uses JDK 8.

Reproduction and additional details
Try to connect to websocket without proper authentication. It should throw 401 or a similar code.
Instead of proper error we got:
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/net/http/WebSocketHandshakeException;

Ffile affected by this error: org.hildan.krossbow.websocket.ktor.HandshakeExceptionsJvm.kt

Context

  • Krossbow version: 2.0.2
  • Krossbow artifacts used: ktor, ktor-serializer
  • Kotlin version: 1.7.0
  • Kotlin target(s): 1.8
    android API 30
@Shusek Shusek added the bug Something isn't working label Jun 24, 2022
@joffrey-bion
Copy link
Owner

joffrey-bion commented Jun 24, 2022

Thanks a lot for reporting this, I'll fix this ASAP!

This would have been prevented by #49, but unfortunately I haven't had enough incentive and time to set this up.

@joffrey-bion
Copy link
Owner

Fix deployed in 4.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants