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

Cannot update private key #6834

Closed
JMBokhorst opened this issue Oct 14, 2017 · 3 comments
Closed

Cannot update private key #6834

JMBokhorst opened this issue Oct 14, 2017 · 3 comments

Comments

@JMBokhorst
Copy link

Hello,

After some trouble on the server, where the harddisk was full, I repaired nextcloud though the command line (sudo -u www-data php occ maintenance:repair). However this resulted in an error that I cannot resolve:

Invalid private key for encryption app. Please update your private key password in your personal settings to recover access to your encrypted files.

When trying to update the key through the personal settings, while the screen shows 'saving...' it doesn't proceed. There are no errors in the nextcloud-log file or apache error log.

I do receive an error with the developer tools:
Failed to load resource: the server responded with a status of 503 (Service Unavailable) https://owncloud.bokhorst.info/index.php/apps/encryption/ajax/updatePrivateKeyPassword

SyntaxError: JSON Parse error: Unrecognized token '<' parse -- settings-personal.js:22
parse -- settings-personal:22
(anonymous function) -- settings-personal.js:22
j -- core.js:2:27740
fireWith -- core.js:2:27740
x -- core.js:4:11289
(anonymous function) -- core.js:4:14767

Steps to reproduce (found this one a bit difficult because the harddisk was full first):
1: Repair OCC through command line.
2: Go to installation and found that the private key doesn't match anymore
3: Go to personal settings and try to update encryption password
4: Click on 'update Private key password'

Expected behaviour

After clicking the button the password should be updated

Actual behaviour

Nothing happens and I see the error:
Failed to load resource: the server responded with a status of 503 (Service Unavailable) https://owncloud.bokhorst.info/index.php/apps/encryption/ajax/updatePrivateKeyPassword

SyntaxError: JSON Parse error: Unrecognized token '<' parse -- settings-personal.js:22
parse -- settings-personal:22
(anonymous function) -- settings-personal.js:22
j -- core.js:2:27740
fireWith -- core.js:2:27740
x -- core.js:4:11289
(anonymous function) -- core.js:4:14767

Server configuration

Operating system:
Ubuntu 16.04

Web server:
Apache 2.4.18

Database:
mysql 5.0.12
PHP version:
7.0.22-0ubuntu0.16.04.1
Nextcloud version: (see Nextcloud admin page)
12.0.3
Updated from an older Nextcloud/ownCloud or fresh install:
Fresh install (one year ago, now only the repair)

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
  • activity: 2.5.2
  • admin_audit: 1.2.0
  • bruteforcesettings: 1.0.2
  • calendar: 1.5.5
  • checksum: 0.3.5
  • comments: 1.2.0
  • contacts: 2.0.1
  • dav: 1.3.0
  • encryption: 1.6.0
  • federatedfilesharing: 1.2.0
  • federation: 1.2.0
  • files: 1.7.2
  • files_accesscontrol: 1.2.5
  • files_external: 1.3.0
  • files_pdfviewer: 1.1.1
  • files_retention: 1.1.2
  • files_sharing: 1.4.0
  • files_texteditor: 2.4.1
  • files_trashbin: 1.2.0
  • files_versions: 1.5.0
  • files_videoplayer: 1.1.0
  • firstrunwizard: 2.1
  • flowupload: 0.0.5
  • gallery: 17.0.0
  • logreader: 2.0.0
  • lookup_server_connector: 1.0.0
  • metadata: 0.5.0
  • nextcloud_announcements: 1.1
  • notifications: 2.0.0
  • oauth2: 1.0.5
  • password_policy: 1.2.2
  • provisioning_api: 1.2.0
  • quota_warning: 1.1.1
  • ransomware_protection: 1.0.4
  • richdocuments: 1.12.35
  • serverinfo: 1.2.0
  • sharebymail: 1.2.0
  • spreed: 2.0.1
  • survey_client: 1.0.0
  • systemtags: 1.2.0
  • theming: 1.3.0
  • twofactor_backupcodes: 1.1.1
  • updatenotification: 1.2.0
  • user_ldap: 1.2.1
  • workflowengine: 1.2.0

Nextcloud configuration:

Config report

{
"system": {
"instanceid": "ocbicosjiu7n",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"owncloud.bokhorst.info",
"192.168.1.241"
],
"datadirectory": "/media/ED1/owncloud",
"overwrite.cli.url": "https://owncloud.bokhorst.info",
"dbtype": "mysql",
"version": "12.0.3.3",
"dbname": "nextcloud",
"dbhost": "localhost",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"installed": true,
"maintenance": false,
"singleuser": true,
"memcache.local": "\OC\Memcache\APCu",
"memcache.locking": "\OC\Memcache\Redis",
"redis": {
"host": "localhost",
"port": 6379
},
"default_language": "en",
"auth.bruteforce.protection.enabled": true,
"log_type": "file",
"logfile": "/var/log/nextcloud.log",
"loglevel": 2,
"syslog_tag": "Nextcloud",
"logdateformat": "F d, Y H:i:s",
"logtimezone": "Europe/Amsterdam",
"updater.release.channel": "beta",
"data-fingerprint": "c75e588c40676994b9ebc2849829cebc"
}
}

Are you using encryption: yes

Client configuration

Browser:
Safari, Chrome & Firefox
Operating system:
MacOSx Sierra

Logs

Web server error log

Web server error log

Logs are empty concerning nextcloud & apache

@markc
Copy link

markc commented Nov 29, 2017

I would like to note that I am also seeing this same bug using v13 b2 on Ubuntu Artful and nginx 1.12.1. In my case I activated the encryption plugin after adding some users.

@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jun 20, 2018
@schiessle
Copy link
Member

can't reproduce it. Feel free to re-open if this is still an issue with the latest version of Nextcloud

@sp1z
Copy link

sp1z commented Jan 12, 2022

I'm also getting this when trying to update the password:

POST https://nextcloud.~~~~~~~~.com/index.php/apps/encryption/ajax/updatePrivateKeyPassword 503 (Service Unavailable)

Uncaught SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse ()
at Object. (settings-personal.js?v=4e498cd5-0:22:66)
at l (jquery.js:3187:31)
at Object.fireWith [as rejectWith] (jquery.js:3317:7)
at M (jquery.js:8759:14)
at XMLHttpRequest. (jquery.js:9123:9)

Nextcloud 20.0.14
Ubuntu 20.04.3 LTS
php7.4-common 7.4.3-4ubuntu2.8 amd64
apache2 2.4.41-4ubuntu3.9 amd64

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

6 participants