Skip to content
New issue

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

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

Already on GitHub? # to your account

Error sending rpc method invocation response: No caller found #396

Closed
endrik-exe opened this issue Jan 25, 2025 · 4 comments · Fixed by #409
Closed

Error sending rpc method invocation response: No caller found #396

endrik-exe opened this issue Jan 25, 2025 · 4 comments · Fixed by #409
Assignees

Comments

@endrik-exe
Copy link

Version: 0.13.3

I have registered this RPC method in node sdk. and then trigger it from livekit-client-js

room.localParticipant.registerRpcMethod('mousemove', async (data: RpcInvocationData) => {
    const { x, y } = JSON.parse(data.payload);

    const width = this.page.viewportSize()?.width ?? 1
    const height = this.page.viewportSize()?.height ?? 1

    this.page.mouse.move(x * width, y * height);

    return '';
});

It did get called several times, but then i get this error in console: error sending rpc method invocation response: No caller found

console.warn(`error sending rpc method invocation response: ${res.error}`);

After this error message appeared, it seems the node-sdk cannot receive rpc call again.

Do you have any idea?

@lukasIO
Copy link
Contributor

lukasIO commented Jan 27, 2025

how often are you sending these RPC's ? on every mousemove event of the browser?

@endrik-exe
Copy link
Author

how often are you sending these RPC's ? on every mousemove event of the browser?

Yes, on every mousemove event.

when I throttling it to 10 times a second, or 100 ms delay. using this helper: https://vueuse.org/shared/useDebounceFn .
The problem seems go away.

@lukasIO
Copy link
Contributor

lukasIO commented Feb 1, 2025

RPC calls are not designed for this kind of high frequency event, also you'll get worse throughput because it always comes with additional overhead if you perform RPCs. To send mousemove events the recommended approach would be to use publishData directly on a custom topic.

I'll leave this issue open as there is might still a bug around how callers are handled.
cc @bcherry for additional insight

@bcherry
Copy link
Contributor

bcherry commented Feb 4, 2025

yeah RPC isn't really designed for the high volume but the specific issue you have turned out to be a bug on our side anyways livekit/rust-sdks#565

will get fixed here in the next release

@bcherry bcherry self-assigned this Feb 4, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants