Skip to content

After creating a notification using announcementcenter I can't list notifications anymore #103

Closed
owncloud/core
#28570

Description

@guruz

It worked before, i was able to list/get notifications using the client.

curl -u test -v https://.../ocs/v2.php/apps/notifications/api/v1/notifications -H 'OCS-APIREQUEST: true'

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>failure</status>
  <statuscode>200</statuscode>
  <message/>
  <totalitems></totalitems>
  <itemsperpage></itemsperpage>
 </meta>
 <data/>
</ocs>

@SamuAlfageme should have access to the owncloud.log and error.log and tell if there is something ;-)

ownCloud	10.0.2 (daily) Build:2017-07-28T03:18:45+00:00 6e481ce0e0ee75af06eed7ecf3216fed99350b59

Activity

  1. added this to the development milestone on Aug 2, 2017
  2. DeepDiver1975 commented on Aug 2, 2017

    @DeepDiver1975
    Contributor

    might be a general problem in the ocs v2 handling in core .... will investigate

  3. guruz commented on Aug 3, 2017

    @guruz
    ContributorAuthor

    @DeepDiver1975 FYI this is about the response being EMPTY, not only the 200 vs failure.
    (havent tested your patch yet if it magically fixes it anyway)

  4. DeepDiver1975 commented on Aug 3, 2017

    @DeepDiver1975
    Contributor

    FYI this is about the response being EMPTY,

    if the response is empty - then there is no notification. you need to generate a notification.
    e.g. by using #104 - this adds an occ command to generate notifications

    ./occ notifications:generate -u guruz hello "long message"
  5. guruz commented on Aug 3, 2017

    @guruz
    ContributorAuthor

    I had generated a notification (from admin) to my user using announcement center.
    Now today I suddenly get the notification in mirall and in API curl result.

    Just as if the thing only got the notificaton after I log in via webinterface or so? will test..

  6. guruz commented on Aug 3, 2017

    @guruz
    ContributorAuthor

    Aaaaaaahhh! it is done via cron, it works after manual cron invocation (hi @SamuAlfageme ;-)

  7. guruz commented on Aug 3, 2017

    @guruz
    ContributorAuthor

    @DeepDiver1975 related when i try your command:

      [Symfony\Component\Console\Exception\CommandNotFoundException]   
      There are no commands defined in the "notifications" namespace. 
    

    But there is the apps/notifications app in the directory and it's enabled obviously.
    Is that a bug?

  8. DeepDiver1975 commented on Aug 3, 2017

    @DeepDiver1975
    Contributor

    Aaaaaaahhh! it is done via cron, it works after manual cron invocation (hi @SamuAlfageme ;-)

    yes - this confuses people all the times ....

  9. DeepDiver1975 commented on Aug 3, 2017

    @DeepDiver1975
    Contributor

    But there is the apps/notifications app in the directory and it's enabled obviously.
    Is that a bug?

    the commend it there - https://github.com/owncloud/notifications/pull/104/files#diff-61f5888c7ffa138eb53ad8f8feaf5409R54

    did you switch over to this branch?

  10. guruz commented on Aug 3, 2017

    @guruz
    ContributorAuthor

    Closing as this was related to a bad cron setup

  11. guruz commented on Aug 3, 2017

    @guruz
    ContributorAuthor

    (Also looked like the Ajax cron did not work, only system cron worked. Maybe because ajax only executes one job? Or ajax only executes for another user or so.. )

  12. DeepDiver1975 commented on Aug 3, 2017

    @DeepDiver1975
    Contributor

    ajax executes only one job at a time - cron executes all at once.

    so it take a few ajax calls until all jobs are executed

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions