signal-cli-rest-api
signal-cli-rest-api copied to clipboard
CLI error logs are lost
The problem
So I'm using the API to perform some automation with 10-20 different numbers and have started seeing 400 responses from the API recently.
I went into the container and enabled debug mode as noted here. With the debug mode I started seeing the following logs on top of the standard ones:
DEBU[689216] If you want to run this command manually, run the following steps on your host system:
DEBU[689216] *) docker exec -it / /bin/bash
DEBU[689216] *) su signal-api
DEBU[689216] *) signal-cli-native --config /home/.local/share/signal-cli --output json -a <PHONE_NUMBER> listGroups -d
And that's great help already, but if I go and execute the abovementioned command I actually receive the following error message from the CLI:
signal-api@signal-rest-api-1:/$ signal-cli-native --config /home/.local/share/signal-cli --output json -a <PHONE_NUMBER> listGroups -d
INFO AccountHelper - The Signal protocol expects that incoming messages are regularly received.
Error while checking account <PHONE_NUMBER>: [401] Authorization failed!
So the problem here is that the API essentially swallows somehow the actual error response from the CLI and that actual response is very very helpful for multiple reasons.
Is there any configuration or a technique that will allow to get the actual error text from the CLI response and at least print it to the logs. But ideally also get that response text and send it back as the HTTP response body/header.
Are you using the latest released version?
- [ ] Yes
Have you read the troubleshooting page?
- [X] Yes
What type of installation are you running?
signal-cli-rest-api Docker Container
In which mode are you using the docker container?
Native Mode
What's the architecture of your host system?
x86-64
Additional information
No response
If I understood you correctly, then the cli returned Error while checking account <PHONE_NUMBER>: [401] Authorization failed!, which isn't shown in the API response, right? Do you maybe can post the response from the API here too.
If I understood you correctly, then the cli returned
Error while checking account <PHONE_NUMBER>: [401] Authorization failed!, which isn't shown in the API response, right? Do you maybe can post the response from the API here too.
I have no access to that log file anymore, but API response was just 400 with no particular details.