8000 Session terminates when REPL input touches any Java if connected to server with -H option · Issue #3806 · frida/frida · GitHub
[go: up one dir, main page]

Skip to content

Session terminates when REPL input touches any Java if connected to server with -H option #3806

Open

Description

@TommyVisic

Description

On 17.24.3, if you connect to the frida server with the -H option, the connection terminates on any REPL input that touches Java.

$ frida -H 127.0.0.1:27042 -p 7249
   . . . .   Connected to 127.0.0.1:27042 (id=socket@127.0.0.1:27042)
Attaching...
[Remote::PID::7249 ]-> typeof Java
Connection terminated

CLI prints "Connection terminated", the Python API call raises "frida.TransportError: the connection is closed", and the session detaches with reason "connection-terminated".

Environment

  • Frida: 17.24.3, frida-tools 14.10.4.
  • Frida client running on either Android 17 emulator or on a Linux aarch64 host machine.
  • Frida server running on Android 17 emulator.

Potential cause/fix

When the REPL touches Java, frida-tools reads the java.js bridge file from disk (237 kb) and sends it to the server as a single message. That's what appears to exceed the limit.

This 128 kb limit appeared in libsoup 3.7.1 (looks like 17.24.x brings us up 3.8.0). SoupServer sets the limit for any connection created by add_websocket_handler (explains why only affects message to the server and not from). Looks like Frida already raised the default frame limit here, but there's now also a total message limit to override.

Here's the relevant commit over on libsoup.

Anyway this change worked for me (I used 0 to disable the limit all together, just to validate. There's probably a better value to choose.):
In lib/base/socket.vala, in WebConnection's construct:

 construct {
 	websocket.max_incoming_payload_size = (256 * 1024) + 1;
+	websocket.set ("max-total-message-size", (uint64) 0); // <---------
 
 	websocket.closed.connect (on_closed);
 	websocket.message.connect (on_message);
 }

Activity

  1. changed the title [-]Session terminates with a -H server connection when any Java called in REPL[/-] [+]Session terminates when REPL input touches any Java if connected to server with -H option[/+] on Oct 19, 2026
  2. AstralKitsune commented on Oct 20, 2026

    @AstralKitsune

    This is fixed in frida/frida-core@418f472

  3. rdtmaster commented on Oct 20, 2026

    @rdtmaster

    How to obtain a patched frida-gadget that addresses the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0