richdocuments icon indicating copy to clipboard operation
richdocuments copied to clipboard

Unable to Save Documents in Collabora Online - WOPI Token Error

Open alexisdeviney opened this issue 1 year ago • 3 comments

Steps to reproduce

  1. Open a document in Collabora Online through Nextcloud
  2. Make changes to the document
  3. Click the save button OR wait for auto-save
  4. Observe that the "Last saved" timestamp doesn't update

Expected behavior

  • Document should save when the save button is clicked
  • Auto-save should work periodically
  • "Last saved" timestamp should update to reflect successful saves

Actual behavior

  • Clicking save button appears to do nothing
  • Auto-save does not appear to function
  • "Last saved" timestamp remains stale (e.g., shows "4 hours ago" despite recent save attempts)
  • No error message is shown to users despite save failure

Other information

Host OS

Ubuntu 24.04 LTS

Output of sudo docker info

Client: Docker Engine - Community
 Version:    27.3.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.17.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.7
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 9
  Running: 8
  Paused: 0
  Stopped: 1
 Images: 9
 Server Version: 27.3.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 57f17b0a6295a39009d861b89e3b3b87b005ca27
 runc version: v1.1.14-0-g2c9f560
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.8.0-48-generic
 Operating System: Ubuntu 24.04 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 15.62GiB
 Name: dev-nextcloud2
 ID: b1272033-16a6-4940-83dd-78a68b54f4fd
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Docker run command or docker-compose file that you used

services:
  caddy:
    image: caddy:alpine
    restart: unless-stopped
    container_name: caddy
    volumes:
      - ./Caddyfile:/etc/caddy/Caddyfile
      - ./certs:/certs
      - ./config:/config
      - ./data:/data
      - ./sites:/srv
    network_mode: "host"

  nextcloud:
    image: nextcloud/all-in-one:latest
    restart: unless-stopped
    container_name: nextcloud-aio-mastercontainer
    ports:
      - "8080:8080"
    environment:
      - APACHE_PORT=11000
      - SKIP_DOMAIN_VALIDATION=true
      - NEXTCLOUD_MEMORY_LIMIT=1024M
    volumes:
      - nextcloud_aio_mastercontainer:/mnt/docker-aio-config
      - /var/run/docker.sock:/var/run/docker.sock:ro
    depends_on:
      - caddy
    deploy:
      resources:
        limits:
          memory: 16g

volumes:
  nextcloud_aio_mastercontainer:
    name: nextcloud_aio_mastercontainer

Other valuable info

Error Logs:

Error richdocuments
Time: Nov 19, 2024, 1:03:17 PM
UnknownTokenException Could not find token.
Failed to validate WOPI access during save

Request Details:
- Method: POST
- URL: /index.php/apps/richdocuments/wopi/files/1145_ocxnipeqsbfu/contents
- User Agent: COOLWSD HTTP Agent 24.04.9.1
- Version: 29.0.8.1

alexisdeviney avatar Nov 20 '24 01:11 alexisdeviney

Hello, just a quick question. Is the log information you provided an excerpt from the browser logs or the nextcloud.log file? It might help to have a link to the full logs since they might provide a little more context. It's not immediately clear (to me, at least) what the issue could be (the logs could help there).

Also, are you using the built-in CODE server, or do you have a standalone Collabora server?

elzody avatar Nov 20 '24 15:11 elzody

Thanks for your response!

I am using a standalone Collabora server in a separate container called nextcloud-aio-collabora provisioned by Nextcloud AIO.

Here is the full log context around the WOPI token error.

TL;DR, this shows:

  1. Initial error at 12:05 PM: "No valid file found for wopi token"
  2. Then at 12:44 PM: Multiple 502 Bad Gateway errors trying to connect to Collabora:
    • Failed to fetch capabilities
    • Failed to fetch discovery
  3. Finally at 1:03 PM: "Failed to validate WOPI access during save" with "UnknownTokenException"
[
  {
    "reqId": "O8DOjIwyQgovPxuWi4HD",
    "level": 2,
    "time": "2024-11-19T20:05:43+00:00",
    "remoteAddr": "127.0.0.1",
    "user": "--",
    "app": "richdocuments",
    "method": "POST",
    "url": "/index.php/apps/richdocuments/wopi/files/1145_ocxnipeqsbfu/contents?access_token=G6xJ9CRLSPJAbaUoyfGS9m4w3jFp8dzF&access_token_ttl=0",
    "message": "No valid file found for wopi token",
    "userAgent": "COOLWSD HTTP Agent 24.04.9.1",
    "version": "29.0.8.1",
    "exception": {
      "Exception": "OCP\\Files\\NotFoundException",
      "Message": "No valid file found for wopi token",
      "Code": 0,
      "Trace": [
        {
          "file": "/var/www/html/custom_apps/richdocuments/lib/Controller/WopiController.php",
          "line": 481,
          "function": "getFileForWopiToken",
          "class": "OCA\\Richdocuments\\Controller\\WopiController",
          "type": "->",
          "args": [
            [
              "OCA\\Richdocuments\\Db\\Wopi",
              13
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 232,
          "function": "putFile",
          "class": "OCA\\Richdocuments\\Controller\\WopiController",
          "type": "->",
          "args": [
            "1145",
            "G6xJ9CRLSPJAbaUoyfGS9m4w3jFp8dzF"
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 138,
          "function": "executeController",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            [
              "OCA\\Richdocuments\\Controller\\WopiController"
            ],
            "putFile"
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/App.php",
          "line": 184,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            [
              "OCA\\Richdocuments\\Controller\\WopiController"
            ],
            "putFile"
          ]
        },
        {
          "file": "/var/www/html/lib/private/Route/Router.php",
          "line": 331,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::",
          "args": [
            "OCA\\Richdocuments\\Controller\\WopiController",
            "putFile",
            [
              "OC\\AppFramework\\DependencyInjection\\DIContainer"
            ],
            [
              "1145_ocxnipeqsbfu",
              "richdocuments.wopi.putfile"
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/base.php",
          "line": 1058,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "->",
          "args": [
            "/apps/richdocuments/wopi/files/1145_ocxnipeqsbfu/contents"
          ]
        },
        {
          "file": "/var/www/html/index.php",
          "line": 49,
          "function": "handleRequest",
          "class": "OC",
          "type": "::",
          "args": []
        }
      ],
      "File": "/var/www/html/custom_apps/richdocuments/lib/Controller/WopiController.php",
      "Line": 837,
      "message": "No valid file found for wopi token",
      "exception": {},
      "CustomMessage": "No valid file found for wopi token"
    }
  },
  {
    "reqId": "O8DOjIwyQgovPxuWi4HD",
    "level": 2,
    "time": "2024-11-19T20:05:43+00:00",
    "remoteAddr": "127.0.0.1",
    "user": "--",
    "app": "richdocuments",
    "method": "POST",
    "url": "/index.php/apps/richdocuments/wopi/files/1145_ocxnipeqsbfu/contents?access_token=G6xJ9CRLSPJAbaUoyfGS9m4w3jFp8dzF&access_token_ttl=0",
    "message": "No valid file found for wopi token",
    "userAgent": "COOLWSD HTTP Agent 24.04.9.1",
    "version": "29.0.8.1",
    "exception": {
      "Exception": "OCP\\Files\\NotFoundException",
      "Message": "No valid file found for wopi token",
      "Code": 0,
      "Trace": [
        {
          "file": "/var/www/html/custom_apps/richdocuments/lib/Controller/WopiController.php",
          "line": 481,
          "function": "getFileForWopiToken",
          "class": "OCA\\Richdocuments\\Controller\\WopiController",
          "type": "->",
          "args": [
            [
              "OCA\\Richdocuments\\Db\\Wopi",
              13
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 232,
          "function": "putFile",
          "class": "OCA\\Richdocuments\\Controller\\WopiController",
          "type": "->",
          "args": [
            "1145",
            "G6xJ9CRLSPJAbaUoyfGS9m4w3jFp8dzF"
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 138,
          "function": "executeController",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            [
              "OCA\\Richdocuments\\Controller\\WopiController"
            ],
            "putFile"
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/App.php",
          "line": 184,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            [
              "OCA\\Richdocuments\\Controller\\WopiController"
            ],
            "putFile"
          ]
        },
        {
          "file": "/var/www/html/lib/private/Route/Router.php",
          "line": 331,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::",
          "args": [
            "OCA\\Richdocuments\\Controller\\WopiController",
            "putFile",
            [
              "OC\\AppFramework\\DependencyInjection\\DIContainer"
            ],
            [
              "1145_ocxnipeqsbfu",
              "richdocuments.wopi.putfile"
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/base.php",
          "line": 1058,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "->",
          "args": [
            "/apps/richdocuments/wopi/files/1145_ocxnipeqsbfu/contents"
          ]
        },
        {
          "file": "/var/www/html/index.php",
          "line": 49,
          "function": "handleRequest",
          "class": "OC",
          "type": "::",
          "args": []
        }
      ],
      "File": "/var/www/html/custom_apps/richdocuments/lib/Controller/WopiController.php",
      "Line": 837,
      "message": "No valid file found for wopi token",
      "exception": {},
      "CustomMessage": "No valid file found for wopi token"
    }
  },
  {
    "reqId": "TCggQ5PTculLlzwhuKPT",
    "level": 3,
    "time": "2024-11-19T20:44:59+00:00",
    "remoteAddr": "",
    "user": "--",
    "app": "richdocuments",
    "method": "",
    "url": "--",
    "message": "Failed to fetch capabilities: Server error: `GET https://{servername}/hosting/capabilities` resulted in a `502 Bad Gateway` response",
    "userAgent": "--",
    "version": "29.0.8.1",
    "exception": {
      "Exception": "GuzzleHttp\\Exception\\ServerException",
      "Message": "Server error: `GET https://{servername}/hosting/capabilities` resulted in a `502 Bad Gateway` response",
      "Code": 502,
      "Trace": [
        {
          "file": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php",
          "line": 72,
          "function": "create",
          "class": "GuzzleHttp\\Exception\\RequestException",
          "type": "::",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 204,
          "function": "GuzzleHttp\\{closure}",
          "class": "GuzzleHttp\\Middleware",
          "type": "::",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 153,
          "function": "callHandler",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "::",
          "args": [
            1,
            "*** sensitive parameters replaced ***",
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/TaskQueue.php",
          "line": 48,
          "function": "GuzzleHttp\\Promise\\{closure}",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "::",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 248,
          "function": "run",
          "class": "GuzzleHttp\\Promise\\TaskQueue",
          "type": "->",
          "args": [
            true
          ]
        },
        {
          "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 224,
          "function": "invokeWaitFn",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 269,
          "function": "waitIfPending",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 226,
          "function": "invokeWaitList",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 62,
          "function": "waitIfPending",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php",
          "line": 189,
          "function": "wait",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/lib/private/Http/Client/Client.php",
          "line": 230,
          "function": "request",
          "class": "GuzzleHttp\\Client",
          "type": "->",
          "args": [
            "get",
            "https://{servername}/hosting/capabilities",
            [
              false,
              5,
              [
                true
              ],
              [
                "Nextcloud Server Crawler",
                "gzip"
              ],
              true
            ]
          ]
        },
        {
          "file": "/var/www/html/custom_apps/richdocuments/lib/Service/CapabilitiesService.php",
          "line": 142,
          "function": "get",
          "class": "OC\\Http\\Client\\Client",
          "type": "->",
          "args": [
            "https://{servername}/hosting/capabilities",
            [
              5,
              [
                true
              ],
              false
            ]
          ]
        },
        {
          "file": "/var/www/html/custom_apps/richdocuments/lib/Service/CachedRequestService.php",
          "line": 74,
          "function": "sendRequest",
          "class": "OCA\\Richdocuments\\Service\\CapabilitiesService",
          "type": "->",
          "args": [
            [
              "OC\\Http\\Client\\Client"
            ]
          ]
        },
        {
          "file": "/var/www/html/custom_apps/richdocuments/lib/Backgroundjobs/ObtainCapabilities.php",
          "line": 52,
          "function": "fetch",
          "class": "OCA\\Richdocuments\\Service\\CachedRequestService",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/lib/public/BackgroundJob/Job.php",
          "line": 80,
          "function": "run",
          "class": "OCA\\Richdocuments\\Backgroundjobs\\ObtainCapabilities",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/lib/public/BackgroundJob/TimedJob.php",
          "line": 102,
          "function": "start",
          "class": "OCP\\BackgroundJob\\Job",
          "type": "->",
          "args": [
            [
              "OC\\BackgroundJob\\JobList"
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/public/BackgroundJob/TimedJob.php",
          "line": 92,
          "function": "start",
          "class": "OCP\\BackgroundJob\\TimedJob",
          "type": "->",
          "args": [
            [
              "OC\\BackgroundJob\\JobList"
            ]
          ]
        },
        {
          "file": "/var/www/html/cron.php",
          "line": 177,
          "function": "execute",
          "class": "OCP\\BackgroundJob\\TimedJob",
          "type": "->",
          "args": [
            [
              "OC\\BackgroundJob\\JobList"
            ]
          ]
        }
      ],
      "File": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/Exception/RequestException.php",
      "Line": 113,
      "message": "Failed to fetch capabilities: Server error: `GET https://{servername}/hosting/capabilities` resulted in a `502 Bad Gateway` response",
      "exception": {},
      "CustomMessage": "Failed to fetch capabilities: Server error: `GET https://{servername}/hosting/capabilities` resulted in a `502 Bad Gateway` response"
    }
  },
  {
    "reqId": "TCggQ5PTculLlzwhuKPT",
    "level": 3,
    "time": "2024-11-19T20:44:59+00:00",
    "remoteAddr": "",
    "user": "--",
    "app": "richdocuments",
    "method": "",
    "url": "--",
    "message": "Failed to fetch discovery: Server error: `GET https://{servername}/hosting/discovery` resulted in a `502 Bad Gateway` response",
    "userAgent": "--",
    "version": "29.0.8.1",
    "exception": {
      "Exception": "GuzzleHttp\\Exception\\ServerException",
      "Message": "Server error: `GET https://{servername}/hosting/discovery` resulted in a `502 Bad Gateway` response",
      "Code": 502,
      "Trace": [
        {
          "file": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php",
          "line": 72,
          "function": "create",
          "class": "GuzzleHttp\\Exception\\RequestException",
          "type": "::",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 204,
          "function": "GuzzleHttp\\{closure}",
          "class": "GuzzleHttp\\Middleware",
          "type": "::",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 153,
          "function": "callHandler",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "::",
          "args": [
            1,
            "*** sensitive parameters replaced ***",
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/TaskQueue.php",
          "line": 48,
          "function": "GuzzleHttp\\Promise\\{closure}",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "::",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 248,
          "function": "run",
          "class": "GuzzleHttp\\Promise\\TaskQueue",
          "type": "->",
          "args": [
            true
          ]
        },
        {
          "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 224,
          "function": "invokeWaitFn",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 269,
          "function": "waitIfPending",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 226,
          "function": "invokeWaitList",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php",
          "line": 62,
          "function": "waitIfPending",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php",
          "line": 189,
          "function": "wait",
          "class": "GuzzleHttp\\Promise\\Promise",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/lib/private/Http/Client/Client.php",
          "line": 230,
          "function": "request",
          "class": "GuzzleHttp\\Client",
          "type": "->",
          "args": [
            "get",
            "https://{servername}/hosting/discovery",
            [
              false,
              5,
              [
                true
              ],
              [
                "Nextcloud Server Crawler",
                "gzip"
              ],
              true
            ]
          ]
        },
        {
          "file": "/var/www/html/custom_apps/richdocuments/lib/Service/DiscoveryService.php",
          "line": 75,
          "function": "get",
          "class": "OC\\Http\\Client\\Client",
          "type": "->",
          "args": [
            "https://{servername}/hosting/discovery",
            [
              5,
              [
                true
              ],
              false
            ]
          ]
        },
        {
          "file": "/var/www/html/custom_apps/richdocuments/lib/Service/CachedRequestService.php",
          "line": 74,
          "function": "sendRequest",
          "class": "OCA\\Richdocuments\\Service\\DiscoveryService",
          "type": "->",
          "args": [
            [
              "OC\\Http\\Client\\Client"
            ]
          ]
        },
        {
          "file": "/var/www/html/custom_apps/richdocuments/lib/Backgroundjobs/ObtainCapabilities.php",
          "line": 58,
          "function": "fetch",
          "class": "OCA\\Richdocuments\\Service\\CachedRequestService",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/lib/public/BackgroundJob/Job.php",
          "line": 80,
          "function": "run",
          "class": "OCA\\Richdocuments\\Backgroundjobs\\ObtainCapabilities",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/lib/public/BackgroundJob/TimedJob.php",
          "line": 102,
          "function": "start",
          "class": "OCP\\BackgroundJob\\Job",
          "type": "->",
          "args": [
            [
              "OC\\BackgroundJob\\JobList"
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/public/BackgroundJob/TimedJob.php",
          "line": 92,
          "function": "start",
          "class": "OCP\\BackgroundJob\\TimedJob",
          "type": "->",
          "args": [
            [
              "OC\\BackgroundJob\\JobList"
            ]
          ]
        },
        {
          "file": "/var/www/html/cron.php",
          "line": 177,
          "function": "execute",
          "class": "OCP\\BackgroundJob\\TimedJob",
          "type": "->",
          "args": [
            [
              "OC\\BackgroundJob\\JobList"
            ]
          ]
        }
      ],
      "File": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/Exception/RequestException.php",
      "Line": 113,
      "message": "Failed to fetch discovery: Server error: `GET https://{servername}/hosting/discovery` resulted in a `502 Bad Gateway` response",
      "exception": {},
      "CustomMessage": "Failed to fetch discovery: Server error: `GET https://{servername}/hosting/discovery` resulted in a `502 Bad Gateway` response"
    }
  },
  {
    "reqId": "OrcLflQk5soelu4ikt2l",
    "level": 3,
    "time": "2024-11-19T21:03:17+00:00",
    "remoteAddr": "127.0.0.1",
    "user": "--",
    "app": "richdocuments",
    "method": "POST",
    "url": "/index.php/apps/richdocuments/wopi/files/1145_ocxnipeqsbfu/contents?access_token=&access_token_ttl=0",
    "message": "Failed to validate WOPI access during save",
    "userAgent": "COOLWSD HTTP Agent 24.04.9.1",
    "version": "29.0.8.1",
    "exception": {
      "Exception": "OCA\\Richdocuments\\Exceptions\\UnknownTokenException",
      "Message": "Could not find token.",
      "Code": 0,
      "Trace": [
        {
          "file": "/var/www/html/custom_apps/richdocuments/lib/Middleware/WOPIMiddleware.php",
          "line": 81,
          "function": "getWopiForToken",
          "class": "OCA\\Richdocuments\\Db\\WopiMapper",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php",
          "line": 96,
          "function": "beforeController",
          "class": "OCA\\Richdocuments\\Middleware\\WOPIMiddleware",
          "type": "->",
          "args": [
            [
              "OCA\\Richdocuments\\Controller\\WopiController"
            ],
            "putFile"
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 130,
          "function": "beforeController",
          "class": "OC\\AppFramework\\Middleware\\MiddlewareDispatcher",
          "type": "->",
          "args": [
            [
              "OCA\\Richdocuments\\Controller\\WopiController"
            ],
            "putFile"
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/App.php",
          "line": 184,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            [
              "OCA\\Richdocuments\\Controller\\WopiController"
            ],
            "putFile"
          ]
        },
        {
          "file": "/var/www/html/lib/private/Route/Router.php",
          "line": 331,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::",
          "args": [
            "OCA\\Richdocuments\\Controller\\WopiController",
            "putFile",
            [
              "OC\\AppFramework\\DependencyInjection\\DIContainer"
            ],
            [
              "1145_ocxnipeqsbfu",
              "richdocuments.wopi.putfile"
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/base.php",
          "line": 1058,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "->",
          "args": [
            "/apps/richdocuments/wopi/files/1145_ocxnipeqsbfu/contents"
          ]
        },
        {
          "file": "/var/www/html/index.php",
          "line": 49,
          "function": "handleRequest",
          "class": "OC",
          "type": "::",
          "args": []
        }
      ],
      "File": "/var/www/html/custom_apps/richdocuments/lib/Db/WopiMapper.php",
      "Line": 160,
      "message": "Failed to validate WOPI access during save",
      "exception": {},
      "CustomMessage": "Failed to validate WOPI access during save"
    }
  }
]

alexisdeviney avatar Nov 20 '24 17:11 alexisdeviney

Are you still experiencing this behavior, @alexisdeviney?

joshtrichards avatar Oct 30 '25 02:10 joshtrichards