Cannot install or update any app: Invalid Signature

Nextcloud version (eg, 18.0.2): 20.0.4
Operating system and version (eg, Ubuntu 20.04): Armbian 10
Apache or nginx version (eg, Apache 2.4.25): 2.4.38-3+deb10u4
PHP version (eg, 7.1): 7.4.13 (from sury.org), using FPM

The issue you are facing:
All app installations and updates fail with “App with id <app_id> has invalid signature.”
Installing on the command line using occ app:install <app_id> -vvv brings no further information to debug with. (Is there any way to get more information than this?)

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Try installing or updating any app, e.g. SharePoint backend.

The output of your Nextcloud log in Admin > Logging:

{
  "reqId": "VFVX6O54lFIXWy1mxU6B",
  "level": 3,
  "time": "2020-12-20T00:07:17+00:00",
  "remoteAddr": "x.x.x.x",
  "user": "christopher",
  "app": "settings",
  "method": "POST",
  "url": "/settings/apps/enable",
  "message": {
    "Exception": "Exception",
    "Message": "App with id sharepoint has invalid signature",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/apps/settings/lib/Controller/AppSettingsController.php",
        "line": 445,
        "function": "downloadApp",
        "class": "OC\\Installer",
        "type": "->"
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 169,
        "function": "enableApps",
        "class": "OCA\\Settings\\Controller\\AppSettingsController",
        "type": "->"
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 100,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/App.php",
        "line": 152,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/html/lib/private/Route/Router.php",
        "line": 308,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/var/www/html/lib/base.php",
        "line": 1008,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/var/www/html/index.php",
        "line": 37,
        "function": "handleRequest",
        "class": "OC",
        "type": "::"
      }
    ],
    "File": "/var/www/html/lib/private/Installer.php",
    "Line": 367,
    "CustomMessage": "--"
  },
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0",
  "version": "20.0.4.0",
  "id": "5fde9756e8cdb"
}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "example.com",
        "example.org",
        "example",
        "example.net",
        "example.local",
        "192.168.2.126",
        "example.onion"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "overwrite.cli.url": "https:\/\/example.com",
    "htaccess.RewriteBase": "\/",
    "dbtype": "mysql",
    "version": "20.0.4.0",
    "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_smtpauthtype": "LOGIN",
    "memcache.local": "\\OC\\Memcache\\APCu",
    "filelocking.enabled": true,
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 0,
        "timeout": 0
    },
    "loglevel": 1,
    "mail_smtpsecure": "ssl",
    "maintenance": false,
    "theme": "",
    "mysql.utf8mb4": true,
    "updater.release.channel": "stable",
    "enable_previews": true,
    "enabledPreviewProviders": [
        "OC\\Preview\\BMP",
        "OC\\Preview\\GIF",
        "OC\\Preview\\HEIC",
        "OC\\Preview\\JPEG",
        "OC\\Preview\\MarkDown",
        "OC\\Preview\\MP3",
        "OC\\Preview\\PNG",
        "OC\\Preview\\TXT",
        "OC\\Preview\\XBitmap",
        "OC\\Preview\\OpenDocument",
        "OC\\Preview\\Krita",
        "OC\\Preview\\Movie",
        "OC\\Preview\\TIFF",
        "OC\\Preview\\Font",
        "OC\\Preview\\PDF",
        "OC\\Preview\\MSOffice2007"
    ],
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "465",
    "mail_smtpauth": 1,
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "debug": true,
    "data-fingerprint": "492f75b5a90a929e7bff3609193fb862",
    "app_install_overwrite": [
        "photosphereviewer",
        "twofactor_yubikey",
        "dropit",
        "files_texteditor",
        "telephoneprovider"
    ]
}

The output of your Apache/nginx/system log in /var/log/apache2/error.log:

Nothing suspicious

Thanks for your help! :heart:

1 Like

same error, any idea

log:
[core] Error: Exception: App with id files_antivirus has invalid signature at <>

  1. /home/nbautech/public_html/nc_18_backup/lib/private/Installer.php line 198
    OC\Installer->downloadApp("*** sensitive parameter replaced ***", false)
  2. /home/nbautech/public_html/nc_18_backup/apps/settings/lib/Controller/AppSettingsController.php line 532
    OC\Installer->updateAppstoreApp("*** sensitive parameters replaced ***")
  3. /home/nbautech/public_html/nc_18_backup/lib/private/AppFramework/Http/Dispatcher.php line 169
    OCA\Settings\Controller\AppSettingsController->updateApp("*** sensitive parameters replaced ***")
  4. /home/nbautech/public_html/nc_18_backup/lib/private/AppFramework/Http/Dispatcher.php line 100
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Settings\Con … {}, “updateApp”)
  5. /home/nbautech/public_html/nc_18_backup/lib/private/AppFramework/App.php line 152
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Settings\Con … {}, “updateApp”)
  6. /home/nbautech/public_html/nc_18_backup/lib/private/Route/Router.php line 308
    OC\AppFramework\App::main(“OCA\Settings\ … r”, “updateApp”, OC\AppFramework\ … {}, {action: null,ap … "})
  7. /home/nbautech/public_html/nc_18_backup/lib/base.php line 1008
    OC\Route\Router->match("/settings/apps/update/files_antivirus")
  8. /home/nbautech/public_html/nc_18_backup/index.php line 37
    OC::handleRequest()

GET /index.php/settings/apps/update/files_antivirus
from 81.221.243.21 byxxx at 2020-12-21T14:07:07+00:00

it is possible to update and install Apps with ssh and occ

–the instance must be in maintenance mode -> on

php occ maintenance:mode --on

–update all app

php occ app:update --all

–install an app

php occ app:install

–after installation ->

php occ maintenance:mode --off

2 Likes

I have the same problem. The workaround works. But It is a pain having to drop to command line to update and install new apps.

Removing External Storage: OneDrive app fixed the problem for me. Downloading and enabling it causes it occur again.

2 Likes

Thanks for the tip, that fixed it for me too. @copos77 @gombang, do you also have this app installed? I’d like to open an issue about this.

Any idea why the External Storage: OneDrive app is causing this issue?

yes so i do the same workaround

Sorry for the late reply. Yeah, it happened that I installed the OneDrive app.

This has been fixed in the new files_external_onedrive version 1.1.0.

Release Release v1.1.0 · hevelius/files_external_onedrive https://github.com/hevelius/files_external_onedrive/releases/tag/v1.1.0

I’m having this exact problem. But I don’t even have the OneDrive app installed at all. Are there any other apps that could be causing this issue?

Here are all of the apps we have installed:

Antivirus for files
Accessibility
Activities for shared file downloads
Activity
Auditing / Logging
Collaborative tags
Comments
Contacts Interaction
Default encryption module
Deleted files
Federation
File access control
File sharing
Files automated tagging
Impersonate
LDAP user and group backend
Log Reader
Monitoring
Nextcloud announcements
Notifications
Password policy
PDF viewer
Photos
Privacy
QA testing
Recommendations
Retention
Right click
Share by mail
ShareRenamer
Support
Text
Theming
Update notification
Usage survey
User retention
User usage report
Versions
External storage support
First run wizard
Video player

Thanks,
Mark