Skip to content

UpdaterJob fails with TypeError Exception #3129

@y3n4

Description

@y3n4

IMPORTANT

Read and tick the following checkbox after you have created the issue or place an x inside the brackets ;)

  • I have read the CONTRIBUTING.md and followed the provided tips
  • I accept that the issue will be closed without comment if I do not check here
  • I accept that the issue will be closed without comment if I do not fill out all items in the issue template.

Explain the Problem

Users reported that the news app fould not fetch new articles of subscribed blogs.

A look into the logs revealed that the UpdaterJob has failed for every run at least the last month:

Contents of nextcloud/data/nextcloud.log
{
  "Exception": "TypeError",
  "Message": "FeedIo\\Reader\\Document0:0:0:0:0:0:0:0loadJsonAsArray(): Return value must be of type array, null returned",
  "Code": 0,
  "Trace": [
    {
      "file": "/var/www/cloud/nextcloud-30.0.6/apps/news/vendor/debril/feed-io/src/FeedIo/Reader/Document.php",
      "line": 51,
      "function": "loadJsonAsArray",
      "class": "FeedIo\\Reader\\Document",
      "type": "->"
    },
    {
      "file": "/var/www/cloud/nextcloud-30.0.6/apps/news/vendor/debril/feed-io/src/FeedIo/Parser/JsonParser.php",
      "line": 47,
      "function": "getJsonAsArray",
      "class": "FeedIo\\Reader\\Document",
      "type": "->"
    },
    {
      "file": "/var/www/cloud/nextcloud-30.0.6/apps/news/vendor/debril/feed-io/src/FeedIo/ParserAbstract.php",
      "line": 35,
      "function": "checkBodyStructure",
      "class": "FeedIo\\Parser\\JsonParser",
      "type": "->"
    },
    {
      "file": "/var/www/cloud/nextcloud-30.0.6/apps/news/vendor/debril/feed-io/src/FeedIo/Reader.php",
      "line": 115,
      "function": "parse",
      "class": "FeedIo\\ParserAbstract",
      "type": "->"
    },
    {
      "file": "/var/www/cloud/nextcloud-30.0.6/apps/news/vendor/debril/feed-io/src/FeedIo/Reader.php",
      "line": 97,
      "function": "parseDocument",
      "class": "FeedIo\\Reader",
      "type": "->"
    },
    {
      "file": "/var/www/cloud/nextcloud-30.0.6/apps/news/vendor/debril/feed-io/src/FeedIo/Reader.php",
      "line": 76,
      "function": "handleResponse",
      "class": "FeedIo\\Reader",
      "type": "->"
    },
    {
      "file": "/var/www/cloud/nextcloud-30.0.6/apps/news/vendor/debril/feed-io/src/FeedIo/FeedIo.php",
      "line": 126,
      "function": "read",
      "class": "FeedIo\\Reader",
      "type": "->"
    },
    {
      "file": "/var/www/cloud/nextcloud-30.0.6/apps/news/lib/Fetcher/FeedFetcher.php",
      "line": 141,
      "function": "read",
      "class": "FeedIo\\FeedIo",
      "type": "->"
    },
    {
      "file": "/var/www/cloud/nextcloud-30.0.6/apps/news/lib/Service/FeedServiceV2.php",
      "line": 320,
      "function": "fetch",
      "class": "OCA\\News\\Fetcher\\FeedFetcher",
      "type": "->"
    },
    {
      "file": "/var/www/cloud/nextcloud-30.0.6/apps/news/lib/Service/FeedServiceV2.php",
      "line": 422,
      "function": "fetch",
      "class": "OCA\\News\\Service\\FeedServiceV2",
      "type": "->"
    },
    {
      "file": "/var/www/cloud/nextcloud-30.0.6/apps/news/lib/Service/UpdaterService.php",
      "line": 63,
      "function": "fetchAll",
      "class": "OCA\\News\\Service\\FeedServiceV2",
      "type": "->"
    },
    {
      "file": "/var/www/cloud/nextcloud-30.0.6/apps/news/lib/Cron/UpdaterJob.php",
      "line": 58,
      "function": "update",
      "class": "OCA\\News\\Service\\UpdaterService",
      "type": "->",
      "args": [
        "*** sensitive parameters replaced ***"
      ]
    },
    {
      "file": "/var/www/cloud/nextcloud-30.0.6/lib/public/BackgroundJob/Job.php",
      "line": 61,
      "function": "run",
      "class": "OCA\\News\\Cron\\UpdaterJob",
      "type": "->"
    },
    {
      "file": "/var/www/cloud/nextcloud-30.0.6/lib/public/BackgroundJob/TimedJob.php",
      "line": 88,
      "function": "start",
      "class": "OCP\\BackgroundJob\\Job",
      "type": "->"
    },
    {
      "file": "/var/www/cloud/nextcloud-30.0.6/lib/public/BackgroundJob/TimedJob.php",
      "line": 75,
      "function": "start",
      "class": "OCP\\BackgroundJob\\TimedJob",
      "type": "->"
    },
    {
      "file": "/var/www/cloud/nextcloud-30.0.6/cron.php",
      "line": 162,
      "function": "execute",
      "class": "OCP\\BackgroundJob\\TimedJob",
      "type": "->"
    }
  ],
  "File": "/var/www/cloud/nextcloud-30.0.6/apps/news/vendor/debril/feed-io/src/FeedIo/Reader/Document.php",
  "Line": 89,
  "message": "Error while running background job OCA\\News\\Cron\\UpdaterJob (id: 1069944, arguments: null)",
  "exception": {},
  "CustomMessage": "Error while running background job OCA\\News\\Cron\\UpdaterJob (id: 1069944, arguments: null)"
}

Steps to Reproduce

Let cron job run

System Information

  • News app version: 25.3.1
  • Nextcloud version: 30.0.6.2
  • Cron type: system cron
  • PHP version: 8.2.28
  • Database and version: 10.11.11-MariaDB
  • Browser and version: -
  • OS and version: Debian 12

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions