pimutils / pimutils/vdirsyncer
New contact insertion doesn't work on Google CardDAV
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 185
- Avg merge
- 11h 49m
- Merged PRs (30d)
- 1
Description
Google CardDAV uses POST instead of currenctly sent PUT to insert a new contact.
The requests results with 400.
debug: PUT https://www.googleapis.com/carddav/v1/principals/my_email@gmail.com/lists/default/2b724bfc-ee0d-4a04-8499-b8446bf831af.vcf
debug: {'User-Agent': 'redacted.apps.googleusercontent.com', 'Content-Type': 'text/vcard', 'If-None-Match': '*'}
debug: b'BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID:-//Sabre//Sabre VObject 4.4.3//EN\r\nUID:2b724bfc-ee0d-4a04-8499-b8446bf831af\r\nFN:test\r\nADR;TYPE=HOME:;;;;;;\r\nEMAIL;TYPE=HOME:\r\nTEL;TYPE=HOME,VOICE:\r\nREV;VALUE=DATE-AND-OR-TIME:20221013T213323Z\r\nEND:VCARD\r\n'
debug: Sending request...
debug: 400
debug: <CIMultiDictProxy('Vary': 'Origin', 'Vary': 'X-Origin', 'Vary': 'Referer', 'Content-Type': 'application/json; charset=UTF-8', 'Content-Encoding': 'gzip', 'Date': 'Thu, 13 Oct 2022 21:41:41 GMT', 'Server': 'ESF', 'Cache-Control': 'private', 'X-XSS-Protection': '0', 'X-Frame-Options': 'SAMEORIGIN', 'X-Content-Type-Options': 'nosniff', 'Alt-Svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"', 'Transfer-Encoding': 'chunked')>
debug: <StreamReader 127 bytes eof>
error: Unknown error occurred for google_to_nextcloud/google: 400, message='Bad Request', url=URL('https://www.googleapis.com/carddav/v1/principals/my_email@gmail.com/lists/default/2b724bfc-ee0d-4a04-8499-b8446bf831af.vcf')
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Google CardDAV documentation linked in the issue and trace the contact-insertion request that currently sends PUT to the shown URL. Confirm the required creation method and locate the relevant implementation and regression coverage, since no source file or test is named. Done means Google accepts a new contact without the reported 400 response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100