nextcloud / richdocuments

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

[Bug]: Code arm64 server stopped working after version 27 upgrade #3080

Open astrometrics opened 1 year ago

astrometrics commented 1 year ago

⚠️ This issue respects the following points: ⚠️

Bug description

Code arm64 server stopped working after version 27 upgrade... worked mostly fine before

Steps to reproduce

  1. Upgrade to NC 27
  2. Try to use office document
  3. fails

Expected behavior

just open office document normally via NC

Installation method

Community Manual installation with Archive

Nextcloud Server version

27

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

PostgreSQL

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

Upgraded to a MAJOR version (ex. 22 to 23)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "xx.x"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "27.0.1.2",
        "overwrite.cli.url": "https:\/\/xx.x\/nc",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "dbpersistent": true,
        "installed": true,
        "app_install_overwrite": [
            "drawio",
            "wopi",
            "richdocumentscode_arm64",
            "richdocumentscode",
            "files_mindmap",
            "appointments",
            "carnet",
            "checksum",
            "extract",
            "collectives",
            "cookbook",
            "diary",
            "duplicatefinder",
            "mediadc",
            "timetracker",
            "timemanager",
            "tables",
            "apporder",
            "impersonate",
            "health",
            "files_markdown",
            "files_accesscontrol",
            "text",
            "updatenotification",
            "files_pdfviewer",
            "notifications",
            "privacy",
            "photos",
            "logreader",
            "bookmarks_fulltextsearch",
            "maps"
        ],
        "maintenance": false,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "reference_opengraph": false,
        "enable_previews": false,
        "preview_libreoffice_path": "\/usr\/bin\/libreoffice",
        "preview_max_memory": -1,
        "preview_max_filesize_image": -1,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\PDF",
            "OC\\Preview\\SVG",
            "OC\\Preview\\TIFF",
            "OC\\Preview\\OpenDocument"
        ],
        "allow_local_remote_servers": true,
        "loglevel": 3,
        "has_rebuilt_cache": true,
        "theme": "",
        "updater.release.channel": "stable"
    }
}

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

thgoebel commented 1 year ago

I have a similar issue after upgrading to 27.0.1. Nextcloud Office does not load. On 27.0.0 Nextcloud Office worked.

In settings/admin/logging I see:

[richdocuments] Error: Exception: Could not find urlsrc in WOPI at <<closure>>

0. /var/www/html/custom_apps/richdocuments/lib/TokenManager.php line 207
   OCA\Richdocuments\WOPI\Parser->getUrlSrc("application/vnd ... t")
1. /var/www/html/custom_apps/richdocuments/lib/Controller/DocumentController.php line 181
   OCA\Richdocuments\TokenManager->getToken("*** sensitive parameters replaced ***")
2. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 230
   OCA\Richdocuments\Controller\DocumentController->index("*** sensitive parameters replaced ***", "/Documents/Sheet.ods")
3. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 137
   OC\AppFramework\Http\Dispatcher->executeController(["OCA\\Richdocum ... "], "index")
4. /var/www/html/lib/private/AppFramework/App.php line 183
   OC\AppFramework\Http\Dispatcher->dispatch(["OCA\\Richdocum ... "], "index")
5. /var/www/html/lib/private/Route/Router.php line 315
   OC\AppFramework\App::main("OCA\\Richdocume ... r", "index", ["OC\\AppFramewo ... "], ["richdocuments.document.index"])
6. /var/www/html/lib/base.php line 1071
   OC\Route\Router->match("/apps/richdocuments/index")
7. /var/www/html/index.php line 36
   OC::handleRequest()

GET /index.phpdocuments/index?fileId=123456&requesttoken=<snip>&path=%2FDocuments%2FLSheet.ods
from 1.2.3.4 by thore at 2023-07-21T19:46:53+00:00

Searching Github, this has been an error in the past. The following fixed it for me (as suggested in this issue comment):

  1. Go to cloud.example.com/settings/admin/richdocuments as admin
  2. Click on "Use the built-in CODE ..." (even though it was already selected before)
  3. Note the popup "Saved" in the top right

This seems to save the correct URL and the built-in server works again.

astrometrics commented 1 year ago

@thgoebel, I've done that in the past and it worked.... often it was needed after reboot. But it's not working this time. I have already uninstalled deleted and reinstalled to no avail... The impression I get is NC Office is a good idea, but a bit too flaky... too much focus on new features and little on robustness and performance improvements... there's also security weaknesses and it is heavy on resources. But I hope NC team get this right, correct values and such, and can produce a more robust and secure Office in the future.

djzwerg commented 11 months ago

Same here for me. After installing a Vanialla setup (NC and Collabora with Docker) I'm unable to open/edit office files through Nextcloud. The settings are correct (Nextcloud is able to connect to Collabora).

With a NC 26 setup it is working fine.

R0Wi commented 11 months ago

Maybe https://github.com/nextcloud/richdocuments/pull/3252 will help you to find the actual underlying error. In my case saving the config again to clear the cache did the trick. Because then the WOPI discovery will get executed again and this time my WOPI backend server responded with a valid payload.

UltraBlackLinux commented 11 months ago

that unfortunately didn't do the trick for me. I have already tried saving the config, but nothing changed, and I've been continuously running my instance for the past three weeks

I don't know if anyone has ever mentioned this, but for me the issue seems to be that nextcloud does not use my changed webroot for everything. All the nextcloud office requests just completely ignore it: e.g. https://website.com/custom_apps/richdocumentscode/proxy.php?status= This means that share links result in obvious 404s