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

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

Open
endrik-exe opened this issue Jan 25, 2025 · 3 comments
Open

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

endrik-exe opened this issue Jan 25, 2025 · 3 comments

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

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

2 participants