Broken events in ownCloud calendar

Suddenly the synchronization with the ownCloud calendar stopped working. It gave me a strange message in the logs:

{“reqId”:”epU4rqrz1maFuP9hBxmu”,”remoteAddr”:”″,”app”:”calendar”,”message”:”Event (20150807T141714Z-27435_7a94261e27f2b60.ics) contains invalid data: End of document reached prematurely”,”level”:2,”time”:”2015-09-03T06:00:26+00:00″}

The interesting part here is the error message that says “Event contains invalid data: End of document reached prematurely”. Looking around I found out that there are some reports of broken VCalendar events stored in the database. So, using the mighty SQL statement

mysql -u owncloud -p ownclouddb -e “SELECT * FROM oc_clndr_objects WHERE calendardata NOT LIKE ‘%END:VCALENDAR%’;”

I found that the database contains 218 events without a closing END:VCALENDAR statement. All of the events were for the same event that I created recently mercilessly duplicated. And the event was not showing on the calendar, of course.

As soon as I deleted all of those broken entries from the database, everything came back to normal. Sync works again. My guess for the reason? Graphical smileys in the title. Try to stick to the pure ASCII there next time, I guess.… -->

continue reading →

ownCloud: “Archives of type inode/x-empty are not supported”

I came across a strange problem while trying to install Mozilla Sync app on my ownCloud server. The application installation on ownCloud fails with a cryptic message:

Archives of type inode/x-empty are not supported

First things first, I tried to look it up and I found a few mentions of this problem on forums but no useful answers. The problem did not seem to have a direct solution, so I thought I would have a quick look myself.

The log file is actually much more informative:

…”copy( failed to open stream: no suitable wrapper could be found at …/private/installer.php#72″,…

After some head-scratching I realized that this means the script is trying to fopen a URL with the app to download. Ah, but fopen is, of course, disabled for security reasons, so ownCloud will not be able to use it. That is what that “no suitable wrapper” means: php fails to load a file from a remote host because there is no way to do that. Simple.

So the fix for that is a manual install. There you go.… -->

continue reading →