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

[Nextcloud] Does not work in version 21 #371

Closed
alSeveR opened this issue Mar 19, 2021 · 5 comments
Closed

[Nextcloud] Does not work in version 21 #371

alSeveR opened this issue Mar 19, 2021 · 5 comments

Comments

@alSeveR
Copy link

alSeveR commented Mar 19, 2021

📣 Notification Service(s) Impacted
Nextcloud 21

🪲 Describe the bug
It seems to connect, but the notification does not appear.

💻 Your System Details:

  • OS: Ubuntu 18.04 and Archlinux
  • Python Version: 3.6.9 and 3.9.2

🔮 Additional context
The same code works correctly in version 20.

@alSeveR alSeveR added the bug label Mar 19, 2021
@caronc
Copy link
Owner

caronc commented Mar 26, 2021

Hi,

There isn't a whole lot that changed in this service int he past 8 months. Can you provide me an example URL that you have that used to work (that doesn't now)? Please don't provide any secret/password information, but I'm wonder if it's just the URL's structure that is failing you?

What kind of error message are you getting?

@alSeveR
Copy link
Author

alSeveR commented Apr 1, 2021

Hi,
I don't get any error messages. The user simply does not receive the notification.

#!/usr/bin/python
import apprise

def notificar(cfg, user, title, body):
    if cfg['url'].startswith('https://'):
        apobj = apprise.Apprise()
        apobj.add('nclouds://{}:{}@{}/{}'.format(cfg['admin_user'], cfg['token'], cfg['url'][8:], user))
        apobj.notify(
            body = body,
            title = title,
            )

Thanks.

@caronc
Copy link
Owner

caronc commented May 2, 2021

Could you provide me with some logging of what is going on? Since you're coding this yourself, you can capture the logs like so:

import apprise

apobj = apprise.Apprise()
apobj.add('nclouds://{}:{}@{}/{}'.format(cfg['admin_user'], cfg['token'], cfg['url'][8:], user))

# Prepare a LogCapture() that sets logging to DEBUG
with apprise.LogCapture(level=apprise.logging.DEBUG) as output:
    # Send our notification
    apobj.notify(title="hello", body="world")

    # At this point of our code, we can have a look at our output
    # to see all of the logging that surrounded our notification(s)
    # Note that `output` is a StringIO object:
    print(output.getvalue())

See here for some more details.

Hopefully the output will shed a bit more light on the error you're getting. At this time my trial for NextCloud has long expired. But I will email them and see if i can have it temporarily re-instated. Or just have a new trial period to help debug the situation. But we can also use your existing account too to resolve this together..

Keep me posted

@alSeveR
Copy link
Author

alSeveR commented May 3, 2021

I think it's probably related to this: nextcloud/notifications#877
I haven't tested the PR where they fix that, but it will be included in the next version of Nextcloud (21.0.2) which, according to this, will be available on the 20th of this month. When the update is released, I will test and confirm if it is resolved.

Thanks for your work.

@caronc
Copy link
Owner

caronc commented May 9, 2021

I had a chance to follow all of the links you provided. You definitely hit the nail on the head here. I also see they reversed the /api change they made to how it was before, so things should fix in their next version for sure!

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

No branches or pull requests

2 participants