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

Carddav sync error : data too long for colum prop_value #519

Closed
Mer0me opened this issue Sep 15, 2022 · 7 comments
Closed

Carddav sync error : data too long for colum prop_value #519

Mer0me opened this issue Sep 15, 2022 · 7 comments
Labels
bug Something isn't working needs feedback Further information is requested

Comments

@Mer0me
Copy link

Mer0me commented Sep 15, 2022

Describe the bug
Syncing addressbook with Nextcloud sometimes causes error

To Reproduce
Steps to reproduce the behavior:

  1. Configure carddav sync with proper Nextcloud URL
  2. Click on sync option
  3. See the "unexpected error"

Expected behavior
The sync should work or give a relevant error

Please complete the following information:

  • Browser: Firefox 104.0.2
  • IMAP daemon: dovecot
  • PHP version: 7.4.30
  • SnappyMail Version: 2.18.0

Debug/logging information
This error is throwed in the debug log :
[2022-09-15 12:08:30.119][de2bf97e] JSON[DATA]: {"Action":"ContactsSync","Result":false,"ErrorCode":999,"ErrorMessage":"22001 - SQLSTATE[22001]: String data, right truncated: 1406
Data too long for column 'prop_value' at row 1","ErrorMessageAdditional":"","Time":1720}

Additional context
I've got error 3 times in a row, but now there is no more error. Sync is going on with some other problem that I will describe in another bug.

@the-djmaze
Copy link
Owner

SnappyMail now stores the whole vCard in the database.

database prop_value
sqlite: text = variable 2GB length
pgsql: text = variable unlimited length
mysql: text = 65535 bytes

Will change that to MEDIUMTEXT (16,777,215 bytes)

@phsc84
Copy link

phsc84 commented Sep 16, 2022

Why not LONGTEXT (4GB)? This would match better with sqlite and pgsql than MEDIUMTEXT (16MB).

@Mer0me
Copy link
Author

Mer0me commented Sep 16, 2022

On Nextcloud database, it seems to be stored as longblob

@the-djmaze
Copy link
Owner

Why not LONGTEXT (4GB)? This would match better with sqlite and pgsql than MEDIUMTEXT (16MB).

True, but i wonder who has a single vCard larger then 16 MiB.
That's why i've set it to MEDIUMTEXT

@the-djmaze
Copy link
Owner

Solved with v2.18.2?

@the-djmaze the-djmaze added bug Something isn't working needs feedback Further information is requested labels Sep 24, 2022
@Mer0me
Copy link
Author

Mer0me commented Sep 29, 2022

I'm afraid I won't be able to help you anymore, we have switched to the Nextcloud official webmail here.
Thank you for your efforts and long life to Snappymail.

@phsc84
Copy link

phsc84 commented Sep 30, 2022

Just tested CardDAV sync on my installation with 2.18.3. It worked perfectly fine for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs feedback Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants