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: Unable to search for any number or send messages to new numbers or groups since version 0.82 #531

Open
2 tasks done
Kamaradas opened this issue May 7, 2024 · 4 comments

Comments

@Kamaradas
Copy link

The problem

We have been using this containerized app for 6 months or so with no problems. However, since version 0.82 we stopped being able to search for any number or send messages to new numbers or groups. We suspect that we are still able to send messages to already registered numbers because the app stored some IDs when it was still able to search for new numbers when it was running on version <= 0.81.
We are now observing the following issue, where we are apparently getting a timeout result. We tried to perform a tcpdump and what we can observe is our Address sending/receiving some packets and applicational data and after a second our address just keeps waiting for 10 seconds straight for an answer until we eventually timeout. We already tried to search for a timeout variable to try to change it to a longer time but we were unable to find it. On the container log, we can observe a 400 (bad request). We don’t know what to try anymore, since the app works on version 0.81 and we have fully access to public network from our server

Are you using the latest released version?

  • Yes

Have you read the troubleshooting page?

  • Yes

What type of installation are you running?

signal-cli-rest-api Docker Container

In which mode are you using the docker container?

Normal Mode

What's the architecture of your host system?

x86-64

Additional information

We are using: Linux rhel 4.18.0-513.11.1.el8_9.x86_64, also we tried in json-rpc mode

Here goes an example of a working request(0.81):

[machine ~]$ curl -X GET -H "Content-Type: application/json" 'url/v1/about'
{"versions":["v1","v2"],"build":2,"mode":"normal","version":"0.81","capabilities":{"v2/send":["quotes","mentions"]}}[machine ~]$

[machine ~]$ curl -X GET -H "Content-Type: application/json" 'url/v1/search?numbers=+351936375862'
[{"number":"+351936375862","registered":false}][machine ~]$ curl -X GET -H "Content-Type: application/json"

Now the request in 0.83:
[machine ~]$ curl -X GET -H "Content-Type: application/json" 'url/v1/about'
{"versions":["v1","v2"],"build":2,"mode":"normal","version":"0.83","capabilities":{"v2/send":["quotes","mentions"]}}[machine ~]$

[machine ~]$ curl -X GET -H 'accept: application/json' "url/v1/search?numbers=+351914567985"
{"error":"WARN RefreshRecipientsJob - Full CDSI recipients refresh failed, ignoring: org.signal.libsignal.net.NetworkException: Operation timed out (IOException)\nUnable to check if users are registered: org.signal.libsignal.net.NetworkException: Operation timed out (IOException)\n"}[machine ~]$

@bbernhard
Copy link
Owner

bbernhard commented May 7, 2024

Please give that version a try: bbernhard/signal-cli-rest-api:0.158-dev. This image uses the latest released signal-cli version.
Does that change anything?

You mentioned, that you are using the normal mode. Do you call the receive endpoint regularly? (which must be done in normal/native mode).

In case you still experience issues, please enable the debug mode and post the obfuscated output here.

@Kamaradas
Copy link
Author

Responding to your questions:

We are calling the receive endpoint from hour to hour.

Here is the output using the dev version in debug mode:
[machine ~]$ curl -X GET -H "Content-Type: application/json" 'url/v1/about' {"versions":["v1","v2"],"build":2,"mode":"normal","version":"0.158","capabilities":{"v2/send":["quotes","mentions"]}}[machine ~]$

[machine ~]$ curl -X GET -H "Content-Type: application/json" 'url/v1/search?numbers=+351914567985'
time="2024-05-08T13:34:11Z" level=debug msg="If you want to run this command manually, run the following steps on your host system:"
time="2024-05-08T13:34:11Z" level=debug msg=") docker exec -it / /bin/bash"
time="2024-05-08T13:34:11Z" level=debug msg="
) su signal-api"
time="2024-05-08T13:34:11Z" level=debug msg="*) signal-cli --config /home/.local/share/signal-cli --output json getUserStatus 351914567985"
time="2024-05-08T13:34:24Z" level=debug msg="signal-cli output (stdout): "
time="2024-05-08T13:34:24Z" level=debug msg="signal-cli output (stderr): Unable to check if users are registered: org.signal.libsignal.net.NetworkException: connect timed out (IOException)\n"
[signal] | [GIN] 2024/05/08 - 13:34:24 | 400 | 13.496772212s | 10.89.0.2 | GET "/v1/search?numbers=+351914567985"

[machine ~]$ curl -X POST -H "Content-Type: application/json" -d '{"message": "Hello World!", "number": "+351914538482", "recipients": ["+351914567985"]}' 'url/v2/send'
time="2024-05-08T13:37:10Z" level=debug msg="If you want to run this command manually, run the following steps on your host system:"
time="2024-05-08T13:37:10Z" level=debug msg=") docker exec -it / /bin/bash"
time="2024-05-08T13:37:10Z" level=debug msg="
) su signal-api"
time="2024-05-08T13:37:10Z" level=debug msg="*) echo 'Hello World!' | signal-cli --config /home/.local/share/signal-cli -a +351914538482 send --message-from-stdin +351914567985 --notify-self"
time="2024-05-08T13:37:23Z" level=debug msg="signal-cli output (stdout): Failed to send (some) messages:\n+351914567985: Unregistered user "+351914567985"\n1715175432960\n"
time="2024-05-08T13:37:23Z" level=debug msg="signal-cli output (stderr): WARN ManagerImpl - No profile name set. When sending a message it's recommended to set a profile name with the updateProfile command. This may become mandatory in the future.\nFailed to send message\n"
[signal] | [GIN] 2024/05/08 - 13:37:23 | 400 | 13.362607672s | 10.89.0.2 | POST "/v2/send"

the real phone number that we are using is registered and every endpoint works in version 0.81.

@bbernhard
Copy link
Owner

We are calling the receive endpoint from hour to hour.

okay, that should be fine.

WARN ManagerImpl - No profile name set. When sending a message it's recommended to set a profile name with the updateProfile command. This may become mandatory in the future.

Although it is only a warning, I would highly recommend to set the profile name with the Update Profile PUT Request (https://bbernhard.github.io/signal-cli-rest-api/#/Profiles/put_v1_profiles__number_)

Did you also do what is instructed in the log file output and call the underlying signal-cli binary directly?

@Kamaradas
Copy link
Author

Hello bbernhard,

Sorry for the delayed response.

We have opened an issue in the signal-cli repository(AsamK/signal-cli#1523) and we have waited for a new release.
It seems that a new version was released an hour ago, and it seems that our issue was resolved, can you create a dev image with the new version for us to test?

Thank you.

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