Troubleshooting
This is a brief list of common issues that come up with NextCloud News.
My browser shows a mixed content warning (Connection is Not Secure)
If you are serving your Nextcloud over HTTPS your browser will very likely warn you with a yellow warnings sign about your connection not being secure.
- Chrome will show no green HTTPS lock sign.
- Firefox will show you the following image Mixed Passive Content

Note that this warning is not red and won't block the page like the following images which signal a serious issue:
- Chrome

- Firefox

What is the cause of the (yellow) error message?
This warning is caused by mixed passive content and means that your page loads passive resources from non HTTPS resources, such as:
- Images
- Video/Audio
- Some Ads
This allows a possible attacker to perform a MITM (man-in-the-middle) attack by serving you different images or audio/video.
Why doesn't the News app fix it?
The News app fully prevents mixed active content by only allowing HTTPS iframes from known locations; other possible mixed active content elements such as <script\> are stripped from the feed. Because images and audio/video are an integral part of a feed, we can not simply strip them.
Since an attacker can not execute code in contrast to mixed active content, but only replace images/audio/video in your feed reader, this is not considered to be a security issue. If, for whatever reason (e.g. feed which would allow fishing), this is a security problem for you, contact the specific feed provider and ask him to serve his feed content over HTTPS.
Why don't you simply use an HTTPS image/audio/video proxy?
For the same reason that we can't fix non HTTPS websites: It does not fix the underlying issue, but only silences it. If you are using an image HTTPS proxy, an attacker can simply attack your image proxy since the proxy fetches insecure content. Even worse: if your image proxy serves these images from the same domain as your Nextcloud installation, you are vulnerable to XSS via SVG images. In addition, people feel safe when essentially they are not.
Since most people don't understand mixed content and don't have two domains and a standalone server for the image proxy, it is very likely they will choose to host it under the same domain.
Because we care about our users' security and don't want to hide security warnings, we won't fix (aka silence) this issue.
The only fix for this issue is that feed providers serve their content over HTTPS.
I am getting: Exception: Some\Class does not exist errors in my nextcloud.log
This is very often caused by missing or old files, e.g. by failing to upload all the News app files or errors during installation. Before you report a bug, please recheck if all files from the archive are in place and accessible.
Old Items show up in the feed
News does not use the publication date to decide whether an item is new. When a
feed is added, News downloads the feed file and stores all items it contains.
During an update it sends the stored If-Modified-Since value, if available. A
feed server can answer with 304 Not Modified; otherwise News parses every item
in the returned feed file again, including items with an older publication date.
Most feeds only return their newest entries, but this is not required.
News identifies an existing item by its GUID within the feed. If the feed does not provide a GUID, News uses the item URL instead. For an item that still has a database record, News keeps its starred state and handles its read state according to the feed's update mode. The default Keep read status on update keeps an already-read item read when its content changes. Alternatively, Mark as unread on update makes a changed item unread again. A changed GUID is a different item, so the update mode does not apply and News treats it as new. Well-behaved feeds use stable GUIDs, so parsing an old entry again normally updates nothing.
An older item can appear as new when:
- The feed reuses items without stable GUIDs, or changes their GUIDs or URLs.
- The old database item was removed by auto purging and the feed now includes it again.
- An existing item's content changed and the feed is configured to Mark as unread on update.
- The feed is not a normal rolling news feed. It may return a complete archive, a changing historical selection, or old database records selected by the publisher.
Some feeds contain hundreds of historical items with stable GUIDs. This is not an error by itself: News processes all entries the publisher returns, regardless of their age.
Debug an affected feed
The following commands require an administrator with shell access. Replace
www-data, USER, and FEED_ID with the HTTP server user, Nextcloud user ID,
and News feed ID. You can find the feed ID and URL with:
Temporarily enable Nextcloud debug logging. Note the previous value and restore it afterwards because debug logging is verbose and may contain sensitive information.
sudo -u www-data php ./occ config:system:get loglevel
sudo -u www-data php ./occ config:system:set loglevel --value=0 --type=integer
sudo -u www-data php ./occ news:updater:update-feed USER FEED_ID
Check data/nextcloud.log for the feed URL around the time of the update.
Messages include the number of parsed items, items that News considered for
insertion or update, and a debug message when an item has no GUID and its URL is
used instead. If the log says that the next update time was not reached, no
feed download took place; wait for the scheduled update instead.
Compare the affected item's GUID in the source feed with its stored values:
If the GUID or URL changed, provide the feed URL and the old and new item IDs to the feed publisher. News treats a changed GUID as a new item. If the GUID stayed the same but the item content changed, use the Mark as unread on update / Keep read status on update toggle to choose whether the item should become unread again. If the database no longer contains the item, check the auto-purge settings and whether the feed continues to publish items older than the purge limit. Do not re-add the feed as a workaround: News will treat its current entries as a fresh subscription.
Increasing the Maximum read count per feed can prevent this when the same GUID is returned but its database record was previously purged. The default is 200, but News automatically raises the retention floor for an individual feed to the largest number of items it has seen in one response. Increasing the global limit is therefore mainly useful for old items that remain outside the feed for a while and later return. It prevents future purging but cannot undo an earlier deletion. It also increases database usage.
If the feed returns old items that News has never stored, a larger auto-purge limit will not prevent their first appearance. Contact the publisher if the feed unexpectedly serves historical entries. There is no universal publication-date cutoff because doing so would hide valid old items from feeds that publish historical content.
Feeds not updated
Feeds can be updated using Nextcloud's system cron or an external updater via the API. The feed update is not run in Webcron and AJAX cron mode!
Validating Using System Cron
Info
This requires Nextcloud 26 or newer and News 24.0.0 or newer.
Follow this checklist:
- Check admin settings of Nextcloud, was the last cron execution ok.
- Check the logs for errors.
- Does your cache configuration work?
- Check the News admin settings, system cron is used to update news.
- You should see a info card at the top, which will tell you when the last job execution was.
- If the card is red it is very likely that the update job is stuck.
- If it is green then maybe only some feeds are failing to update, check the Nextcloud logs.
If you believe the job is stuck you can reset it. For further steps you need to use occ.
You can check again the status of the job.
(replace www-data with your httpd user)
sudo -u www-data php ./occ news:updater:job
Checking update Status
Last Execution was 2023-03-20 12:20:03 UTC
The same check that is done in the News admin settings can be done using occ too.
Adding the --check-elapsed option displays the time elapsed since the last execution,
and if it's considered too long ago, a message will be displayed, and the command returns
with exit code 2. This can be used in scripts to send an alert for example.
$ sudo -u www-data php ./occ news:updater:job --check-elapsed
Checking update Status
Last Execution was 2023-03-20 12:20:03 UTC
8 hours, 21 minutes, 20 seconds ago
Something is wrong with the news cronjob, execution delay exceeded the configured interval.
If you think the job is stuck you can reset it, this may lead to issues if the job is currently running!
sudo -u www-data php ./occ news:updater:job --reset
Checking update Status
Last Execution was 2023-03-20 12:20:03 UTC
Attempting to reset the job.
Done, job should execute on next schedule.
The output of the command should have changed.
sudo -u www-data php ./occ news:updater:job
Checking update Status
Last Execution was 1970-01-01 00:00:00 UTC
After some time has passed the timestamp should be close to the current time.
If this did not help, check the logs and open a issue or discussion on GitHub.
Using External Updater
- Check if your configuration is set to not use the system cron.
- Consult the documentation of the updater
- Check your data/nextcloud.log for errors
Database table grows too big
If your users have subscribed to some high-volume feeds where a lot of items remain unread, this can lead to an oversized news table over time. As a consequence, the database upgrade of the news app can take several hours, during which Nextcloud cannot be used.
By default, Nextcloud News purges old news items above a certain threshold each time it fetches new news items. The maximum number of items per feed that should be kept during the purging can be defined through the “Maximum read count per feed” setting in the admin UI or the autoPurgeCount value in the config. Additionally you may enable the option to also purge unread items purgeUnread. This is useful if your users have large amounts of unread items. Starred items are always exempt from purging.
The command occ news:updater:after-update [--purge-unread] [<purge-count>] can be used to manually purge old news items across the instance. With the --purge-unread option, unread items are also purged (starred items are still exempt). If purge-count is not specified, the configured autoPurgeCount is used.
The purge count only applies to the items that are purged. For example, when purging a feed that has 100 unread items, 100 starred read items and 100 unstarred read items, using a purge-count of 50 would keep all unread and starred items and the latest 50 read items. Using a purge-count of 50 along with --purge-unread would keep the all starred items plus the latest 50 from the set of unread and read items.
Missing 4-byte support SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value:
This is likely caused by your feed using emojis in the feed title or text.
The DB is then not able to store the feed and runs into strange decoding errors.
You need to convert your DB to support 4 bytes, check the Nextcloud documentation.