nextcloud / related_resources

GNU Affero General Public License v3.0
8 stars 3 forks source link

Related resource are broken #337

Closed ChristophWurst closed 10 months ago

ChristophWurst commented 10 months ago

How to use GitHub


Steps to reproduce

  1. Open a 1:1 chat
  2. Open the sidebar

Expected behaviour

See related resources

Actual behaviour

See an error message

Related resources Error getting related resources. Please contact your system administrator if you have any questions.

Talk app

Talk app version: (see apps admin page: /index.php/settings/apps)

Custom Signaling server configured: yes/no and version (see additional admin settings: /index.php/index.php/settings/admin/talk#signaling_server)

Custom TURN server configured: yes/no (see additional admin settings: /index.php/settings/admin/talk#turn_server)

Custom STUN server configured: yes/no (see additional admin settings: /index.php/settings/admin/talk#stun_server)

Browser

Microphone available: yes/no

Camera available: yes/no

Operating system: Windows/Ubuntu/...

Browser name: Firefox/Chrome/...

Browser version: 85/96/...

Browser log

``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```

Server configuration

Operating system: Ubuntu/RedHat/...

Web server: Apache/Nginx

Database: MySQL/Maria/SQLite/PostgreSQL

PHP version: 8.0/8.1/8.2

Nextcloud Version: (see admin page)

List of activated apps:

``` If you have access to your command line run e.g.: sudo -u www-data php occ app:list from within your server installation folder ```

Nextcloud configuration:

``` If you have access to your command line run e.g.: sudo -u www-data php occ config:list system from within your Nextcloud installation folder ```

Server log (data/nextcloud.log)

https://nextcloud-gmbh.sentry.io/issues/4625545370

ChristophWurst commented 10 months ago

Browser network log shows a GET /ocs/v2.php/apps/related_resources/related/talk?itemId=12345&resourceType={resourceType}&limit={limit}&format=json.

ChristophWurst commented 10 months ago

Possibly an upstream issue of https://github.com/nextcloud-libraries/nextcloud-vue/blame/b674299dd618040567ebe683a509613494c9ca37/src/components/NcRelatedResourcesPanel/NcRelatedResourcesPanel.vue#L190-L195 and not handling null values for the new but optional props.

ChristophWurst commented 10 months ago

cc @GretaD

nickvergessen commented 10 months ago
{
  "reqId": "OYLuNeq3pXumfxGucE53",
  "level": 3,
  "time": "2024-01-08T13:07:54+00:00",
  "remoteAddr": "…",
  "user": "you :)",
  "app": "related_resources",
  "method": "GET",
  "url": "/ocs/v2.php/apps/related_resources/related/talk?itemId=CONVERSATION_TOKEN&resourceType=%7BresourceType%7D&limit=%7Blimit%7D&format=json",
  "message": "Exception thrown: OCA\\RelatedResources\\Exceptions\\RelatedResourceProviderNotFound",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0",
  "version": "28.0.1.1",
  "exception": {
    "Exception": "OCA\\RelatedResources\\Exceptions\\RelatedResourceProviderNotFound",
    "Message": "",
    "Code": 0,
    "Trace": [
      {
        "file": "…/apps/related_resources/lib/Service/RelatedService.php",
        "line": 173,
        "function": "getRelatedResourceProvider",
        "class": "OCA\\RelatedResources\\Service\\RelatedService",
        "type": "->",
        "args": [
          "{resourceType}"
        ]
      },
      {
        "file": "…/apps/related_resources/lib/Service/RelatedService.php",
        "line": 127,
        "function": "retrieveRelatedToItem",
        "class": "OCA\\RelatedResources\\Service\\RelatedService",
        "type": "->",
        "args": [
          "talk",
          "CONVERSATION_TOKEN",
          "{resourceType}"
        ]
      },
      {
        "file": "…/apps/related_resources/lib/Controller/ApiController.php",
        "line": 108,
        "function": "getRelatedToItem",
        "class": "OCA\\RelatedResources\\Service\\RelatedService",
        "type": "->",
        "args": [
          "talk",
          "CONVERSATION_TOKEN",
          7,
          "{resourceType}"
        ]
      },
      {
        "file": "…/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 230,
        "function": "getRelatedResources",
        "class": "OCA\\RelatedResources\\Controller\\ApiController",
        "type": "->",
        "args": [
          "talk",
          "CONVERSATION_TOKEN",
          7,
          "{resourceType}"
        ]
      },
      {
        "file": "…/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 137,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\RelatedResources\\Controller\\ApiController"
          ],
          "getRelatedResources"
        ]
      },
      {
        "file": "…/lib/private/AppFramework/App.php",
        "line": 184,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\RelatedResources\\Controller\\ApiController"
          ],
          "getRelatedResources"
        ]
      },
      {
        "file": "…/lib/private/Route/Router.php",
        "line": 315,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\RelatedResources\\Controller\\ApiController",
          "getRelatedResources",
          [
            "OC\\AppFramework\\DependencyInjection\\DIContainer"
          ],
          [
            "talk",
            "ocs.related_resources.Api.getRelatedResources"
          ]
        ]
      },
      {
        "file": "…/ocs/v1.php",
        "line": 65,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/ocsapp/apps/related_resources/related/talk"
        ]
      },
      {
        "file": "…/ocs/v2.php",
        "line": 23,
        "args": [
          "…/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "…/apps/related_resources/lib/Service/RelatedService.php",
    "Line": 605,
    "message": "",
    "exception": {},
    "CustomMessage": "Exception thrown: OCA\\RelatedResources\\Exceptions\\RelatedResourceProviderNotFound"
  }
}
nickvergessen commented 10 months ago

Due to https://github.com/nextcloud/related_resources/issues/17 this is not part of Talk, so moving to related resources repo

ArtificialOwl commented 10 months ago

Front-end's malformed url, pinging @Pytal !