caronc / apprise

Apprise - Push Notifications that work with just about every platform!
https://hub.docker.com/r/caronc/apprise
BSD 2-Clause "Simplified" License
11.7k stars 410 forks source link

Pushover and PushBullet notifiers report invalid Apprise schema #1047

Closed jasonlyle88 closed 8 months ago

jasonlyle88 commented 8 months ago

:mega: Notification Service(s) Impacted

:lady_beetle: Describe the bug I have had an apprise config file that was working for a while with macosx, pushover, and pushbullet. I realized I hadn't seen any notification for a while from pushover or pushbullet. Upon doing a test, I discovered they are no longer working even though there has been no change on my side in regards to configuration

:bulb: Screenshots and Logs

> apprise -vv -t 'test' -b 'test body' --tag all
2024-01-18 08:37:56,259 - ERROR - Unparseable URL pover://u...6@a...h
2024-01-18 08:37:56,259 - WARNING - An invalid Apprise schema (pover) in YAML configuration entry #2, item #1
2024-01-18 08:37:56,259 - ERROR - Unparseable URL pbul://o...v
2024-01-18 08:37:56,259 - WARNING - An invalid Apprise schema (pbul) in YAML configuration entry #3, item #1
2024-01-18 08:37:56,259 - INFO - Loaded 1 entries from file:///Users/jlyle/.apprise/apprise.yml?encoding=utf-8&cache=yes
2024-01-18 08:37:57,103 - INFO - Sent MacOSX notification.

:computer: Your System Details:

:crystal_ball: Additional context The macosx notifier is sending a notification correctly, so apprise seems to be working with other notifiers.

This may be affecting other notifiers, but I'm only using the 3 and Pushover along with Pushbullet are not working.

caronc commented 8 months ago

Very odd, are you using the latest version of Apprise? Is this information being read from a configuration file?

There isn't enough information based on the error to tell me what's going on. Could you share with me privately you're configuration (you can regenerate your keys later). Send them to my email to give me something to work with : lead2gold@gmail.com

jasonlyle88 commented 8 months ago

Apologies, the Apprise version would help. This is with the latest version:

❯ apprise -V
Apprise v1.7.1
Copyright (C) 2023 Chris Caron <lead2gold@gmail.com>
This code is licensed under the BSD License.

Additionally, I just emailed you the config file I am using that is causing this issue!

mattpackwood commented 8 months ago

Just to contribute that my macOS 14.2.1, Python 3.12.1, Apprise 1.7.1 is having no issues with ingesting YAML for either Pushover or Pushbullet.

caronc commented 8 months ago

@jasonlyle88 I'm currently out of the country, but i promise to review it next week when i have access to my laptop again.

There is something simple that is amiss because nothing was changed with respect to the upstream services you're having issues with.

jasonlyle88 commented 8 months ago

@caronc , please enjoy your time, appreciate all you do here! Hopefully it is just something simple that is amiss. I originally thought the single quotes around the URLs, so tried without those and received the same behavior. Also thought maybe there was some kind of non-printable character in the config file, so checked with a hex editor and couldn't find any non-printable characters messing things up.

Were there recently any changes to the YAML parser that is used, maybe that is an issue?

Just for completeness, attached is a version of my YAML config with fake values subbed in for the keys just for reference

version: 1
urls:
  - 'macosx://':
    - tag:
      - macos
  - 'pover://pushoverUserKey@PushoverApiKey':
    - tag:
      - pushover
      - shell-notify
  - 'pbul://pusbulletApiKey':
    - tag:
      - pushbullet
mattpackwood commented 8 months ago

@jasonlyle88 I copied your structure and am not having any issues with my Mac triggering PushBullet or PushOver, if you like I can try your original YAML file.

I could try it here (you could recreate your API keys after the test)? I am "MattPackwood@gmail.com"

caronc commented 8 months ago

@jasonlyle88 , I used your configuration file and it works perfectly just as @mattpackwood pointed out. Here is the output of running commands against -d (for --dry-run):

$ bin/apprise -c ~/Downloads/apprise.yml  -d -b "test" -g macos
  1. macosx://_/?image=yes&format=text&overflow=upstream&rto=4.0&cto=4.0&veri...
      - macos
  2. pover://x...x@x...x//?priority=normal&format=text&overflow=upstream&rto=...
      - pushover, shell-notify
  3. pbul://x...x//?format=text&overflow=upstream&rto=4.0&cto=4.0&verify=yes
      - pushbullet
# returned error code 0 (this is correct)

$ bin/apprise -c ~/Downloads/apprise.yml  -d -b "test" -g macos
  1. macosx://_/?image=yes&format=text&overflow=upstream&rto=4.0&cto=4.0&veri...
      - macos
# returned error code 0 (this is correct)

$ bin/apprise -c ~/Downloads/apprise.yml  -d -b "test" -g shell-notify
  1. pover://x...x@x...x//?priority=normal&format=text&overflow=upstream&rto=...
      - shell-notify, pushover
# returned error code 0 (this is correct)

$ bin/apprise -c ~/Downloads/apprise.yml  -d -b "test" -g pushbullet
  1. pbul://x...x//?format=text&overflow=upstream&rto=4.0&cto=4.0&verify=yes
      - pushbullet
# returned error code 0 (this is correct)

$ bin/apprise -c ~/Downloads/apprise.yml  -d -b "test" -g invalid
# returned error code 3 (this is correct)

$ bin/apprise -c ~/Downloads/apprise.yml  -d -b "test" -g macos -g pushover
  1. macosx://_/?image=yes&format=text&overflow=upstream&rto=4.0&cto=4.0&veri...
      - macos
  2. pover://x...x@x...x//?priority=normal&format=text&overflow=upstream&rto=...
      - pushover, shell-notify
# returned error code 0 (this is correct)

There is definitely something wrong with your copy of Apprise. Perhaps uninstalling it and reinstalling it will fix it? How are you using Apprise, via native install, docker container, etc? Was it installed using pip3 or some other installer (like apt-get , etc?

jasonlyle88 commented 8 months ago

Interesting. It was installed via homebrew (https://formulae.brew.sh/formula/apprise#default). I tried uninstalling and reinstalling and same issue. However, when I uninstalled and installed it in a virutalenv through pip, it worked perfectly. So looks like there is an issue with the install from Homebrew!

jasonlyle88 commented 8 months ago

Of course, the last thing I check right after my last comment was my brew setup. Apparently one of my python packages wasn't linked correctly. Apologies for all the confustion. Apprise and installing apprise through homebrew work fine... it was just my setup that was wonky!