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

Can't create or import contacts #190

Closed
Woefdram opened this issue Apr 17, 2017 · 9 comments
Closed

Can't create or import contacts #190

Woefdram opened this issue Apr 17, 2017 · 9 comments
Labels
invalid This doesn't seem right

Comments

@Woefdram
Copy link

Woefdram commented Apr 17, 2017

Steps to reproduce

  1. Open Contacts
  2. Click "New Contact"

Expected behaviour

New, empty card should appear.

Actual behaviour

"Contact could not be created" appears at the top of the screen, nothing more. Devel console shows message "TypeError: contact is undefined"

Server configuration

Debian Testing ("Stretch"), kernel 4.9.18-1 (amd64)

Web server:
Apache 2.4.25

Database:
MariaDB 10.1.22

PHP version:
7.0.16

Nextcloud version: (see Nextcloud admin page)
11.0.2 (stable)

Contacts version: (see Nextcloud apps page)
1.5.3

Updated from an older Nextcloud or fresh install:
Fresh install.

Signing status:
?

Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

No errors have been found.

List of activated apps:

  • activity: 2.4.1
  • bookmarks: 0.9.1
  • calendar: 1.5.2
  • comments: 1.1.0
  • contacts: 1.5.3
  • dav: 1.1.1
  • federatedfilesharing: 1.1.1
  • federation: 1.1.1
  • files: 1.6.1
  • files_pdfviewer: 1.0.1
  • files_sharing: 1.1.1
  • files_texteditor: 2.2
  • files_trashbin: 1.1.0
  • files_versions: 1.4.0
  • files_videoplayer: 1.0.0
  • firstrunwizard: 2.0
  • gallery: 16.0.0
  • gpxedit: 0.0.5
  • gpxpod: 2.1.0
  • logreader: 2.0.0
  • lookup_server_connector: 1.0.0
  • nextcloud_announcements: 1.0
  • notes: 2.2.0
  • notifications: 1.0.1
  • ojsxc: 3.1.1
  • password_policy: 1.1.0
  • provisioning_api: 1.1.0
  • serverinfo: 1.1.1
  • sharebymail: 1.0.1
  • spreed: 1.2.0
  • spreedme: 0.3.8
  • survey_client: 0.1.5
  • systemtags: 1.1.3
  • tasks: 0.9.5
  • theming: 1.1.1
  • twofactor_backupcodes: 1.0.0
  • updatenotification: 1.1.1
  • user_ldap: 1.1.2
  • workflowengine: 1.1.1

The content of config/config.php:
$CONFIG = array (
'instanceid' => 'oclaaxene4cc',
'trusted_domains' =>
array (
0 => 'owncloud.example.com',
),
'datadirectory' => '/home/owncloud/nextcloud-data',
'overwrite.cli.url' => 'https://owncloud.example.com',
'dbtype' => 'mysql',
'version' => '11.0.2.7',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'nextcloud',
'dbpassword' => 'supersecret',
'logtimezone' => 'UTC',
'installed' => true,
'memcache.local' => '\OC\Memcache\Redis',
'redis' =>
array (
'host' => '/var/run/redis/redis.sock',
'port' => 0,
),
'filelocking.enabled' => true,
'memcache.locking' => '\OC\Memcache\Redis',
'mail_from_address' => 'ownCloud',
'mail_smtpmode' => 'sendmail',
'mail_domain' => 'example.com',
'ldapIgnoreNamingRules' => false,
'ldapProviderFactory' => '\OCA\User_LDAP\LDAPProviderFactory',
);

Are you using external storage, if yes which one: local/smb/sftp/...
No

Are you using encryption: yes/no
No

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
Yes, LDAP: OpenLDAP 2.4.44.

LDAP configuration (delete this part if not used)

+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Configuration | |
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport | 1 |
| hasPagedResultSupport | |
| homeFolderNamingRule | |
| lastJpegPhotoLookup | 0 |
| ldapAgentName | uid=owncloud,ou=users,ou=somewhere,dc=example,dc=com |
| ldapAgentPassword | *** |
| ldapAttributesForGroupSearch | |
| ldapAttributesForUserSearch | |
| ldapBackupHost | |
| ldapBackupPort | |
| ldapBase | dc=example,dc=com |
| ldapBaseGroups | ou=groups,ou=somewhere,dc=example.com |
| ldapBaseUsers | ou=users,ou=somewhere,dc=example.com |
| ldapCacheTTL | 600 |
| ldapConfigurationActive | 1 |
| ldapDynamicGroupMemberURL | |
| ldapEmailAttribute | homePostalAddress |
| ldapExperiencedAdmin | 0 |
| ldapExpertUUIDGroupAttr | |
| ldapExpertUUIDUserAttr | |
| ldapExpertUsernameAttr | uid |
| ldapGroupDisplayName | description |
| ldapGroupFilter | (&(|(objectclass=groupOfNames))) |
| ldapGroupFilterGroups | |
| ldapGroupFilterMode | 0 |
| ldapGroupFilterObjectclass | groupOfNames |
| ldapGroupMemberAssocAttr | memberUid |
| ldapHost | ldap://localhost |
| ldapIgnoreNamingRules | |
| ldapLoginFilter | (&(&(|(objectclass=posixAccount))(|(memberof=cn=owncloud,ou=groups,ou=somewhere,dc=example.com)))(|(uid=%uid)(|(mailPrimaryAddress=%uid)(mail=%uid))(|(description=%uid)(homePostalAddress=%uid)))) |
| ldapLoginFilterAttributes | description;homePostalAddress |
| ldapLoginFilterEmail | 1 |
| ldapLoginFilterMode | 1 |
| ldapLoginFilterUsername | 1 |
| ldapNestedGroups | 0 |
| ldapOverrideMainServer | |
| ldapPagingSize | 500 |
| ldapPort | 389 |
| ldapQuotaAttribute | |
| ldapQuotaDefault | |
| ldapTLS | 0 |
| ldapUserDisplayName | description |
| ldapUserDisplayName2 | |
| ldapUserFilter | (&(|(objectclass=posixAccount))(|(memberof=cn=owncloud,ou=groups,ou=somewhere,dc=example.com))) |
| ldapUserFilterGroups | owncloud |
| ldapUserFilterMode | 0 |
| ldapUserFilterObjectclass | posixAccount |
| ldapUuidGroupAttribute | auto |
| ldapUuidUserAttribute | auto |
| turnOffCertCheck | 1 |
| turnOnPasswordChange | 1 |
| useMemberOfToDetectMembership | 1 |
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Client configuration

Browser:
Firefox 45.8.0, Linux

Operating system:
Debian Testing, "Stretch"

CardDAV-clients:
Firefox, DavDroid 1.5.0.2 / Android 6.0.1

Logs

Web server error log

123.123.123.123 - - [17/Apr/2017:03:45:37 +0200] "POST /index.php/apps/ojsxc/ajax/getSettings.php HTTP/1.1" 200 1333 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:03:45:37 +0200] "POST /index.php/login HTTP/1.1" 303 1093 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:03:45:37 +0200] "GET /index.php/apps/files/ HTTP/1.1" 200 8191 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:03:45:38 +0200] "GET /index.php/avatar/hans/32?v=30 HTTP/1.1" 200 2053 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:03:45:39 +0200] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 933 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:03:45:39 +0200] "GET /index.php/apps/gallery/config?extramediatypes=1 HTTP/1.1" 200 1061 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:03:45:39 +0200] "GET /index.php/apps/systemtags/lastused HTTP/1.1" 200 949 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:03:45:39 +0200] "PROPFIND /remote.php/webdav/ HTTP/1.1" 207 7898 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:03:45:40 +0200] "GET /index.php/apps/files/ajax/getstoragestats.php?dir=%2F HTTP/1.1" 200 1141 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:03:45:50 +0200] "GET /index.php/apps/contacts/ HTTP/1.1" 200 5807 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:03:45:52 +0200] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 757 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:03:45:52 +0200] "GET /remote.php/dav/addressbooks HTTP/1.1" 200 981 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:03:45:52 +0200] "PROPFIND /remote.php/dav/addressbooks HTTP/1.1" 207 1557 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:03:45:53 +0200] "PROPFIND /remote.php/dav/principals/users/hans/ HTTP/1.1" 207 1573 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:03:45:53 +0200] "PROPFIND /remote.php/dav/addressbooks/users/hans/ HTTP/1.1" 207 2362 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:03:45:53 +0200] "PROPFIND /remote.php/dav/addressbooks/users/hans/contacts/ HTTP/1.1" 207 2650 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:03:45:53 +0200] "REPORT /remote.php/dav/addressbooks/users/hans/contacts/ HTTP/1.1" 207 965 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:03:45:53 +0200] "PROPFIND /remote.php/dav/addressbooks/users/hans/ HTTP/1.1" 207 1477 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:03:45:56 +0200] "PUT /remote.php/dav/addressbooks/users/hans/contacts/4b8cc462-d9dc-4db4-8d56-2ff0d94b223f.vcf HTTP/1.1" 400 517 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - hans [17/Apr/2017:03:45:56 +0200] "PROPFIND /remote.php/webdav/ HTTP/1.1" 207 1225 "-" "Mozilla/5.0 (Linux) mirall/2.2.4"

Nextcloud log (data/nextcloud.log)

{"reqId":"WPQdAn8AAQEAAEPXaXcAAAAD","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/ngclipboard\/dist\/ngclipboard.min.js\"","level":3,"time":"2017-04-17T01:40:18+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdAn8AAQEAAEPXaXcAAAAD","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/vcard\/src\/vcard.js\"","level":3,"time":"2017-04-17T01:40:18+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdAn8AAQEAAEPXaXcAAAAD","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/public\/script.js\"","level":3,"time":"2017-04-17T01:40:18+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdAn8AAQEAAEPXaXcAAAAD","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/angular-bootstrap\/ui-bootstrap.min.js\"","level":3,"time":"2017-04-17T01:40:18+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdAn8AAQEAAEPXaXcAAAAD","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/angular-bootstrap\/ui-bootstrap-tpls.min.js\"","level":3,"time":"2017-04-17T01:40:18+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdAn8AAQEAAEPXaXcAAAAD","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/jquery-timepicker\/jquery.ui.timepicker.js\"","level":3,"time":"2017-04-17T01:40:18+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdDX8AAQEAAEPaaaEAAAAF","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/angular\/angular.js\"","level":3,"time":"2017-04-17T01:40:29+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdDX8AAQEAAEPaaaEAAAAF","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/angular-route\/angular-route.js\"","level":3,"time":"2017-04-17T01:40:29+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdDX8AAQEAAEPaaaEAAAAF","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/angular-uuid4\/angular-uuid4.js\"","level":3,"time":"2017-04-17T01:40:29+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdDX8AAQEAAEPaaaEAAAAF","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/angular-cache\/dist\/angular-cache.js\"","level":3,"time":"2017-04-17T01:40:29+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdDX8AAQEAAEPaaaEAAAAF","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/angular-sanitize\/angular-sanitize.js\"","level":3,"time":"2017-04-17T01:40:29+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdDX8AAQEAAEPaaaEAAAAF","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/ui-select\/dist\/select.js\"","level":3,"time":"2017-04-17T01:40:29+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdDX8AAQEAAEPaaaEAAAAF","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/angular-click-outside\/clickoutside.directive.js\"","level":3,"time":"2017-04-17T01:40:29+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdDX8AAQEAAEPaaaEAAAAF","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/ngclipboard\/dist\/ngclipboard.min.js\"","level":3,"time":"2017-04-17T01:40:29+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdDX8AAQEAAEPaaaEAAAAF","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/vcard\/src\/vcard.js\"","level":3,"time":"2017-04-17T01:40:29+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdDX8AAQEAAEPaaaEAAAAF","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/public\/script.js\"","level":3,"time":"2017-04-17T01:40:29+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdDX8AAQEAAEPaaaEAAAAF","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/angular-bootstrap\/ui-bootstrap.min.js\"","level":3,"time":"2017-04-17T01:40:29+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdDX8AAQEAAEPaaaEAAAAF","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/angular-bootstrap\/ui-bootstrap-tpls.min.js\"","level":3,"time":"2017-04-17T01:40:29+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdDX8AAQEAAEPaaaEAAAAF","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/jquery-timepicker\/jquery.ui.timepicker.js\"","level":3,"time":"2017-04-17T01:40:29+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdFn8AAQEAAEPXaW0AAAAD","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/angular\/angular.js\"","level":3,"time":"2017-04-17T01:40:38+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdFn8AAQEAAEPXaW0AAAAD","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/angular-route\/angular-route.js\"","level":3,"time":"2017-04-17T01:40:38+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdFn8AAQEAAEPXaW0AAAAD","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/angular-uuid4\/angular-uuid4.js\"","level":3,"time":"2017-04-17T01:40:38+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdFn8AAQEAAEPXaW0AAAAD","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/angular-cache\/dist\/angular-cache.js\"","level":3,"time":"2017-04-17T01:40:38+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdFn8AAQEAAEPXaW0AAAAD","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/angular-sanitize\/angular-sanitize.js\"","level":3,"time":"2017-04-17T01:40:38+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdFn8AAQEAAEPXaW0AAAAD","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/ui-select\/dist\/select.js\"","level":3,"time":"2017-04-17T01:40:38+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdFn8AAQEAAEPXaW0AAAAD","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/angular-click-outside\/clickoutside.directive.js\"","level":3,"time":"2017-04-17T01:40:38+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdFn8AAQEAAEPXaW0AAAAD","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/ngclipboard\/dist\/ngclipboard.min.js\"","level":3,"time":"2017-04-17T01:40:38+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdFn8AAQEAAEPXaW0AAAAD","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/vcard\/src\/vcard.js\"","level":3,"time":"2017-04-17T01:40:38+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdFn8AAQEAAEPXaW0AAAAD","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/public\/script.js\"","level":3,"time":"2017-04-17T01:40:38+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdFn8AAQEAAEPXaW0AAAAD","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/angular-bootstrap\/ui-bootstrap.min.js\"","level":3,"time":"2017-04-17T01:40:38+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdFn8AAQEAAEPXaW0AAAAD","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/angular-bootstrap\/ui-bootstrap-tpls.min.js\"","level":3,"time":"2017-04-17T01:40:38+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQdFn8AAQEAAEPXaW0AAAAD","remoteAddr":"123.123.123.123","app":"contacts","message":"Could not find resource file \"\/apps\/contacts\/js\/vendor\/jquery-timepicker\/jquery.ui.timepicker.js\"","level":3,"time":"2017-04-17T01:40:38+00:00","method":"GET","url":"\/index.php\/apps\/contacts\/","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQeD38AAQEAAERg@w8AAAAE","remoteAddr":"123.123.123.123","app":"no app in context","message":"Missing expected parameters in change user hook","level":2,"time":"2017-04-17T01:44:47+00:00","method":"POST","url":"\/index.php\/login","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQeD38AAQEAAERg@w8AAAAE","remoteAddr":"123.123.123.123","app":"no app in context","message":"Missing expected parameters in change user hook","level":2,"time":"2017-04-17T01:44:47+00:00","method":"POST","url":"\/index.php\/login","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQeQX8AAQEAAESbfbEAAAAC","remoteAddr":"123.123.123.123","app":"no app in context","message":"Missing expected parameters in change user hook","level":2,"time":"2017-04-17T01:45:37+00:00","method":"POST","url":"\/index.php\/login","user":"hans","version":"11.0.2.7"}
{"reqId":"WPQeQX8AAQEAAESbfbEAAAAC","remoteAddr":"123.123.123.123","app":"no app in context","message":"Missing expected parameters in change user hook","level":2,"time":"2017-04-17T01:45:37+00:00","method":"POST","url":"\/index.php\/login","user":"hans","version":"11.0.2.7"}

Browser log

TypeError: contact is undefined script.js:957:5

@Woefdram
Copy link
Author

Woefdram commented Apr 17, 2017

I tried migrating an existing ownCloud 9.1.4 installation to Nextcloud 10.0.4. After migration I have my contact list, but I still can't add new ones. Clicking "Add new contact" doesn't do anything, browser logs:

Content Security Policy: The page's settings blocked the loading of a resource at self ("script-src https://nextcloud.example.com 'unsafe-eval'"). contacts

TypeError: xhr.responseXML is null script.js:1607:78

Apache logs:

123.123.123.123 - - [17/Apr/2017:22:39:22 +0200] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 1093 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:22:39:22 +0200] "GET /remote.php/dav/addressbooks HTTP/1.1" 200 981 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:22:39:22 +0200] "PROPFIND /remote.php/dav/addressbooks HTTP/1.1" 207 1493 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:22:39:22 +0200] "PROPFIND /remote.php/dav/principals/users/hans/ HTTP/1.1" 207 1493 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:22:39:22 +0200] "PROPFIND /remote.php/dav/addressbooks/users/hans/ HTTP/1.1" 207 2282 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:22:39:22 +0200] "PROPFIND /remote.php/dav/addressbooks/users/hans/contacts/ HTTP/1.1" 207 72540 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:22:39:22 +0200] "PROPFIND /remote.php/dav/addressbooks/users/hans/ HTTP/1.1" 207 1397 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:22:39:22 +0200] "REPORT /remote.php/dav/addressbooks/users/hans/contacts/ HTTP/1.1" 207 175984 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:22:39:24 +0200] "PUT /remote.php/dav/addressbooks/users/hans/contacts/f9d32075-f4e1-4d00-8ad7-41e955f1b611.vcf HTTP/1.1" 400 517 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:22:39:52 +0200] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 1093 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:22:40:22 +0200] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 4649 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
123.123.123.123 - - [17/Apr/2017:22:40:52 +0200] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 1093 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"

@irgendwie
Copy link
Member

Problem is the PUT request, which seems to fail

123.123.123.123 - - [17/Apr/2017:22:39:24 +0200] "PUT /remote.php/dav/addressbooks/users/hans/contacts/f9d32075-f4e1-4d00-8ad7-41e955f1b611.vcf HTTP/1.1" 400 517 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"

@Woefdram

  • Since you mention different CardDAV clients, are you able to successfully add and sync contacts with your other clients?
  • Would it be possible for you to look into the developer console of your browser and paste the request payload of the PUT request when creating a new contact?

@irgendwie irgendwie added bug Something isn't working needs info Not enough information provided labels Apr 17, 2017
@Woefdram
Copy link
Author

Creating and editing entries in Andoid and syncing them with DavDroid works like a charm.

As for the payload... There isn't any, because I never even get to the point where I can actually type any data. Nothing happens when I click "Add new contact".

@Woefdram
Copy link
Author

Thunderbird with SOGo works fine too, btw.

@irgendwie
Copy link
Member

@Woefdram When clicking 'New contact' some work happens in the background an a new contact is created (although you didn't enter any data) and pushed onto the server. In your log I'm able to see the PUT request, which pushes the contact to the server. Optimally the payload should look something like this:

BEGIN:VCARD
VERSION:3.0
FN:New contact
UID:11ff12a5-ac32-4756-b416-1bb74749baf3
END:VCARD

Since the server answers with the status code 400, I assume the request is sent incorrectly from the contacts app and therefore it would be interesting to see what the contacts app actually tried to send.

@Woefdram
Copy link
Author

I see. Attached is the whole shebang, one PUT.

put.txt

@Woefdram
Copy link
Author

Maybe this is more to your liking :-)

This is the Request Header:

Host: nextcloud.example.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/xml;charset=utf-8
requesttoken: NnMKBRQlGB1xLid7GWJeDX0NOhtkPglRf2UfPV5ZdzI=:L8rlqKlDAJM4mP+5Rfwa4On9IJsJ/69Q1LIIFUBXu8Y=
Content-Length: 103
Cookie: ococx30x41ti=dh60scnv4b9aguibvd85lacg76; oc_sessionPassphrase=yAixogB7Gtjor%2BkSenOhbVMHkRZTlsFiriYHYYGa7jIMLo2Z8VS7P5HYEkn%2Fpqw%2B8ugBtynKGyeZcAuTfYACObf11vPcueQL%2F94NzHd7j46NMKPKKj2eKDEJtrmF%2FijH; nc_sameSiteCookielax=true; nc_sameSiteCookiestrict=true; oclm3hzg2x5b=nouir49mcol6895fmt4crrpu52
Connection: keep-alive

This is the Response Header:

Connection: close
Content-Length: 226
Content-Type: text/html; charset=iso-8859-1
Date: Mon, 17 Apr 2017 22:08:26 GMT
Server: Apache
Strict-Transport-Security: max-age=15768000; includeSubDomains; preload

And this is the payload:

BEGIN:VCARD
VERSION:3.0
FN:Nieuwe contactpersoon
UID:78378928-c8cd-4bc2-8f2c-418dc1bf19bd
END:VCARD

@Woefdram
Copy link
Author

Mea culpa, mea maxima culpa. Turns out that ModSecurity was the problem. I thought it had been disabled...

Sorry for wasting your time.

@irgendwie
Copy link
Member

@Woefdram No worries mate 😉 glad you were able to find the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants