Collabora Online Development Edition could not be loaded

Nextcloud version (eg, 12.0.2) : 18.0.4
Operating system and version (eg, Ubuntu 17.04) : Ubuntu 16.0.4.6 LTS
Apache or nginx version (eg, Apache 2.4.25) : 2.4.18
PHP version (eg, 7.1) : 7.3.16

The issue you are facing:
when i create a new document or try to open an existing document, it take a few secodns and the i get an error that Collabora Online Developement Edition could not be loaded or opened (get this error in german)
I already tried to update to 18.0.4, but the update didnt fix my problem, and i tried to run
occ maintenence:repair but this didnt help too.

Is this the first time you’ve seen this error? (Y/N) : y

Steps to replicate it:

  1. open or create a document.odt

The output of your Nextcloud log in Admin > Logging :

{“reqId”:“AA9wUipUVF4wWu7oCWXl”,“level”:3,“time”:“2020-04-28T09:57:51+00:00”,“remoteAddr”:“172.18.18.9”,“user”:“admin”,“app”:“richdocuments”,“method”:“GET”,“url”:"/index.php/apps/richdocuments/index?fileId=5804100&requesttoken=w5j9ntZoX7%2BA23GZp%2B66g2soOpMIgSQbOCPYexLWcLc%3D%3Al8ur%2FZUOHtPzixqy8Z7VsVwRbOVg2G9dfkuUN1SHH4E%3D",“message”:{“Exception”:“Doctrine\DBAL\Exception\InvalidFieldNameException”,“Message”:“An exception occurred while executing ‘INSERT INTO “richdocuments_wopi”(“fileid”,“owner_uid”,“editor_uid”,“version”,“canwrite”,“server_host”,“token”,“expiry”,“template_destination”,“hide_download”,“direct”,“is_remote_token”,“template_id”) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)’ with params [5804100, “admin”, “admin”, 0, true, “https:\/\/nextcloudmeinedomain.tld\/”, “jtjbwvZLMa8nr8IiI78Eb4W2ycXDvmcp”, 1588069671, 0, false, false, false, 0]:\n\nSQLSTATE[42703]: Undefined column: 7 ERROR: column “template_id” of relation “richdocuments_wopi” does not exist\nLINE 1: …ation”,“hide_download”,“direct”,“is_remote_token”,“template_…\n ^”,“Code”:0,“Trace”:[{“file”:"/usr/lib/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php",“line”:169,“function”:“convertException”,“class”:“Doctrine\DBAL\Driver\AbstractPostgreSQLDriver”,“type”:"->",“args”:[“An exception occurred while executing ‘INSERT INTO “richdocuments_wopi”(“fileid”,“owner_uid”,“editor_uid”,“version”,“canwrite”,“server_host”,“token”,“expiry”,“template_destination”,“hide_download”,“direct”,“is_remote_token”,“template_id”) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)’ with params [5804100, “admin”, “admin”, 0, true, “https:\/\/nextcloudmeinedomain.tld\/”, “jtjbwvZLMa8nr8IiI78Eb4W2ycXDvmcp”, 1588069671, 0, false, false, false, 0]:\n\nSQLSTATE[42703]: Undefined column: 7 ERROR: column “template_id” of relation “richdocuments_wopi” does not exist\nLINE 1: …ation”,“hide_download”,“direct”,“is_remote_token”,“template_…\n ^”,{“errorInfo”:[“42703”,7,“ERROR: column “template_id” of relation “richdocuments_wopi” does not exist\nLINE 1: …ation”,“hide_download”,“direct”,“is_remote_token”,“template_…\n ^”],“class”:“Doctrine\DBAL\Driver\PDOException”}]},{“file”:"/usr/lib/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php",“line”:145,“function”:“wrapException”,“class”:“Doctrine\DBAL\DBALException”,“type”:"::",“args”:[{“class”:“Doctrine\DBAL\Driver\PDOPgSql\Driver”},{“errorInfo”:[“42703”,7,“ERROR: column “template_id” of relation “richdocuments_wopi” does not exist\nLINE 1: …ation”,“hide_download”,“direct”,“is_remote_token”,“template_…\n ^”],“class”:“Doctrine\DBAL\Driver\PDOException”},“An exception occurred while executing ‘INSERT INTO “richdocuments_wopi”(“fileid”,“owner_uid”,“editor_uid”,“version”,“canwrite”,“server_host”,“token”,“expiry”,“template_destination”,“hide_download”,“direct”,“is_remote_token”,“template_id”) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)’ with params [5804100, “admin”, “admin”, 0, true, “https:\/\/nextcloudmeinedomain.tld\/”, “jtjbwvZLMa8nr8IiI78Eb4W2ycXDvmcp”, 1588069671, 0, false, false, false, 0]:\n\nSQLSTATE[42703]: Undefined column: 7 ERROR: column “template_id” of relation “richdocuments_wopi” does not exist\nLINE 1: …ation”,“hide_download”,“direct”,“is_remote_token”,“template_…\n ^”]},{“file”:"/usr/lib/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Statement.php",“line”:162,“function”:“driverExceptionDuringQuery”,“class”:“Doctrine\DBAL\DBALException”,“type”:"::",“args”:[{“class”:“Doctrine\DBAL\Driver\PDOPgSql\Driver”},{“errorInfo”:[“42703”,7,“ERROR: column “template_id” of relation “richdocuments_wopi” does not exist\nLINE 1: …ation”,“hide_download”,“direct”,“is_remote_token”,“template_…\n ^”],“class”:“Doctrine\DBAL\Driver\PDOException”},“INSERT INTO “richdocuments_wopi”(“fileid”,“owner_uid”,“editor_uid”,“version”,“canwrite”,“server_host”,“token”,“expiry”,“template_destination”,“hide_download”,“direct”,“is_remote_token”,“template_id”) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)”,{“1”:5804100,“2”:“admin”,“3”:“admin”,“4”:0,“5”:true,“6”:“https://nextcloudmeinedomain.tld/",“7”:“jtjbwvZLMa8nr8IiI78Eb4W2ycXDvmcp”,“8”:1588069671,“9”:0,“10”:false,“11”:false,“12”:false,“13”:0}]},{“file”:"/usr/lib/nextcloud/lib/public/AppFramework/Db/Mapper.php",“line”:255,“function”:“execute”,“class”:“Doctrine\DBAL\Statement”,“type”:"->”,“args”:[]},{“file”:"/usr/lib/nextcloud/lib/public/AppFramework/Db/Mapper.php",“line”:129,“function”:“execute”,“class”:“OCP\AppFramework\Db\Mapper”,“type”:"->",“args”:[“INSERT INTO *PREFIX*richdocuments_wopi(fileid,owner_uid,editor_uid,version,canwrite,server_host,token,expiry,template_destination,hide_download,direct,is_remote_token,template_id) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)”,[5804100,“admin”,“admin”,0,true,“https://nextcloudmeinedomain.tld/",“jtjbwvZLMa8nr8IiI78Eb4W2ycXDvmcp”,1588069671,0,false,false,false,0]]},{“file”:"/usr/lib/nextcloud/apps/richdocuments/lib/Db/WopiMapper.php",“line”:89,“function”:“insert”,“class”:“OCP\AppFramework\Db\Mapper”,“type”:"->”,“args”:[{“id”:null,“class”:“OCA\Richdocuments\Db\Wopi”}]},{“file”:"/usr/lib/nextcloud/apps/richdocuments/lib/TokenManager.php",“line”:205,“function”:“generateFileToken”,“class”:“OCA\Richdocuments\Db\WopiMapper”,“type”:"->",“args”:["*** sensitive parameter replaced ",“admin”,“admin”,“0”,1,“https://nextcloudmeinedomain.tld/",null,0,false,false,false,0,null]},{“file”:"/usr/lib/nextcloud/apps/richdocuments/lib/Controller/DocumentController.php",“line”:238,“function”:“getToken”,“class”:“OCA\Richdocuments\TokenManager”,“type”:"->”,“args”:[" sensitive parameters replaced "]},{“file”:"/usr/lib/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",“line”:170,“function”:“index”,“class”:“OCA\Richdocuments\Controller\DocumentController”,“type”:"->",“args”:[" sensitive parameter replaced "]},{“file”:"/usr/lib/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",“line”:99,“function”:“executeController”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->",“args”:[{“class”:“OCA\Richdocuments\Controller\DocumentController”},“index”]},{“file”:"/usr/lib/nextcloud/lib/private/AppFramework/App.php",“line”:125,“function”:“dispatch”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->",“args”:[{“class”:“OCA\Richdocuments\Controller\DocumentController”},“index”]},{“file”:"/usr/lib/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php",“line”:47,“function”:“main”,“class”:“OC\AppFramework\App”,“type”:"::",“args”:[“OCA\Richdocuments\Controller\DocumentController”,“index”,{“class”:“OC\AppFramework\DependencyInjection\DIContainer”},{"_route":“richdocuments.document.index”}]},{“function”:"__invoke",“class”:“OC\AppFramework\Routing\RouteActionHandler”,“type”:"->",“args”:[{"_route":“richdocuments.document.index”}]},{“file”:"/usr/lib/nextcloud/lib/private/Route/Router.php",“line”:299,“function”:“call_user_func”,“args”:[{“class”:“OC\AppFramework\Routing\RouteActionHandler”},{“route":“richdocuments.document.index”}]},{“file”:"/usr/lib/nextcloud/lib/base.php",“line”:1008,“function”:“match”,“class”:“OC\Route\Router”,“type”:"->",“args”:["/apps/richdocuments/index"]},{“file”:"/usr/lib/nextcloud/index.php",“line”:38,“function”:“handleRequest”,“class”:“OC”,“type”:"::",“args”:[]}],“File”:"/usr/lib/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php",“Line”:60,“Previous”:{“Exception”:“Doctrine\DBAL\Driver\PDOException”,“Message”:“SQLSTATE[42703]: Undefined column: 7 ERROR: column “template_id” of relation “richdocuments_wopi” does not exist\nLINE 1: …ation”,“hide_download”,“direct”,“is_remote_token”,"template…\n ^”,“Code”:“42703”,“Trace”:[{“file”:"/usr/lib/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Statement.php",“line”:153,“function”:“execute”,“class”:“Doctrine\DBAL\Driver\PDOStatement”,“type”:"->",“args”:[null]},{“file”:"/usr/lib/nextcloud/lib/public/AppFramework/Db/Mapper.php",“line”:255,“function”:“execute”,“class”:“Doctrine\DBAL\Statement”,“type”:"->",“args”:[]},{“file”:"/usr/lib/nextcloud/lib/public/AppFramework/Db/Mapper.php",“line”:129,“function”:“execute”,“class”:“OCP\AppFramework\Db\Mapper”,“type”:"->",“args”:[“INSERT INTO *PREFIX*richdocuments_wopi(fileid,owner_uid,editor_uid,version,canwrite,server_host,token,expiry,template_destination,hide_download,direct,is_remote_token,template_id) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)”,[5804100,“admin”,“admin”,0,true,“https://nextcloudmeinedomain.tld/",“jtjbwvZLMa8nr8IiI78Eb4W2ycXDvmcp”,1588069671,0,false,false,false,0]]},{“file”:"/usr/lib/nextcloud/apps/richdocuments/lib/Db/WopiMapper.php",“line”:89,“function”:“insert”,“class”:“OCP\AppFramework\Db\Mapper”,“type”:"->”,“args”:[{“id”:null,“class”:“OCA\Richdocuments\Db\Wopi”}]},{“file”:"/usr/lib/nextcloud/apps/richdocuments/lib/TokenManager.php",“line”:205,“function”:“generateFileToken”,“class”:“OCA\Richdocuments\Db\WopiMapper”,“type”:"->",“args”:[" sensitive parameter replaced ",“admin”,“admin”,“0”,1,“https://nextcloudmeinedomain.tld/",null,0,false,false,false,0,null]},{“file”:"/usr/lib/nextcloud/apps/richdocuments/lib/Controller/DocumentController.php",“line”:238,“function”:“getToken”,“class”:“OCA\Richdocuments\TokenManager”,“type”:"->”,“args”:[" sensitive parameters replaced "]},{“file”:"/usr/lib/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",“line”:170,“function”:“index”,“class”:“OCA\Richdocuments\Controller\DocumentController”,“type”:"->",“args”:[" sensitive parameter replaced "]},{“file”:"/usr/lib/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",“line”:99,“function”:“executeController”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->",“args”:[{“class”:“OCA\Richdocuments\Controller\DocumentController”},“index”]},{“file”:"/usr/lib/nextcloud/lib/private/AppFramework/App.php",“line”:125,“function”:“dispatch”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->",“args”:[{“class”:“OCA\Richdocuments\Controller\DocumentController”},“index”]},{“file”:"/usr/lib/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php",“line”:47,“function”:“main”,“class”:“OC\AppFramework\App”,“type”:"::",“args”:[“OCA\Richdocuments\Controller\DocumentController”,“index”,{“class”:“OC\AppFramework\DependencyInjection\DIContainer”},{"_route":“richdocuments.document.index”}]},{“function”:"__invoke",“class”:“OC\AppFramework\Routing\RouteActionHandler”,“type”:"->",“args”:[{"_route":“richdocuments.document.index”}]},{“file”:"/usr/lib/nextcloud/lib/private/Route/Router.php",“line”:299,“function”:“call_user_func”,“args”:[{“class”:“OC\AppFramework\Routing\RouteActionHandler”},{“route":“richdocuments.document.index”}]},{“file”:"/usr/lib/nextcloud/lib/base.php",“line”:1008,“function”:“match”,“class”:“OC\Route\Router”,“type”:"->",“args”:["/apps/richdocuments/index"]},{“file”:"/usr/lib/nextcloud/index.php",“line”:38,“function”:“handleRequest”,“class”:“OC”,“type”:"::",“args”:[]}],“File”:"/usr/lib/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php",“Line”:119,“Previous”:{“Exception”:“PDOException”,“Message”:“SQLSTATE[42703]: Undefined column: 7 ERROR: column “template_id” of relation “richdocuments_wopi” does not exist\nLINE 1: …ation”,“hide_download”,“direct”,“is_remote_token”,"template…\n ^”,“Code”:“42703”,“Trace”:[{“file”:"/usr/lib/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php",“line”:117,“function”:“execute”,“class”:“PDOStatement”,“type”:"->",“args”:[null]},{“file”:"/usr/lib/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Statement.php",“line”:153,“function”:“execute”,“class”:“Doctrine\DBAL\Driver\PDOStatement”,“type”:"->",“args”:[null]},{“file”:"/usr/lib/nextcloud/lib/public/AppFramework/Db/Mapper.php",“line”:255,“function”:“execute”,“class”:“Doctrine\DBAL\Statement”,“type”:"->",“args”:[]},{“file”:"/usr/lib/nextcloud/lib/public/AppFramework/Db/Mapper.php",“line”:129,“function”:“execute”,“class”:“OCP\AppFramework\Db\Mapper”,“type”:"->",“args”:[“INSERT INTO *PREFIX*richdocuments_wopi(fileid,owner_uid,editor_uid,version,canwrite,server_host,token,expiry,template_destination,hide_download,direct,is_remote_token,template_id) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)”,[5804100,“admin”,“admin”,0,true,“https://nextcloudmeinedomain.tld/",“jtjbwvZLMa8nr8IiI78Eb4W2ycXDvmcp”,1588069671,0,false,false,false,0]]},{“file”:"/usr/lib/nextcloud/apps/richdocuments/lib/Db/WopiMapper.php",“line”:89,“function”:“insert”,“class”:“OCP\AppFramework\Db\Mapper”,“type”:"->”,“args”:[{“id”:null,“class”:“OCA\Richdocuments\Db\Wopi”}]},{“file”:"/usr/lib/nextcloud/apps/richdocuments/lib/TokenManager.php",“line”:205,“function”:“generateFileToken”,“class”:“OCA\Richdocuments\Db\WopiMapper”,“type”:"->",“args”:[" sensitive parameter replaced ",“admin”,“admin”,“0”,1,“https://nextcloudmeinedomain.tld/",null,0,false,false,false,0,null]},{“file”:"/usr/lib/nextcloud/apps/richdocuments/lib/Controller/DocumentController.php",“line”:238,“function”:“getToken”,“class”:“OCA\Richdocuments\TokenManager”,“type”:"->”,“args”:[" sensitive parameters replaced "]},{“file”:"/usr/lib/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",“line”:170,“function”:“index”,“class”:“OCA\Richdocuments\Controller\DocumentController”,“type”:"->",“args”:[" sensitive parameter replaced ***"]},{“file”:"/usr/lib/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",“line”:99,“function”:“executeController”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->",“args”:[{“class”:“OCA\Richdocuments\Controller\DocumentController”},“index”]},{“file”:"/usr/lib/nextcloud/lib/private/AppFramework/App.php",“line”:125,“function”:“dispatch”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->",“args”:[{“class”:“OCA\Richdocuments\Controller\DocumentController”},“index”]},{“file”:"/usr/lib/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php",“line”:47,“function”:“main”,“class”:“OC\AppFramework\App”,“type”:"::",“args”:[“OCA\Richdocuments\Controller\DocumentController”,“index”,{“class”:“OC\AppFramework\DependencyInjection\DIContainer”},{"_route":“richdocuments.document.index”}]},{“function”:"__invoke",“class”:“OC\AppFramework\Routing\RouteActionHandler”,“type”:"->",“args”:[{"_route":“richdocuments.document.index”}]},{“file”:"/usr/lib/nextcloud/lib/private/Route/Router.php",“line”:299,“function”:“call_user_func”,“args”:[{“class”:“OC\AppFramework\Routing\RouteActionHandler”},{"_route":“richdocuments.document.index”}]},{“file”:"/usr/lib/nextcloud/lib/base.php",“line”:1008,“function”:“match”,“class”:“OC\Route\Router”,“type”:"->",“args”:["/apps/richdocuments/index"]},{“file”:"/usr/lib/nextcloud/index.php",“line”:38,“function”:“handleRequest”,“class”:“OC”,“type”:"::",“args”:[]}],“File”:"/usr/lib/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php",“Line”:117}},“CustomMessage”:"–"},“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18362”,“version”:“18.0.4.2”,“id”:“5ea7ff2b89cab”}


The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'inst_id',
  'passwordsalt' => 'secret',
  'secret' => 'moresecret',
  'trusted_domains' =>
  array (
    0 => 'adress0',
    1 => 'adress1',
    2 => 'adress2',
    3 => 'adress3',
    4 => 'adress4',
    5 => 'adress5',
    6 => 'adress6',
    7 => 'adress7',
    8 => 'adress8,
  ),
  'datadirectory' => '/var/lib/nextcloud',
  'dbtype' => 'pgsql',
  'version' => '18.0.4.2',
  'overwrite.cli.url' => 'https://our.domain.local',
  'dbname' => 'ourdbname',
  'dbhost' => 'ourdbhostname',
  'dbport' => '',
  'dbtableprefix' => '',
  'dbuser' => 'ourdbusername',
  'dbpassword' => 'ourpassword',
  'installed' => true,
  'ldapIgnoreNamingRules' => 'false',
 'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'filesystem_check_changes' => '1',
  'mail_domain' => 'ourdomainname.de',
  'mail_from_address' => 'cloud',
  'mail_smtpmode' => 'smtp',
  'mail_smtphost' => 'localhost',
  'mail_smtpport' => '25',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'share_folder' => '/Eigene Dateien/Geteilte Dateien',
  'skeletondirectory' => '',
  'trusted_proxies' =>
  array (
    0 => 'ip-from-proxy',
  ),
  'forwarded_for_headers' =>
  array (
    0 => 'HTTP_X_FORWARDED_FOR',
  ),
  'maintenance' => true,
  'theme' => '',
  'loglevel' => 2,
  'app_install_overwrite' =>
  array (
    0 => 'bookmarks_fulltextsearch',
  ),
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'localhost',
    'port' => '6379',
  ),
);

Thanks a lot in advance

Hi, has nobody any ideas?

The error message looks very similar to what I had very recently. Check the second post with the github link. It is a very short fix if that is your problem

Thank you i have found 30 minutes before you send me the answer found the same post on github and just tried out, and could solve the problem.
I had to disable and delete the collabora app, delete some files and tables in database, after that reinstall the and that worked for me.
Thank you for your help.
Greets Eddie

Great to hear that you figured it out!