[Bug]: `Parse error: Invalid Mimedir file`
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
When ai try to accept some events(mostly coming from Outlook) i get an error and i can't accept it.
logs shows:
"This resource only supports valid iCalendar 2.0 data. Parse error: Invalid Mimedir file. Line starting at 40 did not follow iCalendar/vCard conventions"
Steps to reproduce
1.Someone with outlook send a meeting
2.I try to accept with Thunderbid and fails
Expected behavior
Accept the meet and see it in the NC calendar.
Installation method
Community Manual installation with Archive
Nextcloud Server version
28
Operating system
Debian/Ubuntu
Nextcloud Logs
{"reqId":"ANScfS8F8UcrDZFDrIHM","level":3,"time":"2024-05-29T19:26:31+00:00","remoteAddr":"172.x.x.x","user":"admin","app":"webdav","method":"PUT","url":"/remote.php/dav/calendars/admin/personal/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.ics","message":"This resource only supports valid iCalendar 2.0 data. Parse error: Invalid Mimedir file. Line starting at 40 did not follow iCalendar/vCard conventions","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:115.0) Gecko/20100101 Thunderbird/115.10.1","version":"28.0.6.1","exception":{"Exception":"Sabre\\DAV\\Exception\\UnsupportedMediaType","Message":"This resource only supports valid iCalendar 2.0 data. Parse error: Invalid Mimedir file. Line starting at 40 did not follow iCalendar/vCard conventions","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Plugin.php","line":766,"function":"validateICalendar","class":"Sabre\\CalDAV\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeCreateFile","class":"Sabre\\CalDAV\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1094,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":373,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":172,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Plugin.php","Line":806,"message":"This resource only supports valid iCalendar 2.0 data. Parse error: Invalid Mimedir file. Line starting at 40 did not follow iCalendar/vCard conventions","exception":{},"CustomMessage":"This resource only supports valid iCalendar 2.0 data. Parse error: Invalid Mimedir file. Line starting at 40 did not follow iCalendar/vCard conventions"}}
Additional info
This happens for example when the ICS file have an "_" in some parameter most of the time is: X-ENTOURAGE_UUID
I found this closed thread but still happens: https://github.com/nextcloud/server/issues/16679
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the validation path in 3rdparty/sabre/dav/lib/CalDAV/Plugin.php, especially validateICalendar, and the DAV entry points named in the trace. Reproduce the failure with an Outlook-generated ICS file containing the reported X-ENTOURAGE_UUID parameter and inspect line 40. Done means the meeting can be accepted through Thunderbird and appears in the Nextcloud calendar without the invalid Mimedir error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100