Nextcloud Office does not load. Just downloads the file
Steps to reproduce
- Do a fresh install of Nextcloud 25 with php 8, mysql and nginx in CentOS 7
- Nextcloud is running fine and no errors in the Admin overview
- Installed rpm of fuse and font-config
- Install Collabora Online - Built-in CODE Server 22.5.802 and Nextcloud Office 7.0.2 using the web interface.
Expected behaviour
Welcome to Nextcloud Hub document should open in the browser when clicked
Actual behaviour
The Welcome to Nextcloud Hub document just downloads.
Server configuration
Operating system: CentOS Linux release 7.9.2009 (Core)
Web server: nginx-1.20.1-10.el7.x86_64
Database: MariaDB-server-10.10.2-1.el7.centos.x86_64
PHP version: php-8.1.13-1.el7.remi.x86_64
Nextcloud version: Nextcloud Hub 3 - 25.0.2
Updated from an older Nextcloud/ownCloud or fresh install: Fresh install Nextcloud 25
Where did you install Nextcloud from: nextcloud.com website
Signing status:
Signing status
Login as admin user into your Nextcloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.
No errors have been found.
List of activated apps:
App list
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder
Enabled:
- activity: 2.17.0
- circles: 25.0.0
- cloud_federation_api: 1.8.0
- comments: 1.15.0
- contactsinteraction: 1.6.0
- dashboard: 7.5.0
- dav: 1.24.0
- federatedfilesharing: 1.15.0
- federation: 1.15.0
- files: 1.20.1
- files_pdfviewer: 2.6.0
- files_rightclick: 1.4.0
- files_sharing: 1.17.0
- files_trashbin: 1.15.0
- files_versions: 1.18.0
- firstrunwizard: 2.14.0
- logreader: 2.10.0
- lookup_server_connector: 1.13.0
- nextcloud_announcements: 1.14.0
- notifications: 2.13.1
- oauth2: 1.13.0
- password_policy: 1.15.0
- photos: 2.0.1
- privacy: 1.9.0
- provisioning_api: 1.15.0
- recommendations: 1.4.0
- related_resources: 1.0.3
- richdocuments: 7.0.2
- richdocumentscode: 22.5.802
- serverinfo: 1.15.0
- settings: 1.7.0
- sharebymail: 1.15.0
- support: 1.8.0
- survey_client: 1.13.0
- systemtags: 1.15.0
- text: 3.6.0
- theming: 2.0.1
- twofactor_backupcodes: 1.14.0
- updatenotification: 1.15.0
- user_status: 1.5.0
- viewer: 1.9.0
- weather_status: 1.5.0
- workflowengine: 2.7.0 Disabled:
- admin_audit
- bruteforcesettings
- encryption
- files_external
- suspicious_login
- twofactor_totp
- user_ldap
The content of config/config.php:
Config report
'xxxxxxxxxxx', 'passwordsalt' => 'xxxxxxxxxxx', 'secret' => 'xxxxxxxxxxx', 'trusted_domains' => array ( 0 => 'example.com', ), 'datadirectory' => '/var/www/html/nextcloud/data', 'dbtype' => 'mysql', 'version' => '25.0.2.3', 'overwrite.cli.url' => 'https://example.com', 'dbname' => 'nextclouddb', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'dbuser' => 'oc_user', 'dbpassword' => 'password', 'mysql.utf8mb4' => true, 'installed' => true, 'default_phone_region' => 'SG', 'maintenance' => false, 'loglevel' => 2, 'app_install_overwrite' => array ( 0 => 'issuetemplate', ), );Are you using external storage, if yes which one: no
Are you using encryption: no
Are you using an external user-backend, if yes which one: no
Client configuration
Browser: Firefox 108
Operating system: Fedora 37
Logs
Web server error log
Web server error log
``` Insert your webserver log here ```Nextcloud log (data/nextcloud.log)
Nextcloud log
``` {"reqId":"S7vyJn45XtdIsvRQ3XOw","level":3,"time":"2022-12-18T15:52:02+00:00","remoteAddr":"xxxxxxxx","user":"--","app":"richdocuments","method":"GET","url":"/apps/theming/icon?v=b6589fc6","message":"Failed to fetch the Collabora capabilities endpoint: cURL error 35: Peer reports incompatible or unsupported protocol version. (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://example.com/apps/richdocumentscode/proxy.php?req=/hosting/capabilities","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:107.0) Gecko/20100101 Firefox/107.0","version":"25.0.2.3","exception":{"Exception":"GuzzleHttp\\Exception\\ConnectException","Message":"cURL error 35: Peer reports incompatible or unsupported protocol version. (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) ```Browser log
Browser log
``` Insert your browser log here, this could for example include:a) The javascript console log b) The network log c) ...
</details>
Looks like cURL does not support TLS 1.3. I am guessing. So centos 7 is out. Anyway to get it to work?
I've been debugging the issue, and found out the key problem: the viewer handler binding for richdocuments is returning the value of mimes as a JSON object, when the procedure expects an array instead. This results in the following error on the console log:
[ERROR] viewer: The following handler doesn't have a valid mime array
Object { level: 2, app: "viewer", uid: "user", handler: {…} }
​
app: "viewer"
​
handler: Object { id: Getter & Setter, group: Getter & Setter, mimes: Getter & Setter, … }
​​
__ob__: Object { shallow: false, mock: false, vmCount: 0, … }
​​
component: Object { name: Getter & Setter, components: Getter & Setter, props: Getter & Setter, … }
​​
group: null
​​
id: "richdocuments"
​​
mimes: Object { 0: Getter & Setter, 1: Getter & Setter, 3: Getter & Setter, … }
​​​
0: "application/vnd.oasis.opendocument.text"
​​​
1: "application/vnd.oasis.opendocument.spreadsheet"
​​​
3: "application/vnd.oasis.opendocument.presentation"
​​​
4: "application/vnd.oasis.opendocument.text-flat-xml"
​​​
5: "application/vnd.oasis.opendocument.spreadsheet-flat-xml"
​​​
7: "application/vnd.oasis.opendocument.presentation-flat-xml"
​​​
8: "application/vnd.lotus-wordpro"
​​​
9: "application/vnd.visio"
​​​
10: "application/vnd.ms-visio.drawing"
​​​
11: "application/vnd.wordperfect"
​​​
12: "application/msonenote"
​​​
13: "application/msword"
​​​
14: "application/rtf"
​​​
15: "text/rtf"
​​​
16: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
​​​
17: "application/vnd.openxmlformats-officedocument.wordprocessingml.template"
​​​
18: "application/vnd.ms-word.document.macroEnabled.12"
​​​
19: "application/vnd.ms-word.template.macroEnabled.12"
​​​
20: "application/vnd.ms-excel"
​​​
21: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
​​​
22: "application/vnd.openxmlformats-officedocument.spreadsheetml.template"
​​​
23: "application/vnd.ms-excel.sheet.macroEnabled.12"
​​​
24: "application/vnd.ms-excel.template.macroEnabled.12"
​​​
25: "application/vnd.ms-excel.addin.macroEnabled.12"
​​​
26: "application/vnd.ms-excel.sheet.binary.macroEnabled.12"
​​​
27: "application/vnd.ms-powerpoint"
​​​
28: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
​​​
29: "application/vnd.openxmlformats-officedocument.presentationml.template"
​​​
30: "application/vnd.openxmlformats-officedocument.presentationml.slideshow"
​​​
31: "application/vnd.ms-powerpoint.addin.macroEnabled.12"
​​​
32: "application/vnd.ms-powerpoint.presentation.macroEnabled.12"
​​​
33: "application/vnd.ms-powerpoint.template.macroEnabled.12"
​​​
34: "application/vnd.ms-powerpoint.slideshow.macroEnabled.12"
​​​
35: "text/csv"
​​​
__ob__: Object { shallow: false, mock: false, vmCount: 0, … }
​​​
<get 0()>: function get()​​​
<set 0()>: function set(t)​​​
<get 1()>: function get()​​​
<set 1()>: function set(t)​​​
<get 3()>: function get()​​​
<set 3()>: function set(t)​​​
<get 4()>: function get()​​​
<set 4()>: function set(t)​​​
<get 5()>: function get()​​​
<set 5()>: function set(t)​​​
<get 7()>: function get()​​​
<set 7()>: function set(t)​​​
<get 8()>: function get()​​​
<set 8()>: function set(t)​​​
<get 9()>: function get()​​​
<set 9()>: function set(t)​​​
<get 10()>: function get()​​​
<set 10()>: function set(t)​​​
<get 11()>: function get()​​​
<set 11()>: function set(t)​​​
<get 12()>: function get()​​​
<set 12()>: function set(t)​​​
<get 13()>: function get()​​​
<set 13()>: function set(t)​​​
<get 14()>: function get()​​​
<set 14()>: function set(t)​​​
<get 15()>: function get()​​​
<set 15()>: function set(t)​​​
<get 16()>: function get()​​​
<set 16()>: function set(t)​​​
<get 17()>: function get()​​​
<set 17()>: function set(t)​​​
<get 18()>: function get()​​​
<set 18()>: function set(t)​​​
<get 19()>: function get()​​​
<set 19()>: function set(t)​​​
<get 20()>: function get()​​​
<set 20()>: function set(t)​​​
<get 21()>: function get()​​​
<set 21()>: function set(t)​​​
<get 22()>: function get()​​​
<set 22()>: function set(t)​​​
<get 23()>: function get()​​​
<set 23()>: function set(t)​​​
<get 24()>: function get()​​​
<set 24()>: function set(t)​​​
<get 25()>: function get()​​​
<set 25()>: function set(t)​​​
<get 26()>: function get()​​​
<set 26()>: function set(t)​​​
<get 27()>: function get()​​​
<set 27()>: function set(t)​​​
<get 28()>: function get()​​​
<set 28()>: function set(t)​​​
<get 29()>: function get()​​​
<set 29()>: function set(t)​​​
<get 30()>: function get()​​​
<set 30()>: function set(t)​​​
<get 31()>: function get()​​​
<set 31()>: function set(t)​​​
<get 32()>: function get()​​​
<set 32()>: function set(t)​​​
<get 33()>: function get()​​​
<set 33()>: function set(t)​​​
<get 34()>: function get()​​​
<set 34()>: function set(t)​​​
<get 35()>: function get()​​​
<set 35()>: function set(t)​​​
<prototype>: Object { … }
​​
theme: "light"
​​
<get component()>: function get()​​
<set component()>: function set(t)​​
<get group()>: function get()​​
<set group()>: function set(t)​​
<get id()>: function get()​​
<set id()>: function set(t)​​
<get mimes()>: function get()​​
<set mimes()>: function set(t)​​
<get theme()>: function get()​​
<set theme()>: function set(t)​​
<prototype>: Object { … }
​
level: 2
​
uid: "user"
​
<prototype>: Object { … }
​​
__defineGetter__: function __defineGetter__()
​​
__defineSetter__: function __defineSetter__()
​​
__lookupGetter__: function __lookupGetter__()
​​
__lookupSetter__: function __lookupSetter__()
​​
__proto__:
​​
constructor: function Object()
​​
hasOwnProperty: function hasOwnProperty()
​​
isPrototypeOf: function isPrototypeOf()
​​
propertyIsEnumerable: function propertyIsEnumerable()
​​
toLocaleString: function toLocaleString()
​​
toString: function toString()
​​
valueOf: function valueOf()
​​
<get __proto__()>: function __proto__()
​​
<set __proto__()>: function __proto__()
Same issue with me. Using the nextcloud 26 git version. Tried with collabora demo servers and own versions.
Some more references: https://help.nextcloud.com/t/filetype-association-files-downloading-instead-of-opening/8671/4 https://help.nextcloud.com/t/documents-downloading-instead-of-opening-in-collabora/137767/8
Looks like cURL does not support TLS 1.3. I am guessing. So centos 7 is out. Anyway to get it to work?
Out of scope for here since we don't have any control over this. :) Going to close this out since it's not a bug in this app as far as I can see (and it's rather old now).
[ERROR] viewer: The following handler doesn't have a valid mime array
I don't see any evidence this is an issue today.