nextcloud / richdocuments

📑 Collabora Online for Nextcloud
https://nextcloud.com/collaboraonline
349 stars 115 forks source link

Error with Collabora server #2316

Closed ta123q closed 1 year ago

ta123q commented 2 years ago

⚠️ This issue respects the following points: ⚠️

Bug description

Trying to connect collabora to nextcloud but the document failed to load, as show in the attached SS. image

image

Steps to reproduce

  1. collabora server is connected
  2. when try to open document it loads for a time then fails

Expected behavior

document should load

Installation method

Manual installation

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

No response

What user-backends are you using?

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "10.x.x.x.",
            "nextcloud.xyx"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "24.0.1.1",
        "overwrite.cli.url": "http:\/\/10.x.x.x",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "app_install_overwrite": [
            "documentserver_community"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "maintenance": false
    }
}

List of activated Apps

Enabled:
  - accessibility: 1.10.0
  - activity: 2.16.0
  - announcementcenter: 6.3.1
  - approval: 1.0.9
  - bruteforcesettings: 2.4.0
  - calendar: 3.3.2
  - circles: 24.0.0
  - cloud_federation_api: 1.7.0
  - comments: 1.14.0
  - contacts: 4.1.1
  - contactsinteraction: 1.5.0
  - dashboard: 7.4.0
  - dav: 1.22.0
  - deck: 1.7.1
  - documentserver_community: 0.1.12
  - federatedfilesharing: 1.14.0
  - federation: 1.14.0
  - files: 1.19.0
  - files_accesscontrol: 1.14.0
  - files_automatedtagging: 1.14.0
  - files_fulltextsearch: 24.0.0
  - files_fulltextsearch_tesseract: 24.0.0
  - files_pdfviewer: 2.5.0
  - files_rightclick: 1.3.0
  - files_sharing: 1.16.2
  - files_trashbin: 1.14.0
  - files_versions: 1.17.0
  - files_videoplayer: 1.13.0
  - forms: 2.5.1
  - fulltextsearch: 24.0.0
  - fulltextsearch_elasticsearch: 24.0.0
  - logreader: 2.9.0
  - lookup_server_connector: 1.12.0
  - mail: 1.13.4
  - nextcloud_announcements: 1.13.0
  - notifications: 2.12.0
  - notify_push: 0.4.0
  - oauth2: 1.12.0
  - password_policy: 1.14.0
  - photos: 1.6.0
  - privacy: 1.8.0
  - provisioning_api: 1.14.0
  - recommendations: 1.3.0
  - registration: 1.5.0
  - richdocuments: 6.1.1
  - richdocumentscode: 21.11.402
  - serverinfo: 1.14.0
  - settings: 1.6.0
  - sharebymail: 1.14.0
  - socialsharing_email: 2.5.0
  - spreed: 14.0.2
  - support: 1.7.0
  - survey_client: 1.12.0
  - systemtags: 1.14.0
  - tasks: 0.14.4
  - text: 3.5.1
  - theming: 1.15.0
  - twofactor_backupcodes: 1.13.0
  - updatenotification: 1.14.0
  - user_status: 1.4.0
  - viewer: 1.8.0
  - weather_status: 1.4.0
  - workflow_ocr: 1.24.2
  - workflowengine: 2.6.0
Disabled:
  - admin_audit
  - bookmarks_fulltextsearch: 1.2.0
  - encryption
  - files_external
  - firstrunwizard: 2.13.0
  - officeonline: 1.1.3
  - onlyoffice: 7.3.4
  - user_ldap

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"zhDlXbEvtj8X8IEDoNZM","level":4,"time":"2022-07-21T10:22:26+00:00","remoteAddr":"154.73.52.235","user":"admin","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"Could not boot notify_push: Connection refused","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.114 Safari/537.36 Edg/103.0.1264.62","version":"24.0.1.1","exception":{"Exception":"RedisException","Message":"Connection refused","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/RedisFactory.php","line":137,"function":"pconnect","class":"Redis","type":"->"},{"file":"/var/www/nextcloud/lib/private/RedisFactory.php","line":178,"function":"create","class":"OC\\RedisFactory","type":"->"},{"file":"/var/www/nextcloud/apps/notify_push/lib/AppInfo/Application.php","line":62,"function":"getInstance","class":"OC\\RedisFactory","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":162,"function":"OCA\\NotifyPush\\AppInfo\\{closure}","class":"OCA\\NotifyPush\\AppInfo\\Application","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php","line":122,"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":129,"function":"offsetGet","class":"Pimple\\Container","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":459,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":437,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":89,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":108,"function":"array_map"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":116,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":133,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":437,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":57,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/FunctionInjector.php","line":50,"function":"get","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"function":"OC\\AppFramework\\Bootstrap\\{closure}","class":"OC\\AppFramework\\Bootstrap\\FunctionInjector","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/FunctionInjector.php","line":67,"function":"array_map"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/BootContext.php","line":51,"function":"injectFn","class":"OC\\AppFramework\\Bootstrap\\FunctionInjector","type":"->"},{"file":"/var/www/nextcloud/apps/notify_push/lib/AppInfo/Application.php","line":70,"function":"injectFn","class":"OC\\AppFramework\\Bootstrap\\BootContext","type":"->"},{"file":"/var/www/x.taqnya.cloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":190,"function":"boot","class":"OCA\\NotifyPush\\AppInfo\\Application","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":207,"function":"bootApp","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":140,"function":"loadApp","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/ocs/v1.php","line":56,"function":"loadApps","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/ocs/v2.php","line":23,"args":["/var/www/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/RedisFactory.php","Line":137,"CustomMessage":"Could not boot notify_push: Connection refused"}}

Additional info

No response

ta123q commented 2 years ago

Anyone can help?

floriangosse commented 2 years ago

It looks like it's related to https://github.com/nextcloud/richdocuments/issues/1904.

ashworksco commented 2 years ago

This also looks like it's related to this: https://github.com/CollaboraOnline/richdocumentscode/issues/191#issuecomment-1206858231

I've mentioned this link in two other places, the above link and the mention below, hopefully this can help shed some light on diagnosing. It sounds like it's an issue with NC, but could be due to something changing in Collabora, as I've seen this issue occur in NC 22, 23, and 24, but I am not well-skilled enough to dive deeper.

xannor commented 2 years ago

I just got this setup and ran into this issue. My debugging shows that when I configure the server in the admin, I am giving it an https:// url (my nextcloud runs under https also) but it pops up ans says that the nexcloud instance and collabra instance are using different protocols (both are https so I am not sure what it thinks). However when I attempt to load a document and open firefox's debugger, I see a mixed active content error message and a non https http:// url.

I looks like that even though I am running collabra behind an https proxy something in either this app or the collabra setup is not using the https url and instead trying to force a non-https url.

In my case both are running in containers, with ssl disabled, behind nginx proxy manager which is handling ssl. My thoughts are that the app is seeing it is in a nonssl environment (the container) and generating non ssl links causing the browser to ignore it. If this is the case and the app relies on knowing whether or not it is ssl because it generates absolute urls, I consider that a bug. It should generate protocol relative urls //[host]/[path] and then be protocol agnostic and not have issues, or have a setting to force one protocol over the other.

Update: I dug through this some more and I found that this app uses [server-url]/hosting/discovery to determine the URLS and on my setup it is showing http:// not https:// so that is probably my issue, but you may want to check your setups to see if that url shows the correct urls in its response.

Update n2: For anybody who is having an issue like mine, I found the solution. I set the environment variable extra_params to "--o:ssl.enable=false --o:ssl.termination=true" as it seems for some reason termination is set false in the generated coolwsd.xml.

menaceone commented 2 years ago

with version 21.11.3.6 Collabora changed the declaration of the WOPI host in the environment variables of the CODE container. See Doc

before it was -e "domain=<your-dot-escaped-domain>" now it's -e "aliasgroup1=https://<domain1>:443,https://<your-dot-escaped-aliasname1>|<your-dot-escaped-aliasname2>:443" however I use -e "aliasgroup1=https://<your-dot-escaped-aliasname1>|<your-dot-escaped-aliasname2>:443" and it works again.

pedrolucasbp commented 1 year ago

I’m also getting this error and could find an erroneous URL formation in document.js:246.

The URLs from getWopiUrl are coming so:

<form id="loleafletform" name="loleafletform" target="loleafletframe" action="https:// collabora.test.server /browser/2674677/cool.html?WOPISrc=https%3A%2F%2Fnextcloud.test.server%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F900_octpuufqa1dj&amp;title=New%20document.odt&amp;lang=en&amp;closebutton=1&amp;revisionhistory=1" method="post">

I think the problem is the amount of space characters between "https://" and the server name and the rest of the URL.

I have observed the behavior of the browser and the server, there is no request to collabora server at this point, which in my opinion isn't good.

Raudius commented 1 year ago

Hi thanks for the report.

Github is not the ideal place to track configuration issues. I am in the process of cleaning up the repository to keep only the relevant issues (bugs, security issues and feature requests).

Here you can find some resources which should allow you to fix your issue: