frida-rust icon indicating copy to clipboard operation
frida-rust copied to clipboard

RPC hang forever if do not add custom message handler

Open 7sDream opened this issue 3 months ago • 1 comments

If script.handle_message is not called, script.exports.call will hang indefinitely.

From the source code, this is because RPC calls use the same IPC channel as send, and the entire IPC message handler is registered only when a custom handler is set via handle_message. Therefore, without setting a custom handler, the call method can't receive RPC responses and just waiting forever.

I am not certain whether the current API design intentionally works this way, but I find it somewhat counterintuitive.

I performed a comparative test using the Python binding: in Python, RPC calls work normally even without calling script.on("message", on_message).

7sDream avatar Sep 17 '25 10:09 7sDream

Could you propose a solution, or better yet, make a PR?

s1341 avatar Sep 17 '25 14:09 s1341