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

Slack integration: "No preview Available" #473

Closed
lardbit opened this issue Oct 31, 2021 · 7 comments
Closed

Slack integration: "No preview Available" #473

lardbit opened this issue Oct 31, 2021 · 7 comments
Labels

Comments

@lardbit
Copy link

lardbit commented Oct 31, 2021

Question

I'm integrating apprise into nefaroius (alternative to sonarr/radarr) and chose Slack as my first test. The notification works, but on my Android device it says No preview available and I can't figure out if it's a configuration detail I'm missing or an issue.

Apprise integration into nefarious:
https://github.com/lardbit/nefarious/blob/apprise-notifications/src/nefarious/notification.py#L11-L19

Screenshot:
image

@caronc
Copy link
Owner

caronc commented Oct 31, 2021

First off, awesome job with nefarious and thank you for considering Apprise.

It looks like that error message you're getting is part of Slack's behaviour when the message body is empty? I found this link here which identifies someone else having the problem too and that was their reasoning. I'm not sure if you can confirm this is the case for you?

But that said, i wonder if there is a graceful way of handling this situation or some way i can handle the body_format='TEXT' as you've defined in your example.

Here is some recent changes that were also made against the Slack Plugin) that may or may not have bearing and/or a solution to your issue. I'm wondering what your results are if you do the following (just as a test)?:

# Legacy Slack Message Formatting is in this build
pip install apprise==0.9.3

I'm definitely open to fixing anything on my side if you believe this is a bug and not a Slack formatting issue. 👍 . I can see that these guys seemed to have solved the problem by including an icon as part of the payload in these circumstances (not sure if I should/could follow that suit)?

Thoughts?

@lardbit
Copy link
Author

lardbit commented Oct 31, 2021

Thanks for the quick feedback. I can confirm that the message body was not empty. When clicking on the actual notification, it displays the title and body correctly.

I initially tried omitting the body_format argument but it had the same results.

I'll try the 0.9.3 version and report back to you, and will investigate what the teamcity people did too.

Apprise is an amazing library and I'm looking forward to including it in nefarious. I'll keep you posted.

@lardbit
Copy link
Author

lardbit commented Nov 8, 2021

Just a quick update. I've been working on this but hit an obstacle regarding multi-arch support (e.g. armv7 on the raspberry pi) from apprise's cryptography requirement. Version 3.5 now requires the rust tool chain and is causing some issues with docker buildx and qemu. There's not a straightforward answer but I'm still working on it.

Please let me know if you've already waded through these waters.

See:

@caronc
Copy link
Owner

caronc commented Nov 10, 2021

Yeah... I'll never understand why Cryptography would switch to using RUST and end it's amazing reputation and compatibility.

#407 will address your issue when I no longer make it an Apprise requirement. But the tradeoff will be that those who don't install it will lose access to the small subset of plugins that use it.

The other thing is Apprise just requires 'a' version of cryptography. It does not require the latest versions that aren't compatible with a lot of architectures anymore.

So you could just pre-install another version prior to the introduction of RUST and you containers should work fine.

@lardbit
Copy link
Author

lardbit commented Nov 10, 2021

Thanks for that explanation. I pinned cryptography<3.4 and that worked on the arm builds. Now I'll see if I can resolve the Slack notification preview issue. Almost there...

@lardbit
Copy link
Author

lardbit commented Nov 11, 2021

Ok, nefarious officially uses Apprise for it's notifications! Thanks for helping me work through it.

Implementation: lardbit/nefarious#151

I ended up pinning apprise at apprise==0.9.3 to resolve the slack notification preview issues I encountered. I think the recent updates to the slack plugin are causing the problem, but I can't necessarily prove it. It definitely works as expected with 0.9.3.

And I pinned cryptography<3.4 for the multi-arch non-rust workaround.

All said, it's working great. Thanks again.

image

@lardbit lardbit closed this as completed Nov 11, 2021
@caronc
Copy link
Owner

caronc commented Nov 11, 2021

This is good to know.. I'll check out that version and potentially roll back the differences

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants