Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CalDav Issue, Calendar and Tasks not working #9605

Closed
Coolaswa opened this issue May 25, 2018 · 3 comments
Closed

CalDav Issue, Calendar and Tasks not working #9605

Coolaswa opened this issue May 25, 2018 · 3 comments

Comments

@Coolaswa
Copy link

Steps to reproduce

  1. Try to create a new calendar or a new task

Expected behaviour

The new item should be created and visible

Actual behaviour

Nothing gets created.

Server configuration

Operating system: FreeNAS/FreeBSD 11.1 jail

Web server: Nginx 1.14.0_3,2 with nginx reverse proxy

Database: PostgreSQL 10.3_1

PHP version: 7.2.5

Nextcloud version: 13.0.2

Updated from an older Nextcloud/ownCloud or fresh install: Fresh

Where did you install Nextcloud from: Freebsd Ports

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
sudo -u www php /usr/local/www/nextcloud/occ app:list
Enabled:
  - calendar: 1.6.1
  - dav: true
  - federatedfilesharing: true
  - files: true
  - files_external: 1.4.1
  - lookup_server_connector: true
  - notes: 2.3.2
  - oauth2: true
  - provisioning_api: true
  - tasks: 0.9.6
  - twofactor_backupcodes: true
  - workflowengine: true
Disabled:
  - activity
  - admin_audit
  - bruteforcesettings
  - comments
  - contacts
  - deck
  - drawio
  - encryption
  - external
  - federation
  - files_frommail
  - files_markdown
  - files_pdfviewer
  - files_sharing
  - files_texteditor
  - files_trashbin
  - files_versions
  - files_videoplayer
  - firstrunwizard
  - gallery
  - logreader
  - mindmaps
  - nextcloud_announcements
  - notifications
  - password_policy
  - qownnotesapi
  - serverinfo
  - sharebymail
  - survey_client
  - systemtags
  - theming
  - updatenotification
  - user_external
  - user_ldap

Nextcloud configuration:

Config report
sudo -u www php /usr/local/www/nextcloud/occ config:list system
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.domain.com",
            "**local IP**"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/cloud.domain.com",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "overwritehost": "cloud.domain.com",
        "htaccess.RewriteBase": "\/",
        "dbtype": "pgsql",
        "version": "13.0.2.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0
        },
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "apps_paths": [
            {
                "path": "\/usr\/local\/www\/nextcloud\/apps",
                "url": "\/apps",
                "writable": true
            },
            {
                "path": "\/usr\/local\/www\/nextcloud\/apps-pkg",
                "url": "\/apps-pkg",
                "writable": false
            }
        ]
    }
}

Are you using external storage, if yes which one: Local

Are you using encryption: No

Are you using an external user-backend, if yes which one: No

Client configuration

Browser: Firefox 60.0

Operating system: Arch linux

Logs

Web server error log

Web server error log
No recent issues

Nextcloud log (data/nextcloud.log)

Nextcloud log
{"reqId":"CPaVcJpng42xmHJO6pfL","level":4,"time":"2018-05-25T09:58:26+00:00","remoteAddr":"192.168.0.83","user":"admin","app":"webdav","method":"MKCALENDAR","url":"\/remote.php\/dav\/calendars\/admin\/sdfs\/","message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\TableNotFoundException\",\"Message\":\"An exception occurred while executing 'SELECT \\\"displayname\\\", \\\"description\\\", \\\"timezone\\\", \\\"calendarorder\\\", \\\"calendarcolor\\\", \\\"id\\\", \\\"uri\\\", \\\"synctoken\\\", \\\"components\\\", \\\"principaluri\\\", \\\"transparent\\\" FROM \\\"oc_calendars\\\" WHERE \\\"principaluri\\\" = ? ORDER BY \\\"calendarorder\\\" ASC' with params [\\\"principals\\\\\\\/users\\\\\\\/admin\\\"]:\\n\\nSQLSTATE[42P01]: Undefined table: 7 ERROR:  relation \\\"oc_calendars\\\" does not exist\\nLINE 1: ... \\\"components\\\", \\\"principaluri\\\", \\\"transparent\\\" FROM \\\"oc_calend...\\n                                                             ^\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/local\\\/www\\\/nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(128): Doctrine\\\\DBAL\\\\Driver\\\\AbstractPostgreSQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\/usr\\\/local\\\/www\\\/nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(855): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOPgSql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'SELECT \\\"display...', Array)\\n#2 \\\/usr\\\/local\\\/www\\\/nextcloud\\\/lib\\\/private\\\/DB\\\/Connection.php(195): Doctrine\\\\DBAL\\\\Connection->executeQuery('SELECT \\\"display...', Array, Array, NULL)\\n#3 \\\/usr\\\/local\\\/www\\\/nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Query\\\/QueryBuilder.php(206): OC\\\\DB\\\\Connection->executeQuery('SELECT \\\"display...', Array, Array)\\n#4 \\\/usr\\\/local\\\/www\\\/nextcloud\\\/lib\\\/private\\\/DB\\\/QueryBuilder\\\/QueryBuilder.php(214): Doctrine\\\\DBAL\\\\Query\\\\QueryBuilder->execute()\\n#5 \\\/usr\\\/local\\\/www\\\/nextcloud\\\/apps-pkg\\\/dav\\\/lib\\\/CalDAV\\\/CalDavBackend.php(264): OC\\\\DB\\\\QueryBuilder\\\\QueryBuilder->execute()\\n#6 \\\/usr\\\/local\\\/www\\\/nextcloud\\\/apps-pkg\\\/dav\\\/lib\\\/CalDAV\\\/CalendarHome.php(118): OCA\\\\DAV\\\\CalDAV\\\\CalDavBackend->getCalendarsForUser('principals\\\/user...')\\n#7 \\\/usr\\\/local\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/CalDAV\\\/CalendarHome.php(181): OCA\\\\DAV\\\\CalDAV\\\\CalendarHome->getChild('sdfs')\\n#8 \\\/usr\\\/local\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Tree.php(105): Sabre\\\\CalDAV\\\\CalendarHome->childExists('sdfs')\\n#9 \\\/usr\\\/local\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAVACL\\\/Plugin.php(878): Sabre\\\\DAV\\\\Tree->nodeExists('calendars\\\/admin...')\\n#10 [internal function]: Sabre\\\\DAVACL\\\\Plugin->beforeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#11 \\\/usr\\\/local\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#12 \\\/usr\\\/local\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(466): Sabre\\\\Event\\\\EventEmitter->emit('beforeMethod', Array)\\n#13 \\\/usr\\\/local\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#14 \\\/usr\\\/local\\\/www\\\/nextcloud\\\/apps-pkg\\\/dav\\\/lib\\\/Server.php(283): Sabre\\\\DAV\\\\Server->exec()\\n#15 \\\/usr\\\/local\\\/www\\\/nextcloud\\\/apps-pkg\\\/dav\\\/appinfo\\\/v2\\\/remote.php(35): OCA\\\\DAV\\\\Server->exec()\\n#16 \\\/usr\\\/local\\\/www\\\/nextcloud\\\/remote.php(164): require_once('\\\/usr\\\/local\\\/www\\\/...')\\n#17 {main}\",\"File\":\"\\\/usr\\\/local\\\/www\\\/nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractPostgreSQLDriver.php\",\"Line\":76}","userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:60.0) Gecko\/20100101 Firefox\/60.0","version":"13.0.2.1"}

Browser log

Browser log
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src”). Source: ondrop attribute on INPUT element.                                                    tasks
uncaught exception: CalDAV client could not be initialized - Querying calendars failed`

Error: Loading calendars failed
app.min.js:3:25164
Source map error: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Resource URL: https://cloud.domain.com/apps/calendar/js/public/app.min.js?v=cf7ce964
Source Map URL: app.min.js.map[Learn More]
Error: Creating a calendar failed

Thanks in advance for any help

@Coolaswa
Copy link
Author

Coolaswa commented Jun 1, 2018

Would it be wise to change the database to MySQL/MariaDB?

@Coolaswa
Copy link
Author

Coolaswa commented Jun 3, 2018

Okay, I changed the database to MariaDB, still same errors. There is indeed no oc_calendars present in nextcloud database.

@Coolaswa
Copy link
Author

Coolaswa commented Jun 7, 2018

Oh boy, it seems to be fixed. This is apparently FreeBSD related. Found the solution here: https://help.nextcloud.com/t/freebsd-an-exception-occurred-while-executing-insert-into-oc-calendars/30574

This can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant