Collabora/CODE and Richdocuments plugin error

Hi guys,

I'm trying to get the Collabora Online suite working in Owncloud 9.1 and running into an internal server error in Owncloud. Everything else in Owncloud is working fine as I've been running Owncloud for a couple years now. Recently upgraded from Ubuntu 14.04 to 16.04 and upgraded Owncloud from 8.1 to 8.2 to 9.0 to 9.1 in the process. Everything looks good, my sync clients work, web UI works great, etc.

Steps to reproduce
1. Download docker image:
docker pull collabora/code
2. Run docker image:
docker run -t -d -p 127.0.0.1:9980:9980 -e "domain=my\.domain\.com" --restart always --cap-add MKNOD collabora/code
3. Follow instructions to install and configure the Richdocuments plugin: https://github.com/owncloud/richdocuments
4. Enable richdocuments plugin and set Collabora Online URL in admin area to:
https://localhost:9980 (have also tried hostname and some other combinations)
5. Because the container uses a self-signed cert, but we'll only ever connect from localhost from the Owncloud server, let's just trust that cert in Owncloud:
openssl s_client -connect localhost:9980
Copy/paste the server certificate presented by the CODE container to a CODE.pem file.
cat CODE.pem >> owncloud/resources/config/ca-bundle.crt
6. Restart Apache for good measure:
sudo service apache2 restart
7. Login to Owncloud web UI and attempt to open any Office document (.doc, .docx, .xlsx, etc)

Expected behaviour
Document should open in the Collabora Online web-based editors depending on document type.

Actual behaviour
Owncloud drops an internal server error:
Internal Server Error
The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

Log entry from /var/www/owncloud/data/owncloud.log:
{"reqId":"5s2U4L55Jqq\/TKs\/VMsK","remoteAddr":"172.29.1.104","app":"index","message":"Exception: {\"Exception\":\"TypeError\",\"Message\":\"Argument 4 passed to OCA\\\\Richdocuments\\\\Controller\\\\DocumentController::__construct() must implement interface OCP\\\\IConfig, instance of OCA\\\\Richdocuments\\\\AppConfig given, called in \\\/var\\\/www\\\/owncloud\\\/apps\\\/richdocuments\\\/appinfo\\\/application.php on line 54\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/apps\\\/richdocuments\\\/appinfo\\\/application.php(54): OCA\\\\Richdocuments\\\\Controller\\\\DocumentController->__construct('richdocuments', Object(OC\\\\AppFramework\\\\Http\\\\Request), Object(OC\\\\AllConfig), Object(OCA\\\\Richdocuments\\\\AppConfig), Object(OC\\\\L10N\\\\L10N), 'rwhite', Object(OC\\\\Memcache\\\\Factory), Object(OC\\\\Log))\\n#1 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/pimple\\\/pimple\\\/src\\\/Pimple\\\/Container.php(113): OCA\\\\Richdocuments\\\\AppInfo\\\\Application->OCA\\\\Richdocuments\\\\AppInfo\\\\{closure}(Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer))\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(102): Pimple\\\\Container->offsetGet('DocumentControl...')\\n#3 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/App.php(93): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('DocumentControl...')\\n#4 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandler.php(46): OC\\\\AppFramework\\\\App::main('DocumentControl...', 'index', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#5 [internal function]: OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke(Array)\\n#6 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Route\\\/Router.php(280): call_user_func(Object(OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler), Array)\\n#7 \\\/var\\\/www\\\/owncloud\\\/lib\\\/base.php(891): OC\\\\Route\\\\Router->match('\\\/apps\\\/richdocum...')\\n#8 \\\/var\\\/www\\\/owncloud\\\/index.php(39): OC::handleRequest()\\n#9 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/apps\\\/richdocuments\\\/controller\\\/documentcontroller.php\",\"Line\":56}","level":3,"time":"2016-09-05T17:54:07+00:00","method":"GET","url":"\/index.php\/apps\/richdocuments\/index","user":"rwhite"}

Server configuration
Operating system: Ubuntu 16.04 (latest patches as of today)
Web server: Apache 2.4.18-2ubuntu3.1
Database: MariaDB 10.0.25-0ubuntu0.16.04.1
PHP version: 7.0.8-0ubuntu0.16.04.2
ownCloud version (see ownCloud admin page): ownCloud 9.1.0 (stable)
Updated from an older ownCloud or fresh install: Updated, occ upgrade and migrate tasks completed successfully.
ownCloud log (data/owncloud.log, see https://central.owncloud.org/t/how-to-find-webserver-or-oc-logfile-enable-php-logfile/808): See above log output

Special configuration (external storage, external authentication, reverse proxy, server-side-encryption):
* Using LDAP auth
* Documents plugin DISABLED

Integrity status for oC9+

No errors have been found.

Please report this directly to the app developer at: https://github.com/owncloud/richdocuments/issues after you made sure that you're using the recent version of the richdocuments / Collabora Online connector app (currently 1.1.4).

Thanks for reporting it. Seems they already found the issue:

Yep! Mostly copy/paste of the issue I posted here. I looked at the bad commit link they provided and just manually backed out the changes that caused the issue. That fixed the issue I was running into with the Richdocuments plugin. Unfortunately I still wasn't able to get the CODE docker container to work; there's some kind of permissions problem with the container on Ubuntu 16.04 even when run with the --privileged flag. Some others have run into it as well, and we all fell back to compiling the entire LibreOffice/Loolwsd/loleaflet stack manually and running it natively. Not pretty, but it works for now until the Docker container issue is figured out.

Yeah, the latest Docker Container seems to have some issues since the last update. I had my setup working just fine a few weeks ago but after the last container update it failed with the:

ClientRequestHandler::handleRequest: BadRequestException: Invalid URI or access denied.

error as also reported here: https://help.nextcloud.com/t/issue-installing-collabora-following-official-guide/1746/145

Maybe some one should contact the Collabora guys and make them aware

Hi All

I'm construct owncloud9.1.0 in AWS using image in bitnami.
So to use Collabora Online, by making reference to the following web page, richdocument, install.

A plug-in of richdocument, install, I made docker in t Collabora Online Development Edition (CODE) start in following CLI.

$ docker pull collabora/code
$ docker run -t -d -p 127.0.0.1:9980:9980 -e \
    "domain=<your-dot-escaped-domain>" --cap-add MKNOD collabora/code

After environment building of Collabora Online Development Edition (CODE)
offie-> test. doc.
this document is clicked, the following error is recorded in owncloud.log.

Error PHP Argument 4 passed to OCA\Richdocuments\Controller\DocumentController::__construct() must implement interface OCP\IConfig, instance of OCA\Richdocuments\AppConfig given, called in /opt/bitnami/apps/owncloud/htdocs/apps/richdocuments/appinfo/application.php on line 55 and defined at /opt/bitnami/apps/owncloud/htdocs/apps/richdocuments/controller/documentcontroller.php#56 2016-09-09T06:52:01+00:00

It isn't possible to edit document in such state, when how doing do, would I be able to settle it?

Just wait until the developers of that app is fixing this issue (There is nothing else what you can do for now). See the already posted link above:

thanks for your advice

The contents of Uniform Resource Locator were tried, an error is recorded.

Hi,

just closing here. The issue is known, already reported to the developers and not fixed yet by them. There is nothing what needs to be discussed in here concerning the initial report.