-
Notifications
You must be signed in to change notification settings - Fork 56
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
Admin notifications via api not working since nextcloud 21 #877
Comments
There should be an error in your log? |
Logs do not show any message. |
Ah, in your url replace |
Just tried it and same errors, nothing in logs and 404 return code. I have a script in my home automation system that send notifications using |
okay after checking again admin_notifications is right. not sure why you get a 404 though. there should be something in your nextcloud.log or apache access/error log, of the notifications app is disabled. |
Ok, if admin notifications are working with nextcloud 21, I will enable debugging and look deeper at the logs. |
@fracarvic Were you able to resolve your issue? I'm experiencing the same response with the exact REST API call with Nextcloud 21. I didn't have prior experience with older versions of Nextcloud, and if you resolved it, I would like to know. |
No, i can't solve it. I didn't see any relevant in logs. I upgrade to 21 (official docker hub image) and it doesn't work either. |
I'm also running Nextcloud 21 in Docker (Ubuntu Server). Do you have an option to reopen this issue? I think Nick closed it by mistake. |
I dont have the option to reopen the issue. Maybe the problem does not occur in normal installs, only with docker, I don't know. |
I'll retry tomorrow |
Arg, sorry about this. I thought we have integration tests for this and my local installation only uses the occ command, so it worked for me. Turns out we didnt and the route was defined in another apps namespace which we prevent since 21. I made a PR at #928 you will have to patch it or wait for 21.0.2 and you also need to use a different URL now. |
Yeah, I manually patch routes.php and i'ts working using modified url. Thanks. |
So I've been waiting for 21.0.2 to release and now I wanted to try again, but I still get 404. This is the exact command I'm using: |
No, your url is slightly wrong. Its
But you have
|
Ah I got the version wrong. Sorry! |
Steps to reproduce
curl -H "OCS-APIREQUEST: true" -X POST https://admin:[email protected]/ocs/v2.php/apps/admin_notifications/api/v1/notifications/admin -d "shortMessage=short" -d "longMessage=long"
Expected behaviour
Return code 200 and notification sent.
Actual behaviour
Return code 404
This seems to happen to me since upgrading to nextcloud 21, in previous versions admin notificacions was working perfectly.
Notificacions via occ notification:generate are working ok.
Server configuration
Operating system:
kubernetes (kubeadm) node on Ubuntu server 20.10
Web server:
Apache/2.4.38 (Debian)
Database:
MariaDB 10.5.6
PHP version:
PHP/7.4.15
Nextcloud version: (see Nextcloud admin page)
21.0.0
Where did you install Nextcloud from:
Official docker image 21.0.0-apache
Signing status:
List of activated apps:
Nextcloud configuration:
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
user_saml
The text was updated successfully, but these errors were encountered: