Repository navigation
Duplicate log messages in browser after first js refresh #1271
Copy link
Copy link
Closed
Labels
Description
Steps to reproduce
- Open https://nextcloud.server.example.org/settings/admin/logging
- Wait for a few seconds until the log gets refreshed
Expected behaviour
The same log messages as before the refresh should be shown (plus potentially new ones).
Actual behaviour
A few log messages are shown as duplicates. The latest and older log messages are shown properly. Checking the log file directly or using occ log:tail lists the log entries properly.
Screenshot
Server configuration
Operating system:
Debian 12 bookworm
Web server:
nginx/1.22.1
Database:
mariadb Ver 15.1 Distrib 10.11.6-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper
PHP version:
PHP 8.2.18 (cli) (built: Apr 11 2024 22:07:45) (NTS)
Nextcloud version:
29.0.2
Where did you install Nextcloud from:
List of activated apps:
Enabled:
- activity: 2.21.1
- admin_audit: 1.19.0
- bookmarks: 14.1.2
- bruteforcesettings: 2.9.0
- calendar: 4.7.6
- circles: 29.0.0-dev
- cloud_federation_api: 1.12.0
- collectives: 2.11.0
- comments: 1.19.0
- contacts: 6.0.0
- contactsinteraction: 1.10.0
- dav: 1.30.1
- drawio: 3.0.2
- federatedfilesharing: 1.19.0
- federation: 1.19.0
- files: 2.1.0
- files_downloadlimit: 2.0.0
- files_external: 1.21.0
- files_markdown: 2.4.1
- files_pdfviewer: 2.10.0
- files_reminders: 1.2.0
- files_sharing: 1.21.0
- files_trashbin: 1.19.0
- files_versions: 1.22.0
- firstrunwizard: 2.18.0
- gpxpod: 5.0.18
- groupfolders: 17.0.0
- impersonate: 1.16.0
- logreader: 2.14.0
- lookup_server_connector: 1.17.0
- nextcloud_announcements: 1.18.0
- notes: 4.10.0
- notifications: 2.17.0
- oauth2: 1.17.0
- password_policy: 1.19.0
- photos: 2.5.0
- polls: 7.0.3
- privacy: 1.13.0
- provisioning_api: 1.19.0
- recommendations: 2.1.0
- related_resources: 1.4.0
- richdocuments: 8.4.2
- richdocumentscode: 24.4.201
- serverinfo: 1.19.0
- settings: 1.12.0
- sharebymail: 1.19.0
- spreed: 19.0.1
- support: 1.12.0
- survey_client: 1.17.0
- systemtags: 1.19.0
- text: 3.10.0
- theming: 2.4.0
- twofactor_backupcodes: 1.18.0
- twofactor_totp: 11.0.0-dev
- twofactor_webauthn: 1.4.0
- updatenotification: 1.19.1
- user_status: 1.9.0
- viewer: 2.3.0
- weather_status: 1.9.0
- workflowengine: 2.11.0
Disabled:
- dashboard: 7.9.0 (installed 7.0.0)
- encryption: 2.17.0 (installed 2.5.0)
- suspicious_login: 7.0.0 (installed 4.3.0)
- user_ldap: 1.20.0
Nextcloud configuration:
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"***REMOVED SENSITIVE VALUE***"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "29.0.2.2",
"overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauthtype": "LOGIN",
"mail_smtpauth": 1,
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "587",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"memcache.local": "\\OC\\Memcache\\APCu",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379,
"timeout": 1.5,
"password": "***REMOVED SENSITIVE VALUE***",
"dbindex": 0
},
"memcache.locking": "\\OC\\Memcache\\Redis",
"maintenance": false,
"theme": "",
"log_type": "file",
"logfile": "\/var\/log\/nextcloud\/nextcloud.log",
"loglevel": 2,
"logtimezone": "Europe\/Berlin",
"updater.release.channel": "stable",
"app_install_overwrite": [
"calendar",
"groupfolders",
"ojsxc",
"richdocuments",
"richdocumentscode",
"gpxpod",
"video_converter",
"files_markdown",
"impersonate",
"drawio"
],
"debug": false,
"default_phone_region": "de",
"mail_sendmailmode": "smtp",
"maintenance_window_start": 1,
"trashbin_retention_obligation": "auto, 30",
"enable_previews": true,
"enabledPreviewProviders": [
"OC\\Preview\\PNG",
"OC\\Preview\\JPEG",
"OC\\Preview\\GIF",
"OC\\Preview\\HEIC",
"OC\\Preview\\BMP",
"OC\\Preview\\XBitmap",
"OC\\Preview\\MP3",
"OC\\Preview\\TXT",
"OC\\Preview\\MarkDown",
"OC\\Preview\\OpenDocument",
"OC\\Preview\\Krita",
"OC\\Preview\\TIFF"
]
}
}
Client configuration
Browser:
Firefox 126.0.1
Operating system:
macOS 14.5
Logs
Nextcloud log (data/owncloud.log)
No relevant log entries.
Browser log
No relevant log entries.
Reactions are currently unavailable
Activity
dkadioglu commentedon Sep 27, 2024
gaudryc commentedon Jun 25, 2025
This issue stems from this commit: 32f93c2
Subsequent commits do not resolve anything.
On my Nextcloud 29, 30, and 31 servers, I overwrite the LogIterator class with the one from the latest stable version 28 (with a block size set to 8192).
gaudryc commentedon Jun 25, 2025
Using the original LogIterator class (stable29), it is confirmed on a fresh install of Nextcloud 29.0.16.4 running on PHP8.3.21:
gaudryc commentedon Jun 25, 2025
Using the original LogIterator class (stable31), it is confirmed on a fresh install of Nextcloud 31.0.6 running on PHP8.3.21:
gaudryc commentedon Jun 25, 2025
It is the same with Nextcloud 30.0.12.
In fact it depends on the nextcloud.log file size.
By example, to get the previous sreenshots (with Nextcloud 31), I have deleted one line in the log file.
When the log file size is 19501 bytes (5 lines), everything is good, the refresh does not refresh anything.
When the log file size is 17291 bytes (4 lines), the first refresh duplicates old lines but the latest.
muchachagrande commentedon Aug 6, 2025
muchachagrande commentedon Nov 7, 2025
elliotjm64 commentedon Dec 7, 2025
camouflage81 commentedon Dec 8, 2025
Antreesy commentedon Dec 8, 2025
Potential fix is in #1845
Mentioned there workaround for PHP should also work, appreciate if someone could give it a try and see, whether that resolves the issue
scharmach commentedon Dec 18, 2025
@Antreesy Updated to Nextcloud 32.0.3 a couple of days ago. Unfortunately, the issue is still not fixed, at least for me.
Here's my log directly after opening it:
And here it is after only a few seconds, with then duplicated entries:
Antreesy commentedon Dec 18, 2025
Thanks for reporting @scharmach
Would you mind to show, what's happening on Network tab for you?
scharmach commentedon Dec 19, 2025
Sure, @Antreesy. This is when I first opened the logs:
And this is after the entries got duplicated, which happened instantly when the
poll?=lastReqId-request popped up:Antreesy commentedon Dec 19, 2025
If I understood it correctly, and you have required access to your instance, you can try to modify
apps/logreader/LogController.phpdirectly to comment or remove this line:From the test, it looks like function returns the second last item and not the last one
scharmach commentedon Dec 20, 2025
@Antreesy Indeed, this must be where this issue is located. Commented the line out, and the entries are not duplicating any more.
Here's also a screenshot, the function returns the last item now:
gaudryc commentedon Jan 7, 2026
Hello,
I can confirm that applying the patch #1859 to LogReader for Nextcloud versions 31.0.12 and 32.0.3 successfully fixes this duplication issue. Without this specific patch, the problem persists.
Regards,
Chris