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

Error: "No contacts here" for address books with many contacts #258

Closed
CamZie opened this issue Jul 19, 2017 · 20 comments
Closed

Error: "No contacts here" for address books with many contacts #258

CamZie opened this issue Jul 19, 2017 · 20 comments
Labels
needs info Not enough information provided

Comments

@CamZie
Copy link

CamZie commented Jul 19, 2017

Steps to reproduce

  1. Import address book with many contacts (in my case 1500)
  2. Go to the web interface in the contacts menu
  3. "No contacts here" will appear, but synchronisation still happens among devices

Expected behaviour

Contacts should appear

Actual behaviour

No contacts are showing with "No contacts here" message

Server configuration

Operating system: Debian 7 (wheezy)

Web server: nginx 1.8.1

Database: MySQL 5.6.36

PHP version: 5.6

Nextcloud version: 11.0.2

Contacts version: 1.5.3

Updated from an older Nextcloud or fresh install: Updated from Nextcloud version 10.0.3

Signing status:

No errors have been found.

List of activated apps:

  - activity: 2.4.1
  - admin_audit: 1.1.0
  - calendar: 1.5.2
  - comments: 1.1.0
  - contacts: 1.5.3
  - dav: 1.1.1
  - encryption: 1.4.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_videoplayer: 1.0.0
  - gallery: 16.0.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.0.0
  - nextcloud_announcements: 1.0
  - notifications: 1.0.1
  - password_policy: 1.1.0
  - provisioning_api: 1.1.0
  - serverinfo: 1.1.1
  - sharebymail: 1.0.1
  - survey_client: 0.1.5
  - systemtags: 1.1.3
  - tasks: 0.9.5
  - templateeditor: 0.2
  - theming: 1.1.1
  - twofactor_backupcodes: 1.0.0
  - updatenotification: 1.1.1
  - workflowengine: 1.1.1

Nextcloud configuration:

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "\/mnt\/data",
        "dbtype": "mysql",
        "version": "11.0.2.7",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "forcessl": true,
        "theme": "***REMOVED SENSITIVE VALUE**",
        "enable_previews": true,
        "enable_avatars": false,
        "mail_domain": "***REMOVED SENSITIVE VALUE**",
        "mail_smtpmode": "smtp",
        "log_authfailip": true,
        "loglevel": 2,
        "maintenance": false,
        "customclient_desktop": "***REMOVED SENSITIVE VALUE**",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE**"
        ],
        "share_folder": "\/Shared",
        "overwritewebroot": "\/",
        "overwriteprotocol": "https",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "singleuser": false,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "trashbin_retention_obligation": "auto,30",
        "activity_expire_days": 14,
        "logtimezone": "Europe\/Zurich",
        "log_type": "errorlog",
        "skeletondirectory": "***REMOVED SENSITIVE VALUE**"
    }
}

Are you using encryption: yes

Client configuration

Browser: Safari/603.2.4 and others

Operating system: Mac OS X/10.12.5

CardDAV-clients: Apple contacts and Android CardDAV-Sync

Logs

Nextcloud log (data/nextcloud.log)

2017/07/18 14:34:48 [error] 7962#7962: *83500504 FastCGI sent in stderr: "PHP message: [owncloud][PHP][3] XMLWriter::text(): Memory allocation failed : buffer error: text too long at /var/www/***REMOVED SENSITIVE VALUE**/3rdparty/sabre/xml/lib/Serializer/functions.php#169
PHP message: [owncloud][PHP][3] XMLWriter::text(): Memory allocation failed : growing buffer at /var/www/***REMOVED SENSITIVE VALUE**/3rdparty/sabre/xml/lib/Serializer/functions.php#169" while reading response header from upstream, client: ***REMOVED SENSITIVE VALUE**, server:***REMOVED SENSITIVE VALUE**, request: "REPORT /remote.php/dav/addressbooks/users/***REMOVED SENSITIVE VALUE**/Contacts/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "***REMOVED SENSITIVE VALUE**"

PHP message: [owncloud][PHP][3] XMLWriter::text(): Memory allocation failed : growing buffer at /var/www/***REMOVED SENSITIVE VALUE**/3rdparty/sabre/xml/lib/Serializer/functions.php#169" while reading response header from upstream, client:***REMOVED SENSITIVE VALUE**, server: ***REMOVED SENSITIVE VALUE**, request: "REPORT /remote.php/dav/addressbooks/users/***REMOVED SENSITIVE VALUE**/Contacts/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "***REMOVED SENSITIVE VALUE**"

I have tried increasing the php memory limit from 512MB to 1024MB, but this did not help.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@CamZie
Copy link
Author

CamZie commented Jul 26, 2017

any news?

@skjnldsv
Copy link
Member

Do you have any error in your browser logs?

@skjnldsv skjnldsv added the needs info Not enough information provided label Jul 26, 2017
@CamZie
Copy link
Author

CamZie commented Jul 27, 2017

Thanks for the feedback.
Below you will find the errors in the logs of 3 different browsers:

Safari
safari-log

Chrome
chrome-console

Firefox
firefox-console

@skjnldsv
Copy link
Member

And could you post the response from chrome network's tab on the contacts request?
It should be an xml output. :)

@CamZie
Copy link
Author

CamZie commented Jul 27, 2017

Please find below the network response from the contacts request:

This is the XML output for the address book

<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:card="urn:ietf:params:xml:ns:carddav" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
 <d:response>
  <d:href>/remote.php/dav/addressbooks/</d:href>
  <d:propstat>
   <d:prop>
    <d:current-user-principal>
     <d:href>/remote.php/dav/principals/users/***REMOVED***/</d:href>
    </d:current-user-principal>
   </d:prop>
   <d:status>HTTP/1.1 200 OK</d:status>
  </d:propstat>
 </d:response>
</d:multistatus>

This is the XML output for the contacts. Are these what you are looking for? I have only pasted the first 107 lines out of 76’808 response lines; please let me know if you need the entire output.

<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:card="urn:ietf:params:xml:ns:carddav" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
 <d:response>
  <d:href>/remote.php/dav/addressbooks/users/***REMOVED***/Contacts/</d:href>
  <d:propstat>
   <d:prop>
    <d:supported-report-set>
     <d:supported-report>
      <d:report>
       <d:sync-collection/>
      </d:report>
     </d:supported-report>
     <d:supported-report>
      <d:report>
       <d:expand-property/>
      </d:report>
     </d:supported-report>
     <d:supported-report>
      <d:report>
       <d:principal-match/>
      </d:report>
     </d:supported-report>
     <d:supported-report>
      <d:report>
       <d:principal-property-search/>
      </d:report>
     </d:supported-report>
     <d:supported-report>
      <d:report>
       <d:principal-search-property-set/>
      </d:report>
     </d:supported-report>
     <d:supported-report>
      <d:report>
       <card:addressbook-multiget/>
      </d:report>
     </d:supported-report>
     <d:supported-report>
      <d:report>
       <card:addressbook-query/>
      </d:report>
     </d:supported-report>
     <d:supported-report>
      <d:report>
       <oc:filter-comments/>
      </d:report>
     </d:supported-report>
     <d:supported-report>
      <d:report>
       <oc:filter-files/>
      </d:report>
     </d:supported-report>
    </d:supported-report-set>
   </d:prop>
   <d:status>HTTP/1.1 200 OK</d:status>
  </d:propstat>
 </d:response>
 <d:response>
  <d:href>/remote.php/dav/addressbooks/users/***REMOVED***/Contacts/f5ef8ac9-5275-488d-baa0-caa1ca2946f6.vcf</d:href>
  <d:propstat>
   <d:prop>
    <d:supported-report-set>
     <d:supported-report>
      <d:report>
       <d:expand-property/>
      </d:report>
     </d:supported-report>
     <d:supported-report>
      <d:report>
       <d:principal-match/>
      </d:report>
     </d:supported-report>
     <d:supported-report>
      <d:report>
       <d:principal-property-search/>
      </d:report>
     </d:supported-report>
     <d:supported-report>
      <d:report>
       <d:principal-search-property-set/>
      </d:report>
     </d:supported-report>
     <d:supported-report>
      <d:report>
       <card:addressbook-multiget/>
      </d:report>
     </d:supported-report>
     <d:supported-report>
      <d:report>
       <card:addressbook-query/>
      </d:report>
     </d:supported-report>
     <d:supported-report>
      <d:report>
       <oc:filter-comments/>
      </d:report>
     </d:supported-report>
     <d:supported-report>
      <d:report>
       <oc:filter-files/>
      </d:report>
     </d:supported-report>
    </d:supported-report-set>
   </d:prop>
   <d:status>HTTP/1.1 200 OK</d:status>
  </d:propstat>
 </d:response>

@mburnicki
Copy link

I've recently upgraded from owncloud 8.2.x to nextcloud 12 which comes with contacts 1.5.3. In the data base there are about 40 address books which are shared with different groups of people and there are totally about 2700 contacts. Even though the old owncloud app took very long to load all contacts when the contact page is opened, this new app takes even significantly longer to load, and in the mean time I also see this message.

Also, once the contacts list has been loaded, if I click on one contact to see or change its details, it takes many seconds until the page is updated and the details are shown. :-(

@skjnldsv
Copy link
Member

@mburnicki The next contact update will change a lot of things!
I'll be glad that you try it and keep us updated of your loading issue :)

@CamZie
Copy link
Author

CamZie commented Aug 16, 2017

@skjnldsv is there anything wrong with the XML output I posted?

@skjnldsv
Copy link
Member

@CamZie Do you have access to your database?

@CamZie
Copy link
Author

CamZie commented Aug 31, 2017

@skjnldsv Yes, I do have access to the database. How should I proceed?

@skjnldsv
Copy link
Member

skjnldsv commented Aug 31, 2017

Could you go to the oc_cards table and get the vcard raw data of the biggest row you have? You can sort it by the carddata column since it includes the size as default blob sorting option :)

I suspect a too big vcard breaking the php lib :)

@skjnldsv
Copy link
Member

Any news?

@CamZie
Copy link
Author

CamZie commented Sep 28, 2017

@skjnldsv We have removed the largest vcard with the size of 1018515 but still no success. Would you be able to tell us what the maximum recommended size would be for a vcard?

@skjnldsv
Copy link
Member

Depends on your installation. But it could be a corrupted vcard. Maybe the PHOTO binary is corrupted and it's not a size issue. I'm sorry, but it's hard to see from my point of view! 😕

If you want, you can send me your vcf file at skjnldsv@protonmail.com, I won't use it other than testing. If you're trusting enough, it would greatly help me debug! :)
(other users have been doing this occasionally, you won't be the first and can have full confidence! :) )

@CamZie
Copy link
Author

CamZie commented Sep 28, 2017

Unfortunately I cannot share the vcf file, since it belongs to a customer. I will do some more tests and will let you know if there is some progress.

Do you by any chance have a quick tip on checking the integrity of the vcf file? Or any other tests I can do to verify the problem?

@skjnldsv
Copy link
Member

@CamZie I understand! :)
Hum, you could try removing all the pictures? Is it a big vcf?

@CamZie
Copy link
Author

CamZie commented Nov 8, 2017

@skjnldsv Sorry for the late response, but I have been doing some tests on my side.
I noticed that there is a new release for the contacts app (2.0.1) so I figured I would upgrade it in my Nextcloud installation. After this upgrade, the customer reported that the contacts appear. However, in the log files I still see the following errors related to this customer's address book. The log entry seems to appear every 1-5 minutes. Any ideas?

Error message in nextcloud.log
2017/11/08 14:46:19 [error] 19618#19618: *50278883 FastCGI sent in stderr: "PHP message: [owncloud]
[carddav][4] Exception: {"Exception":"Sabre\\DAV\\Exception\\InvalidSyncToken","Message":"Invalid or 
unknown sync token","Code":0,"Trace":"#0 \/var\/www\/***REMOVED SENSITIVE VALUE***\/3rdparty
\/sabre\/dav\/lib\/DAV\/Sync\/Plugin.php(65): Sabre\\DAV\\Sync\\Plugin->syncCollection('addressbooks
\/st...', Object(Sabre\\DAV\\Xml\\Request\\SyncCollectionReport))\n#1 [internal function]: Sabre\\DAV
\\Sync\\Plugin->Sabre\\DAV\\Sync\\{closure}('{DAV:}sync-coll...', Object(Sabre\\DAV\\Xml\\Request
\\SyncCollectionReport), 'addressbooks\/st...')\n#2 \/var\/www\/***REMOVED SENSITIVE 
VALUE***\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Object(Closure),
 Array)\n#3 \/var\/www\/***REMOVED SENSITIVE VALUE***\/3rdparty\/sabre\/dav\/lib\/DAV
\/CorePlugin.php(718): Sabre\\Event\\EventEmitter->emit('report', Array)\n#4 [internal function]: 
Sabre\\DAV\\CorePlugin->httpReport(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP
\\Response))\n#5 \/var\/www\/***REMOVED SENSITIVE VALUE***\/3rdparty\/sabre\/event\/lib\
/EventEmitt" while reading response header from upstream, client: ***REMOVED SENSITIVE VALUE***,
 server: ***REMOVED SENSITIVE VALUE***, request: "REPORT /remote.php/carddav/addressbooks
/***REMOVED SENSITIVE VALUE***/Contacts/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-
fpm.sock:", host: "***REMOVED SENSITIVE VALUE***"

@skjnldsv
Copy link
Member

skjnldsv commented Mar 1, 2018

@CamZie is this still occurring with latest 2.1.1?

@CamZie
Copy link
Author

CamZie commented Mar 1, 2018

@skjnldsv This issue with the "No contacts here" has been solved since the upgrade to 2.0.1.

About the error "Invalid or unknown sync token" in the logs mentioned on my last post, I have opened another issue about this on the nextcloud/server repository #7793.

@skjnldsv
Copy link
Member

skjnldsv commented Mar 1, 2018

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs info Not enough information provided
Projects
None yet
Development

No branches or pull requests

3 participants