-
Notifications
You must be signed in to change notification settings - Fork 172
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
Subscriptions just returns None (no error) - manual tokio_tungstenite works fine #1142
Comments
Hey @chikko80 It's bit hard to understand what the issue is from my side of things, if you could instantiate a tracing subscriber and use Do you know the format of subscription notifications as the server sends out? Maybe it's interpreted as a close notification or something.... |
@niklasad1
Seems like the lib can't parse that format:
Update: /// JSON-RPC notification (a request object without a request ID) as defined in the
/// [spec](https://www.jsonrpc.org/specification#request-object).
#[derive(Serialize, Deserialize, Debug)]
pub struct Notification<'a, T> {
/// JSON-RPC version.
pub jsonrpc: TwoPointZero,
/// Name of the method to be invoked.
#[serde(borrow)]
pub method: Cow<'a, str>,
/// Parameter values of the request.
pub params: T,
} Seems like the missing "jsonrpc":"2.0" in the response is the problem right? |
Ok, I see. Previously, we made the interpretation that So, it's fine to change this as well to /// JSON-RPC notification (a request object without a request ID) as defined in the
/// [spec](https://www.jsonrpc.org/specification#request-object).
#[derive(Serialize, Deserialize, Debug)]
pub struct Notification<'a, T> {
/// JSON-RPC version.
pub jsonrpc: Option<TwoPointZero>,
/// Name of the method to be invoked.
#[serde(borrow)]
pub method: Cow<'a, str>,
/// Parameter values of the request.
pub params: T,
} Are you down to make a PR? |
@niklasad1 |
I am trying to connect to a jsonrpc websocket with your library but it doesn't work.
The strange thing is that every other library including manual implementation with tokio-tokio_tungstenite works absolutely fine.
Even a simple wscat via terminal works without any problems.
from
stream.next().await
i always get just aNone
- there is no error.Seems like the connection gets successfully established but then there is just nothing to receive. Even if I loop the stream.next().await for 1 minute i never receive anything.
Super confused cause its just with jsonrpsee which would totally fit for my use case.
Is anyone familiar with that problem or has an idea how to solve that?
The text was updated successfully, but these errors were encountered: