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

"Could not extract app" error swallows the original exception #19061

Closed
strugee opened this issue Jan 21, 2020 · 4 comments
Closed

"Could not extract app" error swallows the original exception #19061

strugee opened this issue Jan 21, 2020 · 4 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@strugee
Copy link
Member

strugee commented Jan 21, 2020

Steps to reproduce

  1. Create some problem where apps can't be extracted
  2. Find an app (in my case Nextcloud Maps) in the apps view and click "Download and enable"
  3. Wait to get the "Could not extract app maps" error
  4. Check the Nextcloud and Apache logs

Expected behaviour

Somewhere the original error is logged, so that I can fix it.

Actual behaviour

All I get in the logs is the "Could not extract app maps" error:

{"reqId":"i92ZCCr10xnkTa32zDu9","level":3,"time":"2020-01-21T20:11:10+00:00","remoteAddr":"128.151.150.18","user":"alex","app":"settings","method":"POST","url":"\/index.php\/settings\/apps\/enable","message":{"Exception":"Exception","Message":"Could not extract app maps","Code":0,"Trace":[{"file":"\/srv\/http\/nextcloud\/settings\/Controller\/AppSettingsController.php","line":444,"function":"downloadApp","class":"OC\\Installer","type":"->","args":["maps"]},{"file":"\/srv\/http\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":170,"function":"enableApps","class":"OC\\Settings\\Controller\\AppSettingsController","type":"->","args":[["maps"],[]]},{"file":"\/srv\/http\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Settings\\Controller\\AppSettingsController"},"enableApps"]},{"file":"\/srv\/http\/nextcloud\/lib\/private\/AppFramework\/App.php","line":126,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Settings\\Controller\\AppSettingsController"},"enableApps"]},{"file":"\/srv\/http\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OC\\Settings\\Controller\\AppSettingsController","enableApps",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"settings.AppSettings.enableApps"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"settings.AppSettings.enableApps"}]},{"file":"\/srv\/http\/nextcloud\/lib\/private\/Route\/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"settings.AppSettings.enableApps"}]},{"file":"\/srv\/http\/nextcloud\/lib\/base.php","line":997,"function":"match","class":"OC\\Route\\Router","type":"->","args":["\/settings\/apps\/enable"]},{"file":"\/srv\/http\/nextcloud\/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"\/srv\/http\/nextcloud\/lib\/private\/Installer.php","Line":283,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:68.0) Gecko\/20100101 Firefox\/68.0","version":"17.0.2.1"}

My guess is that somewhere there's a try/catch or something that's swallowing the original error and generating this user-facing one instead - but obviously I need the original in order to fix the underlying problem.

Server configuration

Operating system: Debian 10

Web server: Apache

Database: MySQL

PHP version: 7.3.11

Nextbutt version: 17.0.2

Updated from an older Nextbutt/ownButt or fresh install: updated from older

Where did you install Nextbutt from: tarball

Signing status:

No errors have been found. reported in /index.php/settings/integrity/failed.

List of activated apps:

App list Enabled: - accessibility: 1.3.0 - activity: 2.10.1 - announcementcenter: 3.6.1 - audioplayer: 2.9.0 - bruteforcesettings: 1.5.0 - calendar: 2.0.1 - camerarawpreviews: 0.7.3 - circles: 0.17.10 - cloud_federation_api: 1.0.0 - comments: 1.7.0 - contacts: 3.1.6 - dav: 1.13.0 - deck: 0.8.0 - federatedfilesharing: 1.7.0 - federation: 1.7.0 - files: 1.12.0 - files_downloadactivity: 1.6.0 - files_linkeditor: 1.0.11 - files_pdfviewer: 1.6.0 - files_photospheres: 1.0.6 - files_rightclick: 0.15.1 - files_sharing: 1.9.0 - files_trashbin: 1.7.0 - files_versions: 1.10.0 - files_videoplayer: 1.6.0 - firstrunwizard: 2.6.0 - gallery: 18.4.0 - impersonate: 1.4.0 - logreader: 2.2.0 - lookup_server_connector: 1.5.0 - mail: 1.0.0 - metadata: 0.11.1 - music: 0.12.1 - news: 14.1.2 - nextcloud_announcements: 1.6.0 - notes: 3.1.1 - notifications: 2.5.0 - oauth2: 1.5.0 - password_policy: 1.7.0 - phonetrack: 0.5.11 - polls: 1.0.0 - previewgenerator: 2.2.0 - privacy: 1.1.0 - provisioning_api: 1.7.0 - quota_warning: 1.6.0 - recommendations: 0.5.0 - serverinfo: 1.7.0 - sharebymail: 1.7.0 - social: 0.2.101 - socialsharing_diaspora: 1.0.5 - socialsharing_email: 1.0.6 - socialsharing_facebook: 1.0.5 - socialsharing_twitter: 1.0.5 - spreed: 7.0.2 - support: 1.0.1 - survey_client: 1.5.0 - systemtags: 1.7.0 - tasks: 0.11.3 - text: 1.1.1 - theming: 1.8.0 - twofactor_admin: 2.0.0 - twofactor_backupcodes: 1.6.0 - twofactor_nextcloud_notification: 2.2.0 - twofactor_totp: 4.1.2 - twofactor_u2f: 5.0.2 - unsplash: 1.1.4 - updatenotification: 1.7.0 - viewer: 1.2.0 - workflowengine: 1.7.0 Disabled: - admin_audit - dashboard - encryption - files_external - onlyoffice - richdocuments - socialsharing_googleplus - twofactor_yubikey - user_ldap

Nextbutt configuration:

Config report ``` { "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "cloud.strugee.net" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "overwrite.cli.url": "https:\/\/cloud.strugee.net", "dbtype": "mysql", "version": "17.0.2.1", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "maintenance": false, "theme": "", "loglevel": 2, "updater.release.channel": "stable", "mail_smtpmode": "smtp", "mail_smtpsecure": "tls", "mail_sendmailmode": "smtp", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtpauth": 1, "mail_smtpauthtype": "PLAIN", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "25", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "mysql.utf8mb4": true } } ```

Are you using external storage, if yes which one: no

Are you using encryption: no

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

Client configuration

N/A

Logs

Web server error log

Nothing relevant in Apache error logs (or AFAICT, access logs).

Nextbutt log (data/nextbutt.log)

See above. All the relevant log lines are like that, nothing preceding them or anything like that.

Browser log

N/A

@strugee strugee added bug 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Jan 21, 2020
@kesselb
Copy link
Contributor

kesselb commented Jan 21, 2020

if (!$archive->extract($extractDir)) {
throw new \Exception(
sprintf(
'Could not extract app %s',
$appId
)
);
}

That seems to be the original exception. Probably related: nextcloud/maps#240

@tacruc
Copy link
Contributor

tacruc commented Jan 28, 2020

nextcloud/maps#240

The tar archive was broken, so the error is correct.

@tacruc tacruc closed this as completed Jan 28, 2020
@strugee
Copy link
Member Author

strugee commented Jan 28, 2020

@tacruc is that the only time this error will be triggered? If so can we make it a little clearer that administrators can't do anything about this other than report it upstream?

Based on the error I, for example, assumed there was a misconfiguration in my local filesystem.

@strugee strugee reopened this Jan 28, 2020
@strugee
Copy link
Member Author

strugee commented Jan 28, 2020

Oops, didn't mean to reopen, sorry! Although I guess it's fine if we're going to change the error message (feel free to close again otherwise).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

3 participants