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

Websocket Server OnMessage method doesn't support Netty WebSocketFrame #11506

Open
Piotreqsl opened this issue Jan 15, 2025 · 0 comments
Open

Comments

@Piotreqsl
Copy link

Expected Behavior

As stated in Micronaut documentation https://docs.micronaut.io/4.7.11/guide/ :

The @OnMessage method can define a parameter >for the message body. The parameter can be one of the following:

  • A Netty WebSocketFrame
  • ...

The WS Server onMessage method should accept WebSocketFrame parameter.

Actual Behaviour

Websocket Server OnMessage method throws an error on the very first incoming data.

Method is defined as following:

@OnMessage
    public void onMessage(WebSocketFrame message, WebSocketSession session) {}

Error that is being thrown:
Unexpected Exception in WebSocket: No bean introspection available for type [class io.netty.handler.codec.http.websocketx.WebSocketFrame].
Ensure the class is annotated with io.micronaut.core.annotation.Introspected

Steps To Reproduce

  1. Create a Micronaut Websocket Server as described in docs.
  2. Create an onMessage method with WebSocketFrame parameter
  3. Establish a connection to newly created WS Server
  4. Send anything to server.
  5. Exception is being thrown.

Environment Information

  • Micronaut version: 4.7.2

Example Application

No response

Version

4.7.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant