carddav2fb icon indicating copy to clipboard operation
carddav2fb copied to clipboard

Posteo download results in: [Sabre\VObject\ParseException] NULL" id MimeDir file. expected: "END:VCARD" got: "END:VCARD

Open gerdneuman opened this issue 2 years ago • 2 comments

I upgraded my Raspberry PI to a newer version. So I thought of migrating from the original jens-maus repo to this more maintained fork here, too.

However, I get this error with the fork:

$ php bin/carddav2fbneu/carddav2fb -vvv download test1.txt
Downloading vCard(s) from account my_posteo_user_name
    1 [->--------------------------] < 1 sec 6.0 MiB
In MimeDir.php line 182:
                                                                    
  [Sabre\VObject\ParseException]                                    
NULL"  id MimeDir file. expected: "END:VCARD" got: "END:VCARD
                                                                    

Exception trace:
  at /home/pi/bin/carddav2fbneu/vendor/sabre/vobject/lib/Parser/MimeDir.php:182
 Sabre\VObject\Parser\MimeDir->parseDocument() at /home/pi/bin/carddav2fbneu/vendor/sabre/vobject/lib/Parser/MimeDir.php:90
 Sabre\VObject\Parser\MimeDir->parse() at /home/pi/bin/carddav2fbneu/vendor/sabre/vobject/lib/Reader.php:47
 Sabre\VObject\Reader::read() at /home/pi/bin/carddav2fbneu/src/CardDav/Backend.php:198
 Andig\CardDav\Backend->getVcards() at /home/pi/bin/carddav2fbneu/src/functions.php:51
 Andig\download() at /home/pi/bin/carddav2fbneu/src/DownloadTrait.php:35
 Andig\DownloadCommand->downloadProvider() at /home/pi/bin/carddav2fbneu/src/DownloadTrait.php:70
 Andig\DownloadCommand->downloadAllProviders() at /home/pi/bin/carddav2fbneu/src/DownloadCommand.php:37
 Andig\DownloadCommand->execute() at /home/pi/bin/carddav2fbneu/vendor/symfony/console/Command/Command.php:298
 Symfony\Component\Console\Command\Command->run() at /home/pi/bin/carddav2fbneu/vendor/symfony/console/Application.php:1015
 Symfony\Component\Console\Application->doRunCommand() at /home/pi/bin/carddav2fbneu/vendor/symfony/console/Application.php:299
 Symfony\Component\Console\Application->doRun() at /home/pi/bin/carddav2fbneu/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at /home/pi/bin/carddav2fbneu/carddav2fb:20

download [-d|--dissolve] [-f|--filter] [-i|--image] [-l|--local [LOCAL]] [-c|--config CONFIG] [--] <filename>

My config looks like this:

// or server (is considered with the run and download command)
    'server' => [
        [
            'url' => 'https://posteo.de:8443/addressbooks/my_posteo_user_name/default/',
            'user' => 'my_posteo_user_name',
            'password' => 'xxx',
            'http' => [           // http client options are directly passed to Guzzle http client
                // 'verify' => false, // uncomment to disable certificate check
                // 'auth' => 'digest', // uncomment for digest auth
            ],
            // 'method' => 'PROPFIND';  // uncomment if 'REPORT' (default) causes an error (e.g. t-online)
        ],
    ],

I do not get the error with the original jens-maus repo - there retrieving the carddav file works.

Any ideas or workarounds? I googled the error and found e.g. https://github.com/nextcloud/server/issues/8827 though I do not know if its really related.

I think you are using https://github.com/sabre-io/vobject (but not sure) but could not find any bug report there. Maybe it is also a bug in posteo's implementation rather...

gerdneuman avatar Mar 19 '22 06:03 gerdneuman