Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Unable to Enable App: Autoload Path not Allowed #1071

Closed
6 of 9 tasks
BenMajestix opened this issue Jun 15, 2023 · 18 comments
Closed
6 of 9 tasks

[Bug]: Unable to Enable App: Autoload Path not Allowed #1071

BenMajestix opened this issue Jun 15, 2023 · 18 comments

Comments

@BenMajestix
Copy link

⚠️ This issue respects the following points: ⚠️

Bug description

When I try to Enable the Maps App, I get this Error in the Web UI:
Autoload path not allowed: /config/www/nextcloud/apps/maps/appinfo/application.php

When I try to Enable the Maps App through the Command Line I get the same Error:

occ app:enable maps -vvv
Autoload path not allowed: /config/www/nextcloud/apps/maps/appinfo/application.php

Steps to reproduce

  1. Click Download & Enable on the Maps App
  2. Click Enable (Or use the Command) on the Maps App

Expected behavior

Maps App gets Enabled with no Errors or Warnings

Installation method

Official Docker image

Operating system

Debian/Ubuntu

PHP engine version

Other

Web server

Nginx

Database engine version

MariaDB

Is this bug present after an update or on a fresh install of the server?

Fresh Nextcloud Server install

Is this bug present after an update or on a fresh install of the app?

Fresh Nextcloud Maps install (never installed before)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "memcache.local": "\\OC\\Memcache\\APCu",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "81.169.137.180:444",
            "nextcloud.benbartel.me"
        ],
        "dbtype": "mysql",
        "version": "27.0.0.8",
        "overwrite.cli.url": "https:\/\/81.169.137.180:444",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "app_install_overwrite": [
            "maps"
        ],
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25"
    }
}

List of activated Apps

Enabled:
  - cloud_federation_api: 1.10.0
  - comments: 1.17.0
  - contactsinteraction: 1.8.0
  - dashboard: 7.7.0
  - dav: 1.27.0
  - federatedfilesharing: 1.17.0
  - files: 1.22.0
  - files_pdfviewer: 2.8.0
  - files_rightclick: 1.6.0
  - files_sharing: 1.19.0
  - files_trashbin: 1.17.0
  - files_versions: 1.20.0
  - firstrunwizard: 2.16.0
  - logreader: 2.12.0
  - lookup_server_connector: 1.15.0
  - nextcloud_announcements: 1.16.0
  - notes: 4.8.0
  - notifications: 2.15.0
  - oauth2: 1.15.0
  - password_policy: 1.17.0
  - photos: 2.3.0
  - privacy: 1.11.0
  - provisioning_api: 1.17.0
  - recommendations: 1.6.0
  - related_resources: 1.2.0
  - richdocuments: 8.1.0
  - richdocumentscode: 23.5.5
  - serverinfo: 1.17.0
  - settings: 1.9.0
  - sharebymail: 1.17.0
  - support: 1.10.0
  - survey_client: 1.15.0
  - tasks: 0.15.0
  - text: 3.8.0
  - theming: 2.2.0
  - twofactor_backupcodes: 1.16.0
  - updatenotification: 1.17.0
  - user_status: 1.7.0
  - viewer: 2.1.0
  - weather_status: 1.7.0
  - workflowengine: 2.9.0
Disabled:
  - activity: 2.19.0 (installed 2.19.0)
  - admin_audit: 1.17.0
  - bruteforcesettings: 2.7.0
  - circles: 27.0.0 (installed 27.0.0)
  - encryption: 2.15.0
  - federation: 1.17.0 (installed 1.17.0)
  - files_external.old: 1.19.0
  - integration_mastodon: 2.0.2 (installed 2.0.2)
  - suspicious_login: 5.0.0
  - systemtags: 1.17.0 (installed 1.17.0)
  - twofactor_totp: 9.0.0
  - user_ldap: 1.17.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"BQYISnZFuVRqeFYF8k1h","level":3,"time":"2023-06-15T09:47:13+00:00","remoteAddr":"134.28.185.54","user":"--","app":"core","method":"PROPFIND","url":"/remote.php/dav/uploads/BenBartel/089f2dec91da67d24cfad9368c8e62f9","message":"Redis server went away","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.24.1","version":"27.0.0.8","exception":{"Exception":"RedisException","Message":"Redis server went away","Code":0,"Trace":[{"file":"/config/www/nextcloud/lib/private/Memcache/Redis.php","line":72,"function":"get","class":"Redis","type":"->"},{"file":"/config/www/nextcloud/lib/autoloader.php","line":154,"function":"get","class":"OC\\Memcache\\Redis","type":"->"},{"file":"/config/www/nextcloud/remote.php","line":62,"function":"load","class":"OC\\Autoloader","type":"->"},{"file":"/config/www/nextcloud/remote.php","line":174,"function":"handleException"}],"File":"/config/www/nextcloud/lib/private/Memcache/Redis.php","Line":72,"CustomMessage":"--"}}
{"reqId":"BQYISnZFuVRqeFYF8k1h","level":3,"time":"2023-06-15T09:47:13+00:00","remoteAddr":"134.28.185.54","user":"--","app":"core","method":"PROPFIND","url":"/remote.php/dav/uploads/BenBartel/089f2dec91da67d24cfad9368c8e62f9","message":"Redis server went away","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.24.1","version":"27.0.0.8","exception":{"Exception":"RedisException","Message":"Redis server went away","Code":0,"Trace":[{"file":"/config/www/nextcloud/lib/private/Memcache/Redis.php","line":72,"function":"get","class":"Redis","type":"->"},{"file":"/config/www/nextcloud/lib/private/App/InfoParser.php","line":58,"function":"get","class":"OC\\Memcache\\Redis","type":"->"},{"file":"/config/www/nextcloud/lib/private/App/AppManager.php","line":732,"function":"parse","class":"OC\\App\\InfoParser","type":"->"},{"file":"/config/www/nextcloud/lib/private/App/AppManager.php","line":747,"function":"getAppInfo","class":"OC\\App\\AppManager","type":"->"},{"file":"/config/www/nextcloud/lib/private/legacy/OC_App.php","line":407,"function":"getAppVersion","class":"OC\\App\\AppManager","type":"->"},{"file":"/config/www/nextcloud/lib/private/legacy/OC_App.php","line":711,"function":"getAppVersion","class":"OC_App","type":"::"},{"file":"/config/www/nextcloud/lib/private/legacy/OC_Util.php","line":1208,"function":"shouldUpgrade","class":"OC_App","type":"::"},{"file":"/config/www/nextcloud/lib/public/Util.php","line":570,"function":"needUpgrade","class":"OC_Util","type":"::"},{"file":"/config/www/nextcloud/lib/private/legacy/OC_Template.php","line":113,"function":"needUpgrade","class":"OCP\\Util","type":"::"},{"file":"/config/www/nextcloud/lib/private/legacy/OC_Template.php","line":77,"function":"initTemplateEngine","class":"OC_Template","type":"::"},{"file":"/config/www/nextcloud/lib/private/legacy/OC_Template.php","line":321,"function":"__construct","class":"OC_Template","type":"->"},{"file":"/config/www/nextcloud/remote.php","line":92,"function":"printExceptionErrorPage","class":"OC_Template","type":"::"},{"file":"/config/www/nextcloud/remote.php","line":174,"function":"handleException"}],"File":"/config/www/nextcloud/lib/private/Memcache/Redis.php","Line":72,"CustomMessage":"--"}}
{"reqId":"YDMcUpYWnZkzXz2gUEji","level":4,"time":"2023-06-15T10:38:59+00:00","remoteAddr":"134.28.161.152","user":"BenBartel","app":"maps","method":"POST","url":"/settings/apps/enable","message":"Error during app service registration: Autoload path not allowed: /config/www/nextcloud/apps/maps/appinfo/application.php","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0","version":"27.0.0.8","exception":{"Exception":"OCP\\AutoloadNotAllowedException","Message":"Autoload path not allowed: /config/www/nextcloud/apps/maps/appinfo/application.php","Code":0,"Trace":[{"file":"/config/www/nextcloud/lib/autoloader.php","line":166,"function":"isValidPath","class":"OC\\Autoloader","type":"->"},{"function":"load","class":"OC\\Autoloader","type":"->"},{"file":"/config/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":129,"function":"class_exists"},{"file":"/config/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":94,"function":"registerApps","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/config/www/nextcloud/lib/private/Installer.php","line":143,"function":"runLazyRegistration","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/config/www/nextcloud/apps/settings/lib/Controller/AppSettingsController.php","line":451,"function":"installApp","class":"OC\\Installer","type":"->"},{"file":"/config/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/config/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/config/www/nextcloud/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/config/www/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/config/www/nextcloud/lib/base.php","line":1064,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/config/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/config/www/nextcloud/lib/autoloader.php","Line":141,"message":"Error during app service registration: Autoload path not allowed: /config/www/nextcloud/apps/maps/appinfo/application.php","exception":{},"CustomMessage":"Error during app service registration: Autoload path not allowed: /config/www/nextcloud/apps/maps/appinfo/application.php"}}
{"reqId":"YDMcUpYWnZkzXz2gUEji","level":3,"time":"2023-06-15T10:38:59+00:00","remoteAddr":"134.28.161.152","user":"BenBartel","app":"settings","method":"POST","url":"/settings/apps/enable","message":"could not enable apps","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0","version":"27.0.0.8","exception":{"Exception":"OCP\\AutoloadNotAllowedException","Message":"Autoload path not allowed: /config/www/nextcloud/apps/maps/appinfo/application.php","Code":0,"Trace":[{"file":"/config/www/nextcloud/lib/autoloader.php","line":166,"function":"isValidPath","class":"OC\\Autoloader","type":"->"},{"function":"load","class":"OC\\Autoloader","type":"->"},{"file":"/config/www/nextcloud/lib/private/ServerContainer.php","line":106,"function":"class_exists"},{"file":"/config/www/nextcloud/lib/private/ServerContainer.php","line":186,"function":"getAppContainer","class":"OC\\ServerContainer","type":"->"},{"file":"/config/www/nextcloud/lib/private/ServerContainer.php","line":153,"function":"getAppContainerForService","class":"OC\\ServerContainer","type":"->"},{"file":"/config/www/nextcloud/lib/private/DB/MigrationService.php","line":490,"function":"query","class":"OC\\ServerContainer","type":"->"},{"file":"/config/www/nextcloud/lib/private/DB/MigrationService.php","line":442,"function":"createInstance","class":"OC\\DB\\MigrationService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/config/www/nextcloud/lib/private/DB/MigrationService.php","line":409,"function":"migrateSchemaOnly","class":"OC\\DB\\MigrationService","type":"->"},{"file":"/config/www/nextcloud/lib/private/Installer.php","line":153,"function":"migrate","class":"OC\\DB\\MigrationService","type":"->"},{"file":"/config/www/nextcloud/apps/settings/lib/Controller/AppSettingsController.php","line":451,"function":"installApp","class":"OC\\Installer","type":"->"},{"file":"/config/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/config/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/config/www/nextcloud/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/config/www/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/config/www/nextcloud/lib/base.php","line":1064,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/config/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/config/www/nextcloud/lib/autoloader.php","Line":141,"message":"could not enable apps","exception":{},"CustomMessage":"could not enable apps"}}

Browser Console

Autoload path not allowed: /config/www/nextcloud/apps/maps/appinfo/application.php

Additional info

PHP Version: 8.2.7

@piiskop

This comment was marked as off-topic.

@briantho
Copy link

getting this error as well. Running nextcloud 27 via docker desktop on windows. I'm using the docker compose method to run nextcloud, I'm not using AIO Anymore. Getting the same error when i try to enable it

@mayonezo
Copy link

see #1069
Maps app is not compatible to NC 27, yet.

@tacruc
Copy link
Collaborator

tacruc commented Jun 25, 2023

Can you test the v1.1.0-nightly, then we can release something for NC27 soon
And unfortunately I have problems to reproduce this error.
I tried with and NC26 and php8.0 and NC27 with php 8.0, 8.1 and php8.2

Can you test deleting maps/appinfo/application.php I think it is an empty file anyway.
Which version of maps are you using?

@piiskop

This comment was marked as off-topic.

@Albirew

This comment was marked as off-topic.

@piiskop

This comment was marked as off-topic.

@tacruc
Copy link
Collaborator

tacruc commented Jun 27, 2023

You might be able to install the nightly by setting the release channel to beta/nightly but then only update the maps app.

Deleting the file is possible with any file explorer of your choice or via command line.

@piiskop
Copy link

piiskop commented Jun 28, 2023

I would like to do that, but I don't know how

@tacruc
Copy link
Collaborator

tacruc commented Jun 28, 2023

Which of the two thinks would you like to do?

@piiskop
Copy link

piiskop commented Jun 28, 2023

The first one. You forgot to add an instruction for how to change the release channel.

@mayonezo
Copy link

mayonezo commented Jun 28, 2023

Changing the release channel to beta does not offer the nightly version of Maps app in the apps view.
I don't want to install node and npm on my productive Nextcloud machine.
Deleting the file application.php and then trying to enable Maps app throws the following error:
"App "Maps" cannot be installed because the following dependencies are not fulfilled: PHP with a version lower than 8.1 is required."
My php version is 8.2.7

@tacruc
Copy link
Collaborator

tacruc commented Jun 28, 2023

Changing the release channel to beta does not offer the nightly version of Maps app in the apps view. I don't want to install node and npm on my productive Nextcloud machine. Deleting the file application.php and then trying to enable Maps app throws the following error: "App "Maps" cannot be installed because the following dependencies are not fulfilled: PHP with a version lower than 8.1 is required." My php version is 8.2.7

Thanks, for some reason the release automatization failed. So the nightly release was not published.

@alaskanpuffin
Copy link
Contributor

It looks like /maps/appinfo/Application.php is empty after installing the nightly release. I copied the contents of /maps/lib/AppInfo/Application.php into /maps/appinfo/Application.php and it started working after restarting the Nextcloud container.

@tacruc
Copy link
Collaborator

tacruc commented Jun 29, 2023

For me it is working with the empty file, without coping stuff around. @alaskanpuffin can you confirm this?

@alaskanpuffin
Copy link
Contributor

Yeah, that was my mistake. I never restarted the container until after I copied the file, deleting the file and then restarting works.

@tacruc
Copy link
Collaborator

tacruc commented Jun 29, 2023

Fixed with V1.1.0-1-nightly

@tacruc tacruc closed this as completed Jun 29, 2023
@piiskop
Copy link

piiskop commented Jun 30, 2023

How is it a fix if it is not a release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants