owncloud / richdocuments

:notebook_with_decorative_cover: Collabora Online for ownCloud
118 stars 53 forks source link

Collabora/CODE and Richdocuments plugin error with OwnCloud 9.1 #107

Closed ryanjwh closed 7 years ago

ryanjwh commented 8 years ago

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: ownCloud 9.1.0 (stable) Richdocuments version: 1.1.5 Updated from an older ownCloud or fresh install: Updated, occ upgrade and migrate tasks completed successfully. ownCloud log: See above log output

Special configuration (external storage, external authentication, reverse proxy, server-side-encryption):

Integrity status for oC9+ No errors have been found.

ryanjwh commented 8 years ago

Updated post to fix formatting and add some additional detail. Any help is appreciated, thanks!

digination commented 8 years ago

I had exactly the same error, before rolling back the AppConfig patch, which purpose was to set a default value for wopi_url, but the mecanism is clearly buggy.

digination commented 8 years ago

faulty commit is c166c7b

tetuya0703 commented 8 years ago

@digination

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.

http://askubuntu.com/questions/775766/how-to-install-the-richdocuments-plugin-on-owncloud

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?

Eid-Deroda commented 8 years ago

Hi Guys,

Same issue here on a bundled Nextcloud 10 + CODE instance:

Argument 4 passed to OCA\Richdocuments\Controller\DocumentController::__construct() must implement interface OCP\IConfig, instance of OCA\Richdocuments\AppConfig given, called in /var/www/html/nextcloud/apps/richdocuments/appinfo/application.php on line 55 and defined at /var/www/html/nextcloud/apps/richdocuments/controller/documentcontroller.php#56

timar commented 7 years ago

Commit 70016ad4de865a9548620f3b13ca5c47df889530 fixed this.