-
-
Notifications
You must be signed in to change notification settings - Fork 415
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
Signal API bug with persistent storage #653
Comments
Interesting, is your curl command taking longer then 4 seconds? The error implies your timing out. What happens if you do: # Increase the connection timeout to 30 seconds
apprise -vvv -t "Test Message Title" -b "Test Message Body" \
signal://signal-api:8080/123456789?cto=30 |
Setting www-data@apprise:/opt/apprise$ apprise -vvv -t "Test Message Title" -b "Test Message Body" signal://signal-api:8080/123456789?cto=30
2022-09-01 14:57:21,018 - DEBUG - Loaded Signal API URL: signal://signal-api:8080/123456789/?batch=no&status=no&format=text&overflow=upstream&rto=4.0&cto=30.0&verify=yes
2022-09-01 14:57:21,019 - DEBUG - Using selector: EpollSelector
2022-09-01 14:57:21,021 - INFO - Notifying 1 service(s) asynchronously.
2022-09-01 14:57:21,031 - DEBUG - Signal API POST URL: http://signal-api:8080/v2/send (cert_verify=True)
2022-09-01 14:57:21,031 - DEBUG - Signal API Payload: {'message': 'Test Message Title\r\nTest Message Body', 'number': '123456789', 'recipients': ['123456789']}
2022-09-01 14:57:25,067 - WARNING - A Connection error occured sending 1 Signal API notification(s).
2022-09-01 14:57:25,067 - DEBUG - Socket Exception: HTTPConnectionPool(host='signal-api', port=8080): Read timed out. (read timeout=4.0) however, setting www-data@apprise:/opt/apprise$ apprise -vvv -t "Test Message Title" -b "Test Message Body" signal://signal-api:8080/123456789?rto=30
2022-09-01 14:58:46,981 - DEBUG - Loaded Signal API URL: signal://signal-api:8080/123456789/?batch=no&status=no&format=text&overflow=upstream&rto=30.0&cto=4.0&verify=yes
2022-09-01 14:58:46,982 - DEBUG - Using selector: EpollSelector
2022-09-01 14:58:46,983 - INFO - Notifying 1 service(s) asynchronously.
2022-09-01 14:58:46,990 - DEBUG - Signal API POST URL: http://signal-api:8080/v2/send (cert_verify=True)
2022-09-01 14:58:46,990 - DEBUG - Signal API Payload: {'message': 'Test Message Title\r\nTest Message Body', 'number': '123456789', 'recipients': ['123456789']}
2022-09-01 14:58:59,697 - INFO - Sent 1 Signal API notification to 123456789. Is there a way to set |
You should be able to just add it and it will work: ...
urls:
- signal://credentials?rto=30
- tag: signal Or this should work too: ...
urls:
- "signal://credentials":
- tag: signal
rto: 30 Surprised to see it take as long it does. One thing i could do is just bump the default value of the read timeout for signal in Apprise from 4 seconds to... 10? I mean it seems a little strange it's taking longer then even 4 seconds to communicate with your server. Is your machine under a lot of stress? Or is it an older one that has these delays from time to time? What happens if you do: time apprise -vvv -t "Test Message Title" -b "Test Message Body" signal://signal-api:8080/123456789?rto=30 I'd be curious the time it is taking (do it a few times maybe so you can get like an average |
It seems to take about 12 seconds for me on average (repeated 5 times). I have about 30 running Docker containers, but the machine is rarely under any load. www-data@apprise:/opt/apprise$ time apprise -vvv -t "Test Message Title" -b "Test Message Body" signal://signal-api:8080/123456789?rto=30
2022-09-01 23:13:08,672 - DEBUG - Loaded Signal API URL: signal://signal-api:8080/123456789/?batch=no&status=no&format=text&overflow=upstream&rto=30.0&cto=4.0&verify=yes
2022-09-01 23:13:08,673 - DEBUG - Using selector: EpollSelector
2022-09-01 23:13:08,674 - INFO - Notifying 1 service(s) asynchronously.
2022-09-01 23:13:08,681 - DEBUG - Signal API POST URL: http://signal-api:8080/v2/send (cert_verify=True)
2022-09-01 23:13:08,682 - DEBUG - Signal API Payload: {'message': 'Test Message Title\r\nTest Message Body', 'number': '123456789', 'recipients': ['123456789']}
2022-09-01 23:13:18,350 - INFO - Sent 1 Signal API notification to 123456789.
real 0m12.545s
user 0m2.560s
sys 0m0.246s But this is a fairly minor problem, the main issue is that I cannot trigger signal remotely using a configuration (stateful). Unfortunately, adding YAML urls:
- "signal://signal-api:8080/123456789":
- to: 123456789
tag: signal
rto: 30 leads to the Web-UI log 2022-09-01 16:25:01,607 INFO Applying Google Mail Defaults
2022-09-01 16:25:01,608 INFO Loaded 4 entries from memory://
2022-09-01 16:25:01,609 INFO Notifying 1 service(s) asynchronously.
2022-09-01 16:25:01,621 WARNING There were no Signal API targets to notify. and the Docker Apprise log $ docker logs -f --tail=0 apprise
2022-09-01 16:26:38,132 [INFO] apprise: Applying Google Mail Defaults
2022-09-01 16:26:38,133 [INFO] apprise: Loaded 4 entries from memory://
2022-09-01 16:26:38,135 [INFO] apprise: Notifying 1 service(s) asynchronously.
2022-09-01 16:26:38,137 [WARNING] apprise: There were no Signal API targets to notify.
2022-09-01 16:26:38,142 [WARNING] django.request: Failed Dependency: /notify/apprise
2022/09/01 23:26:38 [info] 9#9: *58 recv() failed (104: Connection reset by peer) while sending to client, client: 5.6.7.8, server: , request: "POST /notify/apprise HTTP/1.1", upstream: "http://127.0.0.1:8080/notify/apprise", host: "apprise:12345"
172.16.20.20 - - [01/Sep/2022:23:26:38 +0200] "POST /notify/apprise HTTP/1.1" 424 278 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36"
|
I hear you. Looks like this is definitely a bug. I'll investigate further and let you know as I learn more or can patch it up 👍 |
This has been fixed now in the master branch. 🚀 Closing this ticket off |
📣 Notification Service(s) Impacted
Signal-api
🐞 Describe the bug
Signal API works with Apprise's CLI (although with a warning), but fails with the Web-UI and the Web API.
💡 Screenshots and Logs
command to trigger this with the stateful API
and the Apprise configuration file
The CLI works but triggers a warning
and the stateless API works for some reason despite the message
In short:
My guess is that Apprise does not translate the configuration into a proper call.
💻 Your System Details:
🔮 Additional context
I am using the latest Docker image (v0.8.0).
The text was updated successfully, but these errors were encountered: