nextcloud / nextcloud/server

[Bug]: EofException trying to subscribe to an ICS

Open
#55,987 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 31-feedback bug feature: caldav
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

I'm trying to add a calendar from a link. I can download the ICS and it validates. I can add it to other calendar apps (such as Thunderbird) without a problem. I can even subscribe in earlier versions of NC (Calendar 4.7.6 on NC 26.0.13 works fine). But on the latest versions, calendar 5.5.7 on NC 31.0.9 I see this in the logs: "EofException End of document reached prematurely" and the calendar items do not appear.

Steps to reproduce
  1. In the calendar app, click the + button.
  2. Select "New subscription from link (read-only)
  3. Paste the URL and click the ->
  4. New calendar appears in the Calendars list, but no items appear
  5. Observe the EofException in the logs.
Expected behavior

Expect calendar would load and the items would appear.

Nextcloud Server version

31

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.4

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report
{
    "system": {
        "apps_paths": [
            {
                "path": "\/snap\/nextcloud\/current\/htdocs\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/snap\/nextcloud\/current\/nextcloud\/extra-apps",
                "url": "\/extra-apps",
                "writable": true
            }
        ],
        "supportedDatabases": [
            "mysql"
        ],
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0
        },
        "log_type": "file",
        "logfile": "\/var\/snap\/nextcloud\/current\/logs\/nextcloud.log",
        "logfilemode": 416,
        "maintenance_window_start": 1,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.pardi.net"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "31.0.9.1",
        "overwrite.cli.url": "https:\/\/cloud.pardi.net",
        "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_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauth": true,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "loglevel": 2,
        "theme": "",
        "app_install_overwrite": []
    }
}
List of activated Apps
Enabled:
  - activity: 4.0.0
  - app_api: 5.0.2
  - bruteforcesettings: 4.0.0
  - calendar: 5.5.7
  - circles: 31.0.0
  - cloud_federation_api: 1.14.0
  - comments: 1.21.0
  - contacts: 7.3.4
  - contactsinteraction: 1.12.0
  - dashboard: 7.11.0
  - dav: 1.33.0
  - documentserver_community: 0.2.0
  - federatedfilesharing: 1.21.0
  - federation: 1.21.0
  - files: 2.3.1
  - files_downloadlimit: 4.0.0
  - files_external: 1.23.0
  - files_pdfviewer: 4.0.0
  - files_reminders: 1.4.0
  - files_sharing: 1.23.1
  - files_trashbin: 1.21.0
  - files_versions: 1.24.0
  - firstrunwizard: 4.0.0
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - mail: 5.5.11
  - nextcloud_announcements: 3.0.0
  - notes: 4.12.3
  - notifications: 4.0.0
  - oauth2: 1.19.1
  - onlyoffice: 9.11.0
  - password_policy: 3.0.0
  - photos: 4.0.0
  - privacy: 3.0.0
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - recommendations: 4.0.0
  - related_resources: 2.0.0
  - settings: 1.14.0
  - sharebymail: 1.21.0
  - smb_test: 0.3.12
  - spreed: 21.1.5
  - support: 3.0.0
  - survey_client: 3.0.0
  - systemtags: 1.21.1
  - tasks: 0.17.0
  - text: 5.0.0
  - theming: 2.6.1
  - twofactor_backupcodes: 1.20.0
  - user_status: 1.11.0
  - viewer: 4.0.0
  - weather_status: 1.11.0
  - webhook_listeners: 1.2.0
  - workflowengine: 2.13.0
Disabled:
  - admin_audit: 1.21.0
  - deck: 1.15.3 (installed 1.15.3)
  - encryption: 2.19.0
  - fileslibreofficeedit: 2.0.1 (installed 2.0.1)
  - integration_onedrive: 3.4.0 (installed 3.4.0)
  - officeonline: 3.1.0 (installed 3.1.0)
  - serverinfo: 3.0.0 (installed 3.0.0)
  - suspicious_login: 9.0.1
  - twofactor_nextcloud_notification: 5.0.0
  - twofactor_totp: 13.0.0-dev.0
  - user_ldap: 1.22.0
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
{"reqId":"Qzm2Kh6DjHmg8uEgRgSj","level":2,"time":"2025-10-24T12:07:54+00:00","remoteAddr":"","user":"--","app":"dav","method":"","url":"--","message":"Subscription 47 could not be parsed","userAgent":"--","version":"31.0.9.1","exception":{"Exception":"Sabre\\VObject\\EofException","Message":"End of document reached prematurely","Code":0,"Trace":[{"file":"/snap/nextcloud/50464/htdocs/3rdparty/sabre/vobject/lib/Parser/MimeDir.php","line":150,"function":"readLine","class":"Sabre\\VObject\\Parser\\MimeDir","type":"->"},{"file":"/snap/nextcloud/50464/htdocs/3rdparty/sabre/vobject/lib/Parser/MimeDir.php","line":96,"function":"parseDocument","class":"Sabre\\VObject\\Parser\\MimeDir","type":"->"},{"file":"/snap/nextcloud/50464/htdocs/3rdparty/sabre/vobject/lib/Reader.php","line":47,"function":"parse","class":"Sabre\\VObject\\Parser\\MimeDir","type":"->"},{"file":"/snap/nextcloud/50464/htdocs/apps/dav/lib/CalDAV/WebcalCaching/Connection.php","line":108,"function":"read","class":"Sabre\\VObject\\Reader","type":"::"},{"file":"/snap/nextcloud/50464/htdocs/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php","line":61,"function":"queryWebcalFeed","class":"OCA\\DAV\\CalDAV\\WebcalCaching\\Connection","type":"->"},{"file":"/snap/nextcloud/50464/htdocs/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php","line":73,"function":"refreshSubscription","class":"OCA\\DAV\\CalDAV\\WebcalCaching\\RefreshWebcalService","type":"->"},{"file":"/snap/nextcloud/50464/htdocs/lib/public/BackgroundJob/Job.php","line":61,"function":"run","class":"OCA\\DAV\\BackgroundJob\\RefreshWebcalJob","type":"->"},{"file":"/snap/nextcloud/50464/htdocs/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php","line":66,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/snap/nextcloud/50464/htdocs/lib/public/BackgroundJob/Job.php","line":46,"function":"start","class":"OCA\\DAV\\BackgroundJob\\RefreshWebcalJob","type":"->"},{"file":"/snap/nextcloud/50464/htdocs/cron.php","line":170,"function":"execute","class":"OCP\\BackgroundJob\\Job","type":"->"}],"File":"/snap/nextcloud/50464/htdocs/3rdparty/sabre/vobject/lib/Parser/MimeDir.php","Line":294,"message":"Subscription 47 could not be parsed","exception":[],"CustomMessage":"Subscription 47 could not be parsed"},"id":"68fb6c2474497"}
Additional info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at apps/dav/lib/CalDAV/WebcalCaching/Connection.php:108 and follow RefreshWebcalService.php and RefreshWebcalJob.php, using the reported subscription and its EofException as the reproduction. Compare the fetched ICS with the parsing path. Done means the subscription parses during refresh and its calendar items appear without the logged exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.