Nextcloud version (eg, 12.0.2): 18.0.0
Operating system and version (eg, Ubuntu 17.04): FreeNAS 11.3 (using FreeBSD 11.3)
Apache or nginx version (eg, Apache 2.4.25): Caddy 1.0.4
PHP version (eg, 7.1): 7.3
The issue you are facing:
After installing/activating the community document server, when I attempt to edit a .docx file, I get this error:
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
- Install Nextcloud in a FreeNAS jail following this script: https://github.com/danb35/freenas-iocage-nextcloud
- Enter the jail and run the following commands:
cd /usr/local/www/nextcloud/apps
fetch https://github.com/nextcloud/documentserver_community/releases/download/v0.1.5/documentserver_community.tar.gz
tar zxfv documentserver_community.tar.gz
rm -f documentserver_community.tar.gz
chown -R www:www documentserver_community
- Enable the community document server app, download and install the OpenOffice app through the Nextcloud GUI – I’d first attempted to download and enable the document server using the GUI, but it repeatedly timed out, hence using the commands above.
- Click on a .docx file, and see the above error
The output of your Nextcloud log in Admin > Logging:
I don’t see any way to do a text copy/paste, so here’s a screen shot:
Edit: I downloaded the nextcloud.log file; here’s the last few lines (including the while thing made the post exceed the 32kbyte limit):
{"reqId":"UFQgDogrwuVzKNja6k7V","level":3,"time":"2020-01-31T17:44:06-05:00","remoteAddr":"192.168.1.199","user":"admin","app":"PHP","method":"GET","url":"/apps/documentserver_community/web-apps/apps/api/documents/api.js","message":"stream_get_contents(): supplied resource is not a valid stream resource at /usr/local/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php#76","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36","version":"18.0.0.10"}
{"reqId":"UFQgDogrwuVzKNja6k7V","level":3,"time":"2020-01-31T17:44:06-05:00","remoteAddr":"192.168.1.199","user":"admin","app":"index","method":"GET","url":"/apps/documentserver_community/web-apps/apps/api/documents/api.js","message":{"Exception":"Exception","Message":"trim() expects parameter 1 to be string, bool given","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\DocumentServer\\Controller\\StaticController"},"webApps"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\DocumentServer\\Controller\\StaticController","webApps",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"file":"/usr/local/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/documentserver_community/web-apps/apps/api/documents/api.js"]},{"file":"/usr/local/www/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":109,"Previous":{"Exception":"TypeError","Message":"trim() expects parameter 1 to be string, bool given","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php","line":78,"function":"trim","args":[false]},{"file":"/usr/local/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php","line":53,"function":"lddError","class":"OCA\\DocumentServer\\SetupCheck","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/apps/documentserver_community/lib/Controller/StaticController.php","line":90,"function":"getHint","class":"OCA\\DocumentServer\\SetupCheck","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"webApps","class":"OCA\\DocumentServer\\Controller\\StaticController","type":"->","args":["apps/api/documents/api.js"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\DocumentServer\\Controller\\StaticController"},"webApps"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\DocumentServer\\Controller\\StaticController"},"webApps"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\DocumentServer\\Controller\\StaticController","webApps",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"file":"/usr/local/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/documentserver_community/web-apps/apps/api/documents/api.js"]},{"file":"/usr/local/www/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/usr/local/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php","Line":78},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36","version":"18.0.0.10"}
{"reqId":"yOPgSBdHILuurTedjusb","level":3,"time":"2020-01-31T19:30:39-05:00","remoteAddr":"192.168.1.134","user":"admin","app":"documentserver_community","method":"GET","url":"/apps/documentserver_community/web-apps/apps/api/documents/api.js","message":{"Exception":"OCA\\DocumentServer\\Document\\DocumentConversionException","Message":"sh: ./x2t: Exec format error\n","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/apps/documentserver_community/lib/Document/ConverterBinary.php","line":64,"function":"run","class":"OCA\\DocumentServer\\Document\\ConverterBinary","type":"->","args":[""]},{"file":"/usr/local/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php","line":34,"function":"test","class":"OCA\\DocumentServer\\Document\\ConverterBinary","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/apps/documentserver_community/lib/Controller/StaticController.php","line":89,"function":"check","class":"OCA\\DocumentServer\\SetupCheck","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"webApps","class":"OCA\\DocumentServer\\Controller\\StaticController","type":"->","args":["apps/api/documents/api.js"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\DocumentServer\\Controller\\StaticController"},"webApps"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\DocumentServer\\Controller\\StaticController"},"webApps"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\DocumentServer\\Controller\\StaticController","webApps",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"file":"/usr/local/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/documentserver_community/web-apps/apps/api/documents/api.js"]},{"file":"/usr/local/www/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/usr/local/www/nextcloud/apps/documentserver_community/lib/Document/ConverterBinary.php","Line":56,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:72.0) Gecko/20100101 Firefox/72.0","version":"18.0.0.10"}
{"reqId":"yOPgSBdHILuurTedjusb","level":3,"time":"2020-01-31T19:30:39-05:00","remoteAddr":"192.168.1.134","user":"admin","app":"PHP","method":"GET","url":"/apps/documentserver_community/web-apps/apps/api/documents/api.js","message":"fclose(): supplied resource is not a valid stream resource at /usr/local/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php#75","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:72.0) Gecko/20100101 Firefox/72.0","version":"18.0.0.10"}
{"reqId":"yOPgSBdHILuurTedjusb","level":3,"time":"2020-01-31T19:30:39-05:00","remoteAddr":"192.168.1.134","user":"admin","app":"PHP","method":"GET","url":"/apps/documentserver_community/web-apps/apps/api/documents/api.js","message":"stream_get_contents(): supplied resource is not a valid stream resource at /usr/local/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php#76","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:72.0) Gecko/20100101 Firefox/72.0","version":"18.0.0.10"}
{"reqId":"yOPgSBdHILuurTedjusb","level":3,"time":"2020-01-31T19:30:39-05:00","remoteAddr":"192.168.1.134","user":"admin","app":"index","method":"GET","url":"/apps/documentserver_community/web-apps/apps/api/documents/api.js","message":{"Exception":"Exception","Message":"trim() expects parameter 1 to be string, bool given","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\DocumentServer\\Controller\\StaticController"},"webApps"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\DocumentServer\\Controller\\StaticController","webApps",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"file":"/usr/local/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/documentserver_community/web-apps/apps/api/documents/api.js"]},{"file":"/usr/local/www/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":109,"Previous":{"Exception":"TypeError","Message":"trim() expects parameter 1 to be string, bool given","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php","line":78,"function":"trim","args":[false]},{"file":"/usr/local/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php","line":53,"function":"lddError","class":"OCA\\DocumentServer\\SetupCheck","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/apps/documentserver_community/lib/Controller/StaticController.php","line":90,"function":"getHint","class":"OCA\\DocumentServer\\SetupCheck","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"webApps","class":"OCA\\DocumentServer\\Controller\\StaticController","type":"->","args":["apps/api/documents/api.js"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\DocumentServer\\Controller\\StaticController"},"webApps"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\DocumentServer\\Controller\\StaticController"},"webApps"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\DocumentServer\\Controller\\StaticController","webApps",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"file":"/usr/local/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/documentserver_community/web-apps/apps/api/documents/api.js"]},{"file":"/usr/local/www/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/usr/local/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php","Line":78},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:72.0) Gecko/20100101 Firefox/72.0","version":"18.0.0.10"}
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'passwordsalt' => '(REDACTED)',
'secret' => '(REDACTED)',
'trusted_domains' =>
array (
0 => 'localhost',
1 => 'cloud2.familybrown.org',
2 => '192.168.1.24',
),
'datadirectory' => '/mnt/files',
'dbtype' => 'mysql',
'version' => '18.0.0.10',
'overwrite.cli.url' => 'https://cloud2.familybrown.org/',
'dbname' => 'nextcloud',
'dbhost' => 'localhost:/tmp/mysql.sock',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'nextcloud',
'dbpassword' => '(REDACTED)',
'installed' => true,
'instanceid' => 'oc0aozx3fw6f',
'logtimezone' => 'America/New_York',
'log_type' => 'file',
'logfile' => '/var/log/nextcloud.log',
'loglevel' => '2',
'logrotate_size' => '104847600',
'memcache.local' => '\\OC\\Memcache\\APCu',
'redis' =>
array (
'host' => '/tmp/redis.sock',
'port' => 0,
),
'memcache.locking' => '\\OC\\Memcache\\Redis',
'htaccess.RewriteBase' => '/',
'maintenance' => false,
);
The output of your Apache/nginx/system log in /var/log/____
:
caddy.log:
2020/01/31 17:26:21 [INFO] Caddy version: v1.0.4
2020/01/31 17:26:21 [INFO][cache:0xc0001f8320] Started certificate maintenance routine
Activating privacy features... 2020/01/31 17:26:27 [INFO] acme: Registering account for admin@familybrown.org
2020/01/31 17:26:27 [INFO][cloud2.familybrown.org] Obtain certificate
2020/01/31 17:26:27 [INFO][cloud2.familybrown.org] Obtain: Waiting on rate limiter...
2020/01/31 17:26:27 [INFO][cloud2.familybrown.org] Obtain: Done waiting
2020/01/31 17:26:27 [INFO] [cloud2.familybrown.org] acme: Obtaining bundled SAN certificate
2020/01/31 17:26:27 [INFO] [cloud2.familybrown.org] AuthURL: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/36325828
2020/01/31 17:26:27 [INFO] [cloud2.familybrown.org] acme: Could not find solver for: tls-alpn-01
2020/01/31 17:26:27 [INFO] [cloud2.familybrown.org] acme: Could not find solver for: http-01
2020/01/31 17:26:27 [INFO] [cloud2.familybrown.org] acme: use dns-01 solver
2020/01/31 17:26:27 [INFO] [cloud2.familybrown.org] acme: Preparing to solve DNS-01
2020/01/31 17:26:28 [INFO] cloudflare: new record for cloud2.familybrown.org, ID f2b9b88d4907b29af9496627b7a1f5ae
2020/01/31 17:26:28 [INFO] [cloud2.familybrown.org] acme: Trying to solve DNS-01
2020/01/31 17:26:28 [INFO] [cloud2.familybrown.org] acme: Checking DNS record propagation using [192.168.1.1:53]
2020/01/31 17:26:28 [INFO] Wait for propagation [timeout: 2m0s, interval: 2s]
2020/01/31 17:26:28 [INFO] [cloud2.familybrown.org] acme: Waiting for DNS record propagation.
2020/01/31 17:26:30 [INFO] [cloud2.familybrown.org] acme: Waiting for DNS record propagation.
2020/01/31 17:26:32 [INFO] [cloud2.familybrown.org] acme: Waiting for DNS record propagation.
2020/01/31 17:26:40 [INFO] [cloud2.familybrown.org] The server validated our request
2020/01/31 17:26:40 [INFO] [cloud2.familybrown.org] acme: Cleaning DNS-01 challenge
2020/01/31 17:26:40 [INFO] [cloud2.familybrown.org] acme: Validations succeeded; requesting certificates
2020/01/31 17:26:40 [INFO] [cloud2.familybrown.org] Server responded with a certificate.
done.
Serving HTTPS on port 443
https://cloud2.familybrown.org
https://192.168.1.24
2020/01/31 17:26:41 [INFO] Serving https://cloud2.familybrown.org
2020/01/31 17:26:41 [INFO] Serving https://192.168.1.24
Serving HTTP on port 80
http://cloud2.familybrown.org
2020/01/31 17:26:41 [INFO] Serving http://cloud2.familybrown.org
2020/01/31 17:28:56 http: TLS handshake error from 192.168.1.199:64651: remote error: tls: unknown certificate
2020/01/31 17:28:56 http: TLS handshake error from 192.168.1.199:64656: remote error: tls: unknown certificate
2020/01/31 17:28:56 http: TLS handshake error from 192.168.1.199:64659: remote error: tls: unknown certificate
2020/01/31 17:29:00 http: TLS handshake error from 192.168.1.199:64666: remote error: tls: unknown certificate
2020/01/31 17:29:00 http: TLS handshake error from 192.168.1.199:64668: remote error: tls: unknown certificate
2020/01/31 17:40:58 http: TLS handshake error from 192.168.1.24:18253: remote error: tls: unknown certificate authority
2020/01/31 17:43:22 [INFO] SIGTERM: Shutting down servers then terminating
2020/01/31 17:43:22 [INFO][cache:0xc0001f8320] Stopped certificate maintenance routine