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

fail to save new contact #208

Closed
mepreston opened this issue May 6, 2017 · 10 comments
Closed

fail to save new contact #208

mepreston opened this issue May 6, 2017 · 10 comments
Labels
duplicate This issue or pull request already exists

Comments

@mepreston
Copy link

mepreston commented May 6, 2017

Steps to reproduce

  1. using a web browser add a new contact
  2. using the app selector switch to another app
  3. using the app selector switch back to contacts
  4. new contact is not there

Expected behaviour

it should save new contact

Actual behaviour

it does not save new contact.
i have to add new contacts to my phone or some other card-dav client.

Server configuration

Operating system: Linux markpreston.me 4.10.12-200.fc25.x86_64 #1 SMP Sat Apr 22 03:03:34 UTC 2017 x86_64

Web server: Apache (apache2handler)

Database: mysql 10.1.21

PHP version: 7.0.18
Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, apache2handler, bcmath, bz2, calendar, ctype, curl, dom, enchant, mbstring, fileinfo, ftp, gd, gettext, gmp, iconv, imap, intl, json, ldap, exif, mcrypt, mysqlnd, PDO, pgsql, Phar, posix, shmop, SimpleXML, soap, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xml, xmlwriter, xsl, mysqli, pdo_mysql, pdo_pgsql, pdo_sqlite, wddx, xmlreader, apcu, geoip, horde_lz4, lzf, memcache, OAuth, propro, raphf, smbclient, ssh2, zip, http, libsmbclient

Nextcloud version: 10.0.4 (stable) - 9.1.4.2

Updated from an older Nextcloud/ownCloud or fresh install: upgraded from ownCloud

Where did you install Nextcloud from: fedora official rpm

Signing status:

Signing status
"Integrity checker has been disabled. Integrity cannot be verified."

List of activated apps:

App list ``` Enabled: - activity: 2.3.2 - bookmarks: 0.9.0 - calendar: 1.5.2 - comments: 1.0.0 - contacts: 1.5.3 - dav: 1.0.1 - documents: 0.13.1 - federatedfilesharing: 1.0.1 - files: 1.5.2 - files_antivirus: 1.0.0.0 - files_external: 1.0.2 - files_pdfviewer: 0.8.1 - files_sharing: 1.0.0 - files_texteditor: 2.1 - files_trashbin: 1.0.0 - files_versions: 1.3.0 - files_videoplayer: 0.9.8 - firstrunwizard: 1.1 - galleryplus: 15.1.1 - issuetemplate: 0.2.1 - notifications: 0.3.0 - password_policy: 1.0.0 - serverinfo: 1.1.1 - systemtags: 1.0.2 - tasks: 0.9.5 - templateeditor: 0.1 - theming: 1.0.1 - workflowengine: 1.0.1

Disabled:

  • admin_audit
  • encryption
  • external
  • federation
  • files_accesscontrol
  • files_automatedtagging
  • files_retention
  • gallery
  • provisioning_api
  • survey_client
  • user_external
  • user_ldap
  • user_saml
</details>

**The content of config/config.php:**
<details>
	<summary>Config report</summary>

{
"installed": true,
"dbtype": "mysql",
"dbname": "nextclouddb",
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"dbhost": "127.0.0.1",
"dbtableprefix": "",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"forcessl": true,
"blacklisted_files": [
".htaccess"
],
"overwritehost": "",
"overwriteprotocol": "",
"overwritewebroot": "/nextcloud",
"overwritecondaddr": "",
"overwrite.cli.url": "/nextcloud",
"theme": "",
"default_language": "en",
"3rdpartyroot": "",
"3rdpartyurl": "",
"defaultapp": "files",
"knowledgebaseenabled": true,
"appstoreenabled": true,
"mail_domain": "REMOVED SENSITIVE VALUE",
"mail_smtpdebug": false,
"mail_smtpmode": "sendmail",
"mail_smtphost": "REMOVED SENSITIVE VALUE",
"mail_smtpport": "465",
"mail_smtptimeout": 10,
"mail_smtpauthtype": "LOGIN",
"memcached_server": [
"localhost",
11211
],
"trashbin_retention_obligation": "auto, 30",
"versions_retention_obligation": "auto",
"allow_user_to_change_display_name": true,
"appcodechecker": false,
"updatechecker": true,
"has_internet_connection": true,
"check_for_working_webdav": true,
"check_for_working_htaccess": false,
"asset-pipeline.enabled": false,
"assetdirectory": "/var/lib/nextcloud",
"log_type": "owncloud",
"logfile": "/var/log/nextCloud/nextcloud.log",
"loglevel": 0,
"logdateformat": "F d, Y H:i:s",
"logtimezone": "America/New_York",
"log_query": false,
"log_authfailip": false,
"log_rotate_size": 10485760,
"remember_login_cookie_lifetime": 1296000,
"session_lifetime": 86400,
"custom_csp_policy": "default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src *; font-src 'self' data:; media-src *",
"xframe_restriction": true,
"datadirectory": "/var/lib/nextcloud/data",
"maintenance": false,
"apps_paths": [
{
"path": "/usr/share/nextcloud/apps",
"url": "/apps",
"writable": false
},
{
"path": "/var/lib/nextcloud/apps",
"url": "/apps-appstore",
"writable": true
}
],
"customclient_desktop": "",
"customclient_android": "",
"customclient_ios": "",
"enable_previews": true,
"preview_max_scale_factor": 10,
"preview_libreoffice_path": "/usr/bin/libreoffice",
"preview_office_cl_parameters": "",
"enable_avatars": true,
"openssl": [],
"singleuser": false,
"instanceid": "oc9cc38f24fd",
"version": "9.1.4.2",
"trusted_domains": [
"markpreston.me",
"www.markpreston.me"
],
"mail_from_address": "nextcloud",
"secret": "REMOVED SENSITIVE VALUE",
"forceSSLforSubdomains": true,
"htaccess.RewriteBase": "/nextcloud",
"mail_smtpauth": 1,
"appstore.experimental.enabled": true
}

Are you using external storage, if yes which one: Array
(
[0] => \OC\Files\Storage\Local

)

Are you using encryption: no

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

Client configuration

Browser: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0

Operating system:

Logs

Web server error log

[06/May/2017:11:30:23 -0400] 192.168.1.120 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "PUT /nextcloud/remote.php/dav/addressbooks/users/mark.preston/contacts/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf HTTP/1.1" 312 [06/May/2017:11:30:24 -0400] 192.168.1.120 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "PUT /nextcloud/remote.php/dav/addressbooks/users/mark.preston/contacts/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf HTTP/1.1" 312 [06/May/2017:11:30:26 -0400] 192.168.1.120 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "PUT /nextcloud/remote.php/dav/addressbooks/users/mark.preston/contacts/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf HTTP/1.1" 312 [06/May/2017:11:30:29 -0400] 192.168.1.120 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "PUT /nextcloud/remote.php/dav/addressbooks/users/mark.preston/contacts/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf HTTP/1.1" 312 [06/May/2017:11:30:34 -0400] 192.168.1.120 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "PROPFIND /nextcloud/remote.php/webdav/ HTTP/1.1" 418 [06/May/2017:11:30:37 -0400] 192.168.1.120 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "PUT /nextcloud/remote.php/dav/addressbooks/users/mark.preston/contacts/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf HTTP/1.1" 312 [06/May/2017:11:30:38 -0400] 192.168.1.120 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "PUT /nextcloud/remote.php/dav/addressbooks/users/mark.preston/contacts/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf HTTP/1.1" 312 [06/May/2017:11:30:39 -0400] 192.168.1.120 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "PUT /nextcloud/remote.php/dav/addressbooks/users/mark.preston/contacts/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf HTTP/1.1" 312 [06/May/2017:11:30:42 -0400] 192.168.1.120 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "PUT /nextcloud/remote.php/dav/addressbooks/users/mark.preston/contacts/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf HTTP/1.1" 312 [06/May/2017:11:30:43 -0400] 192.168.1.120 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "PUT /nextcloud/remote.php/dav/addressbooks/users/mark.preston/contacts/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf HTTP/1.1" 312 [06/May/2017:11:30:45 -0400] 192.168.1.120 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "PUT /nextcloud/remote.php/dav/addressbooks/users/mark.preston/contacts/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf HTTP/1.1" 312 [06/May/2017:11:30:47 -0400] 192.168.1.75 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "PROPFIND /nextcloud/remote.php/webdav/ HTTP/1.1" 418 [06/May/2017:11:30:48 -0400] 192.168.1.120 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "GET /nextcloud/ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 74 [06/May/2017:11:30:52 -0400] 192.168.1.120 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "PROPFIND /nextcloud/remote.php/webdav/ HTTP/1.1" 418 [06/May/2017:11:30:53 -0400] 192.168.1.120 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "PUT /nextcloud/remote.php/dav/addressbooks/users/mark.preston/contacts/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf HTTP/1.1" 312 [06/May/2017:11:30:57 -0400] 192.168.1.120 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "PUT /nextcloud/remote.php/dav/addressbooks/users/mark.preston/contacts/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf HTTP/1.1" 312 [06/May/2017:11:31:00 -0400] 192.168.1.120 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "PUT /nextcloud/remote.php/dav/addressbooks/users/mark.preston/contacts/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf HTTP/1.1" 312

Nextcloud log (data/nextcloud.log)

{"reqId":"WQ3sD-jQ7nnJxXbIvVfftgAAAAg","remoteAddr":"192.168.1.120","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 412 An If-Match header was specified, but none of the specified the ETags matched.\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\PreconditionFailed\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(454): Sabre\\\\DAV\\\\Server->checkPreconditions(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Server.php(191): Sabre\\\\DAV\\\\Server->exec()\\n#3 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(30): OCA\\\\DAV\\\\Server->exec()\\n#4 \\\/usr\\\/share\\\/nextcloud\\\/remote.php(165): require_once('\\\/usr\\\/share\\\/next...')\\n#5 {main}\",\"File\":\"\\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php\",\"Line\":1267,\"User\":\"mark.preston\"}","level":0,"time":"May 06, 2017 11:30:23","method":"PUT","url":"\/nextcloud\/remote.php\/dav\/addressbooks\/users\/mark.preston\/contacts\/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf","user":"mark.preston","version":"9.1.4.2"} {"reqId":"WQ3sEPjQ7nnJxXbIvVfftwAAAAg","remoteAddr":"192.168.1.120","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 412 An If-Match header was specified, but none of the specified the ETags matched.\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\PreconditionFailed\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(454): Sabre\\\\DAV\\\\Server->checkPreconditions(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Server.php(191): Sabre\\\\DAV\\\\Server->exec()\\n#3 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(30): OCA\\\\DAV\\\\Server->exec()\\n#4 \\\/usr\\\/share\\\/nextcloud\\\/remote.php(165): require_once('\\\/usr\\\/share\\\/next...')\\n#5 {main}\",\"File\":\"\\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php\",\"Line\":1267,\"User\":\"mark.preston\"}","level":0,"time":"May 06, 2017 11:30:24","method":"PUT","url":"\/nextcloud\/remote.php\/dav\/addressbooks\/users\/mark.preston\/contacts\/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf","user":"mark.preston","version":"9.1.4.2"} {"reqId":"WQ3sEvjQ7nnJxXbIvVffuAAAAAg","remoteAddr":"192.168.1.120","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 412 An If-Match header was specified, but none of the specified the ETags matched.\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\PreconditionFailed\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(454): Sabre\\\\DAV\\\\Server->checkPreconditions(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Server.php(191): Sabre\\\\DAV\\\\Server->exec()\\n#3 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(30): OCA\\\\DAV\\\\Server->exec()\\n#4 \\\/usr\\\/share\\\/nextcloud\\\/remote.php(165): require_once('\\\/usr\\\/share\\\/next...')\\n#5 {main}\",\"File\":\"\\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php\",\"Line\":1267,\"User\":\"mark.preston\"}","level":0,"time":"May 06, 2017 11:30:26","method":"PUT","url":"\/nextcloud\/remote.php\/dav\/addressbooks\/users\/mark.preston\/contacts\/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf","user":"mark.preston","version":"9.1.4.2"} {"reqId":"WQ3sFfjQ7nnJxXbIvVffuQAAAAg","remoteAddr":"192.168.1.120","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 412 An If-Match header was specified, but none of the specified the ETags matched.\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\PreconditionFailed\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(454): Sabre\\\\DAV\\\\Server->checkPreconditions(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Server.php(191): Sabre\\\\DAV\\\\Server->exec()\\n#3 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(30): OCA\\\\DAV\\\\Server->exec()\\n#4 \\\/usr\\\/share\\\/nextcloud\\\/remote.php(165): require_once('\\\/usr\\\/share\\\/next...')\\n#5 {main}\",\"File\":\"\\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php\",\"Line\":1267,\"User\":\"mark.preston\"}","level":0,"time":"May 06, 2017 11:30:29","method":"PUT","url":"\/nextcloud\/remote.php\/dav\/addressbooks\/users\/mark.preston\/contacts\/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf","user":"mark.preston","version":"9.1.4.2"} {"reqId":"WQ3sHe3Dw9Otqi48Itl-NAAAAAQ","remoteAddr":"192.168.1.120","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 412 An If-Match header was specified, but none of the specified the ETags matched.\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\PreconditionFailed\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(454): Sabre\\\\DAV\\\\Server->checkPreconditions(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Server.php(191): Sabre\\\\DAV\\\\Server->exec()\\n#3 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(30): OCA\\\\DAV\\\\Server->exec()\\n#4 \\\/usr\\\/share\\\/nextcloud\\\/remote.php(165): require_once('\\\/usr\\\/share\\\/next...')\\n#5 {main}\",\"File\":\"\\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php\",\"Line\":1267,\"User\":\"mark.preston\"}","level":0,"time":"May 06, 2017 11:30:37","method":"PUT","url":"\/nextcloud\/remote.php\/dav\/addressbooks\/users\/mark.preston\/contacts\/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf","user":"mark.preston","version":"9.1.4.2"} {"reqId":"WQ3sHu3Dw9Otqi48Itl-NQAAAAQ","remoteAddr":"192.168.1.120","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 412 An If-Match header was specified, but none of the specified the ETags matched.\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\PreconditionFailed\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(454): Sabre\\\\DAV\\\\Server->checkPreconditions(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Server.php(191): Sabre\\\\DAV\\\\Server->exec()\\n#3 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(30): OCA\\\\DAV\\\\Server->exec()\\n#4 \\\/usr\\\/share\\\/nextcloud\\\/remote.php(165): require_once('\\\/usr\\\/share\\\/next...')\\n#5 {main}\",\"File\":\"\\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php\",\"Line\":1267,\"User\":\"mark.preston\"}","level":0,"time":"May 06, 2017 11:30:38","method":"PUT","url":"\/nextcloud\/remote.php\/dav\/addressbooks\/users\/mark.preston\/contacts\/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf","user":"mark.preston","version":"9.1.4.2"} {"reqId":"WQ3sH@3Dw9Otqi48Itl-NgAAAAQ","remoteAddr":"192.168.1.120","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 412 An If-Match header was specified, but none of the specified the ETags matched.\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\PreconditionFailed\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(454): Sabre\\\\DAV\\\\Server->checkPreconditions(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Server.php(191): Sabre\\\\DAV\\\\Server->exec()\\n#3 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(30): OCA\\\\DAV\\\\Server->exec()\\n#4 \\\/usr\\\/share\\\/nextcloud\\\/remote.php(165): require_once('\\\/usr\\\/share\\\/next...')\\n#5 {main}\",\"File\":\"\\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php\",\"Line\":1267,\"User\":\"mark.preston\"}","level":0,"time":"May 06, 2017 11:30:40","method":"PUT","url":"\/nextcloud\/remote.php\/dav\/addressbooks\/users\/mark.preston\/contacts\/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf","user":"mark.preston","version":"9.1.4.2"} {"reqId":"WQ3sIu3Dw9Otqi48Itl-NwAAAAQ","remoteAddr":"192.168.1.120","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 412 An If-Match header was specified, but none of the specified the ETags matched.\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\PreconditionFailed\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(454): Sabre\\\\DAV\\\\Server->checkPreconditions(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Server.php(191): Sabre\\\\DAV\\\\Server->exec()\\n#3 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(30): OCA\\\\DAV\\\\Server->exec()\\n#4 \\\/usr\\\/share\\\/nextcloud\\\/remote.php(165): require_once('\\\/usr\\\/share\\\/next...')\\n#5 {main}\",\"File\":\"\\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php\",\"Line\":1267,\"User\":\"mark.preston\"}","level":0,"time":"May 06, 2017 11:30:42","method":"PUT","url":"\/nextcloud\/remote.php\/dav\/addressbooks\/users\/mark.preston\/contacts\/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf","user":"mark.preston","version":"9.1.4.2"} {"reqId":"WQ3sI@3Dw9Otqi48Itl-OAAAAAQ","remoteAddr":"192.168.1.120","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 412 An If-Match header was specified, but none of the specified the ETags matched.\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\PreconditionFailed\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(454): Sabre\\\\DAV\\\\Server->checkPreconditions(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Server.php(191): Sabre\\\\DAV\\\\Server->exec()\\n#3 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(30): OCA\\\\DAV\\\\Server->exec()\\n#4 \\\/usr\\\/share\\\/nextcloud\\\/remote.php(165): require_once('\\\/usr\\\/share\\\/next...')\\n#5 {main}\",\"File\":\"\\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php\",\"Line\":1267,\"User\":\"mark.preston\"}","level":0,"time":"May 06, 2017 11:30:43","method":"PUT","url":"\/nextcloud\/remote.php\/dav\/addressbooks\/users\/mark.preston\/contacts\/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf","user":"mark.preston","version":"9.1.4.2"} {"reqId":"WQ3sJe3Dw9Otqi48Itl-OQAAAAQ","remoteAddr":"192.168.1.120","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 412 An If-Match header was specified, but none of the specified the ETags matched.\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\PreconditionFailed\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(454): Sabre\\\\DAV\\\\Server->checkPreconditions(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Server.php(191): Sabre\\\\DAV\\\\Server->exec()\\n#3 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(30): OCA\\\\DAV\\\\Server->exec()\\n#4 \\\/usr\\\/share\\\/nextcloud\\\/remote.php(165): require_once('\\\/usr\\\/share\\\/next...')\\n#5 {main}\",\"File\":\"\\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php\",\"Line\":1267,\"User\":\"mark.preston\"}","level":0,"time":"May 06, 2017 11:30:45","method":"PUT","url":"\/nextcloud\/remote.php\/dav\/addressbooks\/users\/mark.preston\/contacts\/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf","user":"mark.preston","version":"9.1.4.2"} {"reqId":"WQ3sLSh7jfoUFGA8Jt7NJgAAAAc","remoteAddr":"192.168.1.120","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 412 An If-Match header was specified, but none of the specified the ETags matched.\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\PreconditionFailed\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(454): Sabre\\\\DAV\\\\Server->checkPreconditions(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Server.php(191): Sabre\\\\DAV\\\\Server->exec()\\n#3 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(30): OCA\\\\DAV\\\\Server->exec()\\n#4 \\\/usr\\\/share\\\/nextcloud\\\/remote.php(165): require_once('\\\/usr\\\/share\\\/next...')\\n#5 {main}\",\"File\":\"\\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php\",\"Line\":1267,\"User\":\"mark.preston\"}","level":0,"time":"May 06, 2017 11:30:54","method":"PUT","url":"\/nextcloud\/remote.php\/dav\/addressbooks\/users\/mark.preston\/contacts\/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf","user":"mark.preston","version":"9.1.4.2"} {"reqId":"WQ3sMSh7jfoUFGA8Jt7NJwAAAAc","remoteAddr":"192.168.1.120","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 412 An If-Match header was specified, but none of the specified the ETags matched.\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\PreconditionFailed\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(454): Sabre\\\\DAV\\\\Server->checkPreconditions(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Server.php(191): Sabre\\\\DAV\\\\Server->exec()\\n#3 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(30): OCA\\\\DAV\\\\Server->exec()\\n#4 \\\/usr\\\/share\\\/nextcloud\\\/remote.php(165): require_once('\\\/usr\\\/share\\\/next...')\\n#5 {main}\",\"File\":\"\\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php\",\"Line\":1267,\"User\":\"mark.preston\"}","level":0,"time":"May 06, 2017 11:30:57","method":"PUT","url":"\/nextcloud\/remote.php\/dav\/addressbooks\/users\/mark.preston\/contacts\/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf","user":"mark.preston","version":"9.1.4.2"} {"reqId":"WQ3sNCh7jfoUFGA8Jt7NKAAAAAc","remoteAddr":"192.168.1.120","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 412 An If-Match header was specified, but none of the specified the ETags matched.\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\PreconditionFailed\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(454): Sabre\\\\DAV\\\\Server->checkPreconditions(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Server.php(191): Sabre\\\\DAV\\\\Server->exec()\\n#3 \\\/usr\\\/share\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(30): OCA\\\\DAV\\\\Server->exec()\\n#4 \\\/usr\\\/share\\\/nextcloud\\\/remote.php(165): require_once('\\\/usr\\\/share\\\/next...')\\n#5 {main}\",\"File\":\"\\\/usr\\\/share\\\/php\\\/Sabre\\\/DAV\\\/Server.php\",\"Line\":1267,\"User\":\"mark.preston\"}","level":0,"time":"May 06, 2017 11:31:00","method":"PUT","url":"\/nextcloud\/remote.php\/dav\/addressbooks\/users\/mark.preston\/contacts\/ebabf7dc-74a5-4628-9d63-b4155a0293d7.vcf","user":"mark.preston","version":"9.1.4.2"}

Browser log

n/a
@irgendwie
Copy link
Member

Thanks for the report! Since you can add contacts via 3rd party clients, we need your browser log (javascript errors) to find the problem.

Do you by any chance use 'mod_security'? There was a bug in an external library we are using, which will be fixed once #197 is merged and a new version of contacts is released.

@irgendwie irgendwie added the needs info Not enough information provided label May 19, 2017
@mepreston
Copy link
Author

Hi,
my httpd does not user mod_security.

here is the log info from the browser:
JQMIGRATE: Migrate is installed, version 1.4.0 jquery-migrate.min.js:2:542
Use of getAttributeNode() is deprecated. Use getAttribute() instead. jquery-migrate.min.js:2:1714
Use of attributes’ nodeValue attribute is deprecated. Use value instead. jquery-migrate.min.js:2:1714

Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https:// 'unsafe-eval'”). Source: ondrop attribute on INPUT element. contacts
PUT
XHR
https:///nextcloud/remote.php/dav/addressbooks/users/mark.preston/contacts/341157f0-e209-4881-8736-ac63d1825faf.vcf [HTTP/1.1 412 Precondition failed 244ms]
Error: Bad status: 412 dav.js:3649:27
PUT
XHR
https:///nextcloud/remote.php/dav/addressbooks/users/mark.preston/contacts/341157f0-e209-4881-8736-ac63d1825faf.vcf [HTTP/1.1 412 Precondition failed 204ms]
Error: Bad status: 412 dav.js:3649:27
Error: Bad status: 412 dav.js:3649:27
Error: Bad status: 412

@ghost
Copy link

ghost commented May 24, 2017

The same happens with me under Nextcloud 12. What I did remark is that when I change only one field then go to another tab (Files, Calendar etc) and then go back it will be saved but if I change more than one then those will be forgotten.
That is the error when saving more than one field:

PUT <MyURL>/remote.php/dav/addressbooks/users/<MyUser>/contacts/<ID>.vcf 412 (Precondition failed)
Uncaught (in promise) Error: Bad status: 412 at XMLHttpRequest.request.onreadystatechange (dav.js?v=0da0dec…-11:3649)

Edit: Hmm maybe that was the fix but for now it does not happen again. Inside my apache configs (conf-available/security.conf) I changed the following lines:

-Header unset ETag
+#Header unset ETag

+Header always unset X-Powered-By

-FileETag None
+#FileETag None

And now DAVdroid and the webinterface seem to work again.

Edit: Oh well it still happens but way less frequently as before so it is kinda useable.

@ttnt
Copy link

ttnt commented Jun 13, 2017

I face the same issue.

NextCloud 12

Whenever I create new contacts using the Browser/Nextcloud interface it will save all the informations, BUT only temporarily. If I click on the calendar and then switch back to "contacts" all the created contacts show up as "New Contact" without any data in it.

Only facing this problem via browser. doenst matter which browser. i tried opera, chrome, firefox and Inet explorer - without any plugins

@andreasjacobsen93
Copy link
Member

I have the same issue in NC 12.

dav.js?v=e57276b…-10:3641 PUT https://***/remote.php/dav/addressbooks/users/***/Personal/48fc02bb-cf67-4004-87cc-655c0a1317b2.vcf 412 (Precondition failed)
send	                        @	dav.js?v=e57276b…-10:3641
callee$2$0$	                @	dav.js?v=e57276b…-10:3156
tryCatch	                @	dav.js?v=e57276b…-10:121
invoke	                        @	dav.js?v=e57276b…-10:294
Gp.(anonymous function)	        @	dav.js?v=e57276b…-10:330
onFulfilled	                @	dav.js?v=e57276b…-10:3737
(anonymous)	                @	dav.js?v=e57276b…-10:3726
co	                        @	dav.js?v=e57276b…-10:3722
send	                        @	dav.js?v=e57276b…-10:3134
updateObject	                @	dav.js?v=e57276b…-10:3415
updateCard	                @	dav.js?v=e57276b…-10:1799
updateCard	                @	dav.js?v=e57276b…-10:1524
update	                        @	contact_service.js:171
ctrl.updateContact	        @	contactDetails_controller.js:72
fn	                        @	VM1624:4
$eval	                        @	angular.js?v=e57276b…-10:17682
(anonymous)	                @	angular.js?v=e57276b…-10:24916
(anonymous)	                @	angular.js?v=e57276b…-10:27691
forEach	                        @	angular.js?v=e57276b…-10:321
$$writeModelToScope	        @	angular.js?v=e57276b…-10:27689
writeToModelIfNeeded	        @	angular.js?v=e57276b…-10:27682
(anonymous)	                @	angular.js?v=e57276b…-10:27676
validationDone	                @	angular.js?v=e57276b…-10:27603
processAsyncValidators	        @	angular.js?v=e57276b…-10:27586
$$runValidators	                @	angular.js?v=e57276b…-10:27530
$$parseAndValidate	        @	angular.js?v=e57276b…-10:27669
$commitViewValue	        @	angular.js?v=e57276b…-10:27637
(anonymous)	                @	angular.js?v=e57276b…-10:27774
(anonymous)	                @	angular.js?v=e57276b…-10:19612
completeOutstandingRequest      @	angular.js?v=e57276b…-10:5964
(anonymous)	                @	angular.js?v=e57276b…-10:6243
Uncaught (in promise) Error: Bad status: 412
    at XMLHttpRequest.request.onreadystatechange (dav.js?v=e57276b…-10:3649)
request.onreadystatechange @ dav.js?v=e57276b…-10:3649

@jancborchardt
Copy link
Member

Any idea here @nextcloud/contacts @nextcloud/javascript? :)

@jancborchardt jancborchardt added the bug Something isn't working label Jul 4, 2017
@mepreston
Copy link
Author

any progress on this? i REALLY prefer using the browser interface to create contacts as i HATE typing on the small psuedo keyboard on the mobile/tablet device.

@skjnldsv
Copy link
Member

Have one of you tried the current master build?

@mepreston
Copy link
Author

sorry i can't try the current build. my install is from fedora rpm packages. i'm still waiting for them to release v11 packages which are held up by dependencies.

@skjnldsv
Copy link
Member

Don't worry. This is related to a server-side issue.
A duplicate of #257

@skjnldsv skjnldsv marked this as a duplicate of #257 Jul 27, 2017
@skjnldsv skjnldsv added duplicate This issue or pull request already exists and removed bug Something isn't working needs info Not enough information provided labels Jul 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

6 participants