fulltextsearch icon indicating copy to clipboard operation
fulltextsearch copied to clipboard

[Bug]: Can't enable "Full text search" and "Full text search - Files" apps after upgrade to v32.0.0 – Error: This app cannot be enabled because it makes the server unstable

Open Haythem42 opened this issue 10 months ago • 2 comments

⚠️ This issue respects the following points: ⚠️

Bug description

I would like to upgrade from the stable version v29.0.6 to the development version (GitHub) v32.0.0 dev. I am replacing my stable version with a clone from the project's GitHub fork. When accessing my web page, I am prompted to update various applications to adapt them to the Nextcloud version 32.0.0 dev.

Image

After completing the update, I encounter a server error:

Image

To make it work, I need to disable one of these two applications: "Full text search" ou "Full text search – Files". Once disabled, I can access my web page again.

However, my main goal is to enable full-text search functionnality, which worked correctly in the stable version under the condition that the following three applications are activated:

  • Full text search
  • Full text search – Files
  • Full text search - Elasticsearch Platform

But when I try to activate the "Full text search" and "Full text search – Files" applications together, an error occurs: "Error: This app cannot be enabled because it makes the server unstable".

Image

Image

Sometimes, it doesn't always happen, but I occasionnally get the following message in the app details: "This app cannot be installed due to unmet depedencies: Server version 31 or lower is required.".

Image

Steps to reproduce

  1. Go to apps page
  2. Enable "Full text search" apps and "Full text search – Files" apps

Expected behaviour

All three apps should be activated.

Actual behaviour

Only 2 out of the 3 apps are activated :

  • "Full text search" and "Full text search - Elasticsearch Platform" OR
  • "Full text search - Files" and "Full text search - Elasticsearch Platform"

An error occurs when trying to activate the third app: "Error: This app cannot be enabled because it makes the server unstable".

Server configuration

Installation method: Fork of the project on GitHub, then cloned on my machine.

Operating system: Red Hat Linux

Web server: Nginx

Database: PostgreSQL

PHP version: 8.2.25

Nextcloud version: 29.0.6 (stable) to 32.0.0 dev (github)

List of activated apps on v29.0.6
Enabled:
  - activity: 2.21.1
  - admin_audit: 1.19.0
  - bruteforcesettings: 2.9.0
  - circles: 29.0.0-dev
  - cloud_federation_api: 1.12.0
  - comments: 1.19.0
  - contactsinteraction: 1.10.0
  - dashboard: 7.9.0
  - dav: 1.30.1
  - federatedfilesharing: 1.19.0
  - federation: 1.19.0
  - files: 2.1.1
  - files_downloadlimit: 2.0.0
  - files_fulltextsearch: 29.0.1
  - files_lock: 29.0.1
  - files_pdfviewer: 2.10.0
  - files_reminders: 1.2.0
  - files_sharing: 1.21.0
  - files_trashbin: 1.19.0
  - files_versions: 1.22.0
  - firstrunwizard: 2.18.0
  - fulltextsearch: 29.0.1
  - fulltextsearch_elasticsearch: 29.0.1
  - groupfolders: 17.0.3
  - logreader: 2.14.0
  - lookup_server_connector: 1.17.0
  - nextcloud_announcements: 1.18.0
  - notifications: 2.17.0
  - oauth2: 1.17.0
  - password_policy: 1.19.0
  - privacy: 1.13.0
  - provisioning_api: 1.19.0
  - recommendations: 2.1.0
  - related_resources: 1.4.0
  - serverinfo: 1.19.0
  - settings: 1.12.0
  - sharebymail: 1.19.0
  - survey_client: 1.17.0
  - systemtags: 1.19.0
  - text: 3.10.1
  - theming: 2.4.0
  - twofactor_backupcodes: 1.18.0
  - updatenotification: 1.19.1
  - user_status: 1.9.0
  - viewer: 2.3.0
  - weather_status: 1.9.0
  - workflowengine: 2.11.0
Disabled:
  - encryption: 2.17.0
  - files_external: 1.21.0
  - forms: 4.3.0-alpha7 (installed 4.3.0-alpha7)
  - photos: 2.5.0 (installed 2.5.0)
  - support: 1.12.0 (installed 1.12.0)
  - suspicious_login: 7.0.0
  - twofactor_totp: 11.0.0-dev
  - user_ldap: 1.20.0
List of activated apps on v32.0.0 dev (after upgrade)
Enabled:
  - activity: 5.0.0-dev.0
  - admin_audit: 1.22.0
  - bruteforcesettings: 5.0.0-dev.0
  - circles: 32.0.0-dev.0
  - cloud_federation_api: 1.15.0
  - comments: 1.22.0
  - contactsinteraction: 1.13.0
  - dashboard: 7.12.0
  - dav: 1.34.0
  - federatedfilesharing: 1.22.0
  - federation: 1.22.0
  - files: 2.4.0
  - files_downloadlimit: 5.0.0-dev.0
  - files_lock: 32.0.0-dev.0
  - files_pdfviewer: 5.0.0-dev.0
  - files_reminders: 1.5.0
  - files_sharing: 1.24.0
  - files_trashbin: 1.22.0
  - files_versions: 1.25.0
  - firstrunwizard: 5.0.0-dev.0
  - fulltextsearch: 31.0.0
  - fulltextsearch_elasticsearch: 31.0.0-dev.0
  - groupfolders: 20.0.0-dev.0
  - logreader: 5.0.0-dev.0
  - lookup_server_connector: 1.20.0
  - nextcloud_announcements: 4.0.0-dev.0
  - notifications: 5.0.0-dev.0
  - oauth2: 1.20.0
  - password_policy: 4.0.0-dev.0
  - privacy: 4.0.0-dev.0
  - profile: 1.1.0
  - provisioning_api: 1.22.0
  - recommendations: 5.0.0-dev.0
  - related_resources: 3.0.0-dev.0
  - serverinfo: 4.0.0-dev.0
  - settings: 1.15.0
  - sharebymail: 1.22.0
  - survey_client: 4.0.0-dev.0
  - systemtags: 1.22.0
  - text: 6.0.0-dev.0
  - theming: 2.7.0
  - twofactor_backupcodes: 1.21.0
  - updatenotification: 1.22.0
  - user_status: 1.12.0
  - viewer: 5.0.0-dev.0
  - weather_status: 1.12.0
  - workflowengine: 2.14.0
Disabled:
  - encryption: 2.20.0
  - files_external: 1.24.0
  - files_fulltextsearch: 31.0.0-dev.0 (installed 31.0.0-dev.0)
  - forms: 5.0.0-alpha.3 (installed 4.3.0-alpha7)
  - photos: 5.0.0-dev.0 (installed 2.5.0)
  - suspicious_login: 10.0.0-dev.0
  - testing: 1.22.0
  - twofactor_totp: 14.0.0-dev.0
  - user_ldap: 1.23.0
  - webhook_listeners: 1.3.0 (installed 1.3.0)
Nextcloud configuration
<?php
$CONFIG = array (
  'instanceid' => '***REMOVED SENSITIVE VALUE***',
  'passwordsalt' => '***REMOVED SENSITIVE VALUE***',
  'secret' => '***REMOVED SENSITIVE VALUE***',
  'trusted_domains' => 
  array (
    0 => 'yyyyyy.dom',
  ),
  'datadirectory' => '***REMOVED SENSITIVE VALUE***',
  'dbtype' => 'pgsql',
  'version' => '32.0.0.0',
  'overwrite.cli.url' => 'https://yyyyyy.dom',
  'dbname' => '***REMOVED SENSITIVE VALUE***',
  'dbhost' => '***REMOVED SENSITIVE VALUE***',
  'dbport' => '',
  'dbtableprefix' => '',
  'dbuser' => '***REMOVED SENSITIVE VALUE***',
  'dbpassword' => '***REMOVED SENSITIVE VALUE***',
  'updater.release.channel' => 'git',
  'installed' => true,
  'app_install_overwrite' => 
  array (
    1 => 'forms',
    2 => 'fulltextsearch',
    3 => 'fulltextsearch_elasticsearch',
    4 => 'files_fulltextsearch',
  ),
  'theme' => '',
  'loglevel' => 2,
  'maintenance' => false,
);
Nginx configuration
upstream php-handler {
    server  unix:/run/php-fpm/www.sock;
}

server {
    listen 80;
    server_name yyyyyy.dom;

    server_tokens off;
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 ssl;
    server_name yyyyyy.dom;

    ssl_certificate /etc/nginx/ssl/yyyyyy.cer;
    ssl_certificate_key /etc/nginx/ssl/yyyyyy.key;

    # Add headers to serve security related headers
    # Before enabling Strict-Transport-Security headers please read into this
    # topic first.
    add_header Strict-Transport-Security "max-age=15768000;
    includeSubDomains; preload;";
    add_header X-Content-Type-Options nosniff;
    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Robots-Tag none;
    add_header X-Download-Options noopen;
    add_header X-Permitted-Cross-Domain-Policies none;

    # Path to the root of your installation
    # Comment one and uncomment the other one to switch version
    # root /srv/nextcloud/stable/version/;
    root /srv/nextcloud/github/version/;

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

    # The following 2 rules are only needed for the user_webfinger app.
    # Uncomment it if you're planning to use this app.
    #rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
    #rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json
    # last;

    location = /.well-known/carddav {
      return 301 $scheme://$host/remote.php/dav;
    }
    location = /.well-known/caldav {
      return 301 $scheme://$host/remote.php/dav;
    }

    # set max upload size
    client_max_body_size 512M;
        client_body_timeout 300s;
    fastcgi_buffers 64 4K;

    # Disable gzip to avoid the removal of the ETag header
    gzip off;

    # Uncomment if your server is build with the ngx_pagespeed module
    # This module is currently not supported.
    #pagespeed off;

    error_page 403 /core/templates/403.php;
    error_page 404 /core/templates/404.php;

    location / {
        rewrite ^ /index.php$uri;
    }

    location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
        deny all;
    }
    location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
        deny all;
    }

    location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) {
        include fastcgi_params;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_param HTTPS on;
        #Avoid sending the security headers twice
        fastcgi_param modHeadersAvailable true;
        fastcgi_param front_controller_active true;
        fastcgi_pass php-handler;
        fastcgi_intercept_errors off;
        fastcgi_request_buffering off;
    }

        location /.well-known/webfinger {
        return 301 $scheme://$host/index.php/.well-known/webfinger;
    }

 location /.well-known/nodeinfo {
       return 301 $scheme://$host/index.php/.well-known/nodeinfo;
   }

    location ~ ^/(?:updater|ocs-provider)(?:$|/) {
        try_files $uri/ =404;
        index index.php;
    }

    # Adding the cache control header for js and css files
    # Make sure it is BELOW the PHP block
    location ~* \.(?:css|js)$ {
        try_files $uri /index.php$uri$is_args$args;
        add_header Cache-Control "public, max-age=7200";
        # Add headers to serve security related headers (It is intended to
        # have those duplicated to the ones above)
        # Before enabling Strict-Transport-Security headers please read into
        # this topic first.
        add_header Strict-Transport-Security "max-age=15768000;
        includeSubDomains; preload;";
        add_header X-Content-Type-Options nosniff;
        add_header X-Frame-Options "SAMEORIGIN";
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Robots-Tag none;
        add_header X-Download-Options noopen;
        add_header X-Permitted-Cross-Domain-Policies none;
        # Optional: Don't log access to assets
        access_log off;
    }

    location ~* \.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$ {
        try_files $uri /index.php$uri$is_args$args;
        # Optional: Don't log access to other assets
        access_log off;
    }
}

Browser

Browser name: Chromium

Browser version: 132.0.6834.160

Browser log
 GET https://yyyyyy.dom/apps/files 500 (Internal Server Error)
     core-common.js?v=00210aa2-35:1 

Already tested

  • Installed the app via CLI: sudo -u apache php occ app:enable files_fulltextsearch
Web result

Image

  • Rebooted the server:
systemctl restart php-fpm
systemctl restart nginx
  • Removed and reinstalled the applications (both via git clone and official releases).

Additional notes

I suspect that this issue might simply be due to the fact that these apps are not yet compatible with the latest version of Nextcloud. However, I am not entirely sure.

Haythem42 avatar Feb 25 '25 10:02 Haythem42

Yeah I guess it's currently not compatible with NC32. I was able to enable the app but it throws errors:

Failed to construct console command 'OCA\Files_FullTextSearch\Command\Configure': Could not resolve OCP\ILogger! Class can not be instantiated
Failed to construct console command 'OCA\FullTextSearch\Command\Check': Could not resolve OCP\ILogger! Class can not be instantiated

derritter88 avatar Feb 25 '25 17:02 derritter88

@ArtificialOwl the update for the core app solved one of the two errors - but Full text search - Files is still having troubles.

derritter88 avatar Feb 27 '25 05:02 derritter88