Unable to send test message to pushover
p-vg opened this issue · 13 comments
Hello! I've verified I can receive messages on the target device from pushover but when I try to send a message from within znc I don't receive anything and my "Message Count" within pushover doesn't increase.
Below is output from the debug in znc*push with sensitive bits redacted, I noticed 23:57:41 *push · service_auth:
is blank, not sure if thats my issue but I don't see a variable to set that.
23:57:41 · send Test message
23:57:41 *push · service: pushover
23:57:41 *push · service_host: api.pushover.net
23:57:41 *push · service_url: /1/messages.json
23:57:41 *push · service_auth:
23:57:41 *push · use_port: 443
23:57:41 *push · use_ssl: 1
23:57:42 *push · use_post: 1
23:57:42 *push · NOT using libcurl
23:57:42 *push · Building notification to api.pushover.net/1/messages.json...
23:57:42 *push · User-Agent: ZNC Push/dev
23:57:42 *push · Query string: device=iphone&message=Test+message&priority=0&title=New+Message&token=<>&user=<>
23:57:42 *push · Request sending
23:57:42 *push · Ok
Any help is greatly appreciated!!
Assuming your token and user id are correct, then my first guess would be an incorrect device name. Try unsetting that value and see if the message gets through -- /msg *push unset target
just tried that, still no luck :( -- Will triple check my tokens but pretty sure they're correct.
thanks for the quick response!
Just to be sure, check the Pushover-specific documentation to be sure you're using the correct values in the right places: https://github.com/jreese/znc-push/blob/master/doc/pushover.md
just checked my tokens and the above documentation, all appears correct :(
Is your ZNC instance behind a proxy, or do you have an ipv6 bindhost set in ZNC? Those could be preventing ZNC from reaching the Pushover servers. Since it looks like you're not getting a "Status: ..." line in your console, it sounds like ZNC is failing to connect.
Alternatively, one last option is to try building with make curl=yes
to use the curl library instead of ZNC for networking. That also has the effect of bypassing the bindhost configuration in ZNC, and just uses default network routing to connect to Pushover.
That is what ports ZNC will listen to, not the bindhost used for connecting. Either:
/msg *status showbindhost
- or check bindhost in user settings. I think push ignores network bindhost when loaded user level, but if not, check it too.
14:07:23 *status · This user's default bind host not set
14:07:24 *status · This network's bind host not set
One last thought: Pushover recently upgraded their SSL cert from SHA1 to SHA256 - this will break SSL clients that don't support the new standards. It's possible that the version of OpenSSL on your Synology is out of date, or ZNC hasn't been built against the newer version. Can you SSH into your Synology and just run curl https://api.pushover.net/1
and see if you can get an HTML response from their service?
Received the below output, I'm assuming this is a "successful" response. Just checked, I'm running znc version 1.6.0
root@synology:~# curl https://api.pushover.net/1
...Resource Not Found (or Incorrect Method)
<p> The page or resource you requested could not be found. </p> <p> If you are attempting an <a href="https://pushover.net/api">API</a> ca ll, verify the URL and the HTTP method (e.g., retry as a POST request inst ead of GET). </p> <p> Please try navigating through our <a href="https://pushover.net/">homepage</a> or view our <a href="https://pushover.net/api">API documentation</a>. </p>
...
Hmm, that seems like curl/openssl is working fine then. I've got nothing else, sorry.
Alright, I appreciate the effort! If I find anything noteworthy I'll let you know.
Thanks again!
I encountered the same issue with my setup and was able to solve it by running the post request with curl. By looking at the output from curl I was able to fix the problem easily, as the error message returned from pushover told me exactly where I had gone wrong.
request
curl -v \
--url "https://api.pushover.net/1/messages.json" \
--data "message=test&priority=2&title=New+Message&token=secret&user=user-key"
# ^^^^^^^^^^
# point of failure
response
{
"expire": "must be supplied with priority=2",
"errors": ["expire must be supplied with priority=2"],
"status": 0,
"request":"request_hash"
}