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

GetUserStatus problem #1541

Open
Tsjippy opened this issue Jun 10, 2024 · 3 comments
Open

GetUserStatus problem #1541

Tsjippy opened this issue Jun 10, 2024 · 3 comments

Comments

@Tsjippy
Copy link

Tsjippy commented Jun 10, 2024

I use JsonRpc via a unix socket, but I do not get any response for the GetUserStatus command.

This works:
echo '{"jsonrpc":"2.0","method":"getUserStatus","params":{"recipient":["+SOMENUMBER"]},"id":6}' | signal-cli jsonRpc

This works too:
printf '{"jsonrpc":"2.0","method":"send","params":{"recipient":["+SOMENUMBER"],"message":"hi"},"id":6}' | socat UNIX-CONNECT:/home/simnige1/sockets/signal -

But this does not work, no response, not even an error
printf '{"jsonrpc":"2.0","method":"getUserStatus","params":{"recipient":["+SOMENUMBER"]},"id":6}' | socat UNIX-CONNECT:/home/simnige1/sockets/signal -

If I make however a deliberate mistake in the command like this:
printf '{"jsonrpc":"2.0","method":"getUserStatus","params":{"recipien":["+SOMENUMBER"]},"id":6}' | socat UNIX-CONNECT:/home/simnige1/sockets/signal -

I get a response, although emty because I did not use command properly:
{"jsonrpc":"2.0","result":[],"id":6}

How can I make it work?

@AsamK
Copy link
Owner

AsamK commented Jun 10, 2024

Your exact command works for me. So it looks like something with the CDSI request might hang or dead lock. However it's strange that it works with the signal-cli jsonRpc command ...
Can you provide a verbose log (-vv) of the signal-cli daemon, that might shed some light on what's going on.

@Tsjippy
Copy link
Author

Tsjippy commented Jun 12, 2024

This is the relevant portion of the log:

2024-06-12T03:12:01.013-0600 [daemon-listener] INFO  o.asamk.signal.jsonrpc.SocketHandler - Accepted new client connection 1:  UnixDomainPrincipal[user=simnige1, group=simnige1]
2024-06-12T03:12:01.014-0600 [pool-8-thread-1] TRACE o.asamk.signal.jsonrpc.JsonRpcReader - Incoming JSON-RPC message: {"jsonrpc":"2.0","method":"getUserStatus","params":{"recipient":["+SOMENUMBER"]},"id":6}
2024-06-12T03:12:01.015-0600 [pool-8-thread-1] TRACE o.asamk.signal.jsonrpc.JsonRpcReader - Reached end of JSON-RPC input stream.
2024-06-12T03:12:01.015-0600 [pool-10-thread-1] DEBUG o.asamk.signal.jsonrpc.JsonRpcReader - Received json rpc request, method: getUserStatus
2024-06-12T03:12:01.017-0600 [pool-10-thread-1] WARN  LibSignal - [PhoneNumberFormatter]: Got local CC: NG
2024-06-12T03:12:01.017-0600 [pool-10-thread-1] DEBUG o.a.s.manager.internal.ManagerImpl - Normalized number +SOMENUMBER to +.
2024-06-12T03:12:01.017-0600 [pool-10-thread-1] TRACE o.a.s.manager.helper.RecipientHelper - Querying CDSI for 1 new numbers (0 previous), isPartialRefresh=true
2024-06-12T03:12:01.019-0600 [pool-10-thread-1] INFO  LibSignal - [libsignal]: rust/bridge/shared/src/net.rs:86: Initializing connection manager for Prod...
2024-06-12T03:12:01.280-0600 [pool-8-thread-1] INFO  o.asamk.signal.jsonrpc.SocketHandler - Connection 1 closed:  UnixDomainPrincipal[user=simnige1, group=simnige1]
2024-06-12T03:12:06.070-0600 [Thread-2] INFO  LibSignal - [OkHttpWebSocketConnection]: [normal:1355321530] Sending keep alive...
2024-06-12T03:12:06.070-0600 [Thread-2] INFO  LibSignal - [OkHttpWebSocketConnection]: [unidentified:1145959531] Sending keep alive...
2024-06-12T03:12:06.206-0600 [receive-0] DEBUG o.a.s.manager.helper.ReceiveHelper - Checking for new message from server
2024-06-12T03:12:19.587-0600 [daemon-listener] INFO  o.asamk.signal.jsonrpc.SocketHandler - Accepted new client connection 2:  UnixDomainPrincipal[user=simnige1, group=simnige1]
2024-06-12T03:12:19.588-0600 [pool-8-thread-1] TRACE o.asamk.signal.jsonrpc.JsonRpcReader - Incoming JSON-RPC message: {"jsonrpc":"2.0","method":"getUserStatus","params":{"recipient":["+2349045252526"]},"id":6}
2024-06-12T03:12:19.589-0600 [pool-8-thread-1] TRACE o.asamk.signal.jsonrpc.JsonRpcReader - Reached end of JSON-RPC input stream.
2024-06-12T03:12:19.589-0600 [pool-11-thread-1] DEBUG o.asamk.signal.jsonrpc.JsonRpcReader - Received json rpc request, method: getUserStatus
2024-06-12T03:12:19.589-0600 [pool-11-thread-1] WARN  LibSignal - [PhoneNumberFormatter]: Got local CC: NG
2024-06-12T03:12:19.589-0600 [pool-11-thread-1] TRACE o.a.s.manager.helper.RecipientHelper - Querying CDSI for 1 new numbers (0 previous), isPartialRefresh=true
2024-06-12T03:12:20.401-0600 [System-3] INFO  LibSignal - [libsignal]: rust/attest/src/enclave.rs:119: Successfully completed attested connection
2024-06-12T03:12:20.787-0600 [pool-11-thread-1] DEBUG o.a.s.manager.helper.RecipientHelper - CDSI request successful, quota used by this request: 1
2024-06-12T03:12:20.788-0600 [pool-11-thread-1] DEBUG o.a.s.m.s.recipients.RecipientStore - Marking 0 numbers as unregistered
2024-06-12T03:12:20.788-0600 [pool-11-thread-1] DEBUG o.a.s.m.s.recipients.RecipientStore - Marking 1 numbers as discoverable
2024-06-12T03:12:20.789-0600 [pool-8-thread-1] INFO  o.asamk.signal.jsonrpc.SocketHandler - Connection 2 closed:  UnixDomainPrincipal[user=simnige1, group=simnige1]

@Tsjippy
Copy link
Author

Tsjippy commented Jun 19, 2024

any clue?

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