Skip to content

Error http 500 on recommendations api after delete files/folders #167

@Xarkam

Description

@Xarkam

Steps to reproduce

  1. Use latest Nextcloud in docker with diocker-compose
version: '2'

services:
  db:
    image: postgres
    container_name: nextcloud-postgresql
    restart: always
    volumes:
      - db:/var/lib/postgresql/data
      - /etc/localtime:/etc/localtime:ro
    networks:
      - nextcloud_network

  app:
    image: nextcloud:apache
    container_name: nextcloud-app
    restart: always
    ports:
      - 8181:80
    volumes:
      - nextcloud:/var/www/html
      - ./app/data:/var/www/html/data
      - ./app/config:/var/www/html/config
      - ./app/custom_apps:/var/www/html/custom_apps
      - ./app/themes:/var/www/html/themes
      - /etc/localtime:/etc/localtime:ro
    environment:
      - VIRTUAL_HOST=nextcloud.osames.org
    depends_on:
      - db
    networks:
      - nextcloud_network

volumes:
  db:
  nextcloud:

networks:
  nextcloud_network:
  1. Create folder
  2. Delete folder

Expected behaviour

No http error 500 on https://nextcloud_url/apps/recommendations/api/recommendations
And render the banner with latest actions on files/folders.

Actual behaviour

Http error 500 on https://nextcloud_url/apps/recommendations/api/recommendations
And the banner with latest actions on files/folders disappeared.

Server configuration

Operating system:
Docker on Ubuntu 18 LTS

Web server:
Apache in docker image (nextcloud-apache)
Database:
Docker Postgresl: PostgreSQL 11.2 (Debian 11.2-1.pgdg90+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit
PHP version:
7.3.6
Nextcloud version:
16.0.1.1
Updated from an older Nextcloud/ownCloud or fresh install:
Updated from version 15
Where did you install Nextcloud from:
https://github.com/nextcloud/docker
Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - accessibility: 1.2.0
  - activity: 2.9.1
  - bruteforcesettings: 1.3.0
  - cloud_federation_api: 0.2.0
  - comments: 1.6.0
  - contacts: 3.1.3
  - dav: 1.9.2
  - federatedfilesharing: 1.6.0
  - federation: 1.6.0
  - files: 1.11.0
  - files_external: 1.7.0
  - files_pdfviewer: 1.5.0
  - files_rightclick: 0.13.0
  - files_sharing: 1.8.0
  - files_texteditor: 2.8.0
  - files_trashbin: 1.6.0
  - files_versions: 1.9.0
  - files_videoplayer: 1.5.0
  - firstrunwizard: 2.5.0
  - gallery: 18.3.0
  - logreader: 2.1.0
  - lookup_server_connector: 1.4.0
  - nextcloud_announcements: 1.5.0
  - notifications: 2.4.1
  - oauth2: 1.4.2
  - password_policy: 1.6.0
  - privacy: 1.0.0
  - provisioning_api: 1.6.0
  - recommendations: 0.4.0
  - registration: 0.4.6
  - serverinfo: 1.6.0
  - sharebymail: 1.6.0
  - sociallogin: 1.16.1
  - support: 1.0.0
  - survey_client: 1.4.0
  - systemtags: 1.6.0
  - theming: 1.7.0
  - twofactor_backupcodes: 1.5.0
  - updatenotification: 1.6.0
  - viewer: 1.0.0
  - workflowengine: 1.6.0
Disabled:
  - admin_audit
  - announcementcenter
  - calendar
  - encryption
  - files_accesscontrol
  - onlyoffice
  - user_external
  - user_ldap

Nextcloud configuration:

Config report
{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nextcloud.osames.org"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "forwarded_for_headers": [
            "HTTP_CF_CONNECTING_IP"
        ],
        "overwritehost": "nextcloud.osames.org",
        "overwriteprotocol": "https",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "16.0.1.1",
        "overwrite.cli.url": "https:\/\/nextcloud.osames.org",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "social_login_auto_redirect": true,
        "maintenance": false,
        "loglevel": 2
    }
}

Are you using external storage, if yes which one:
local storage from docker configuration
Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser:
Chrome
Operating system:
Windows/Linux

Logs

Web server error log

Web server error log not applicable

Nextcloud log (data/nextcloud.log)

Nextcloud log
reduced because too huge
. . . 
{"reqId":"FdOjxcW8ASm4h0w6hHbH","level":3,"time":"2019-06-20T09:51:17+00:00","remoteAddr":"172.20.0.1","user":"xarkam","app":"index","method":"GET","url":"\/apps\/recommendations\/api\/recommendations","message":{"Exception":"OCP\\Files\\NotFoundException","Message":"\/xarkam\/files\/ebook","Code":0,"Trace":[{"file":"\/var\/www\/html\/lib\/private\/Files\/Node\/Folder.php","line":134,"function":"get","class":"OC\\Files\\Node\\Root","type":"->","args":["\/xarkam\/files\/ebook"]},{"file":"\/var\/www\/html\/apps\/recommendations\/lib\/Service\/RecentlySharedFilesSource.php","line":122,"function":"get","class":"OC\\Files\\Node\\Folder","type":"->","args":["\/ebook"]},{"function":"OCA\\Recommendations\\Service\\{closure}","class":"OCA\\Recommendations\\Service\\RecentlySharedFilesSource","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/html\/apps\/recommendations\/lib\/Service\/RecentlySharedFilesSource.php","line":127,"function":"array_map","args":[{"__class__":"Closure"},[{"__class__":"OC\\Share20\\Share"},{"__class__":"OC\\Share20\\Share"},{"__class__":"OC\\Share20\\Share"},{"__class__":"OC\\Share20\\Share"},{"__class__":"OC\\Share20\\Share"},"*** sensitive parameter replaced ***"]]},{"file":"\/var\/www\/html\/apps\/recommendations\/lib\/Service\/RecommendationService.php","line":91,"function":"getMostRecentRecommendation","class":"OCA\\Recommendations\\Service\\RecentlySharedFilesSource","type":"->","args":[{"__class__":"OC\\User\\User"},6]},{"function":"OCA\\Recommendations\\Service\\{closure}","class":"OCA\\Recommendations\\Service\\RecommendationService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/html\/apps\/recommendations\/lib\/Service\/RecommendationService.php","line":92,"function":"array_reduce","args":[[{"__class__":"OCA\\Recommendations\\Service\\RecentlyCommentedFilesSource"},{"__class__":"OCA\\Recommendations\\Service\\RecentlyEditedFilesSource"},"*** sensitive parameter replaced ***"],{"__class__":"Closure"},[]]},{"file":"\/var\/www\/html\/apps\/recommendations\/lib\/Controller\/RecommendationController.php","line":63,"function":"getRecommendations","class":"OCA\\Recommendations\\Service\\RecommendationService","type":"->","args":[{"__class__":"OC\\User\\User"}]},{"file":"\/var\/www\/html\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":166,"function":"index","class":"OCA\\Recommendations\\Controller\\RecommendationController","type":"->","args":[]},{"file":"\/var\/www\/html\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Recommendations\\Controller\\RecommendationController"},"index"]},{"file":"\/var\/www\/html\/lib\/private\/AppFramework\/App.php","line":126,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Recommendations\\Controller\\RecommendationController"},"index"]},{"file":"\/var\/www\/html\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Recommendations\\Controller\\RecommendationController","index",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"recommendations.recommendation.index"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"recommendations.recommendation.index"}]},{"file":"\/var\/www\/html\/lib\/private\/Route\/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"recommendations.recommendation.index"}]},{"file":"\/var\/www\/html\/lib\/base.php","line":975,"function":"match","class":"OC\\Route\\Router","type":"->","args":["\/apps\/recommendations\/api\/recommendations"]},{"file":"\/var\/www\/html\/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"\/var\/www\/html\/lib\/private\/Files\/Node\/Root.php","Line":202,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/75.0.3770.100 Safari\/537.36","version":"16.0.1.1"}
. . . 

Browser log

Browser log

main.js?v=9c261afd-2:7 GET https://nextcloud_url/apps/recommendations/api/recommendations 500 (Internal Server Error)

</details>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions