EstebanMonge / kanboard_imap_tasks

Create Tasks from IMAP account
14 stars 7 forks source link

InvalidJSONFormatException #1

Closed dm-coding closed 7 years ago

dm-coding commented 7 years ago

Hi there,

We are getting an invalid JSON format exception when we run the cron task.

`[07-Dec-2016 14:49:40 UTC] PHP Fatal error: Uncaught JsonRPC\Exception\InvalidJsonFormatException: Malformed payload in /var/www/app/plugins/Imap/vendor/fguillot/json-rpc/src/JsonRPC/Validator/JsonFormatValidator.php:26 Stack trace:

0 /var/www/app/plugins/Imap/vendor/fguillot/json-rpc/src/JsonRPC/Response/ResponseParser.php(86): JsonRPC\Validator\JsonFormatValidator::validate(NULL)

1 /var/www/app/plugins/Imap/vendor/fguillot/json-rpc/src/JsonRPC/Client.php(192): JsonRPC\Response\ResponseParser->parse()

2 /var/www/app/plugins/Imap/vendor/fguillot/json-rpc/src/JsonRPC/Client.php(176): JsonRPC\Client->sendPayload('{"jsonrpc":"2.0...')

3 /var/www/app/plugins/Imap/cron.php(49): JsonRPC\Client->execute('getAllProjects')

4 {main}

thrown in /var/www/app/plugins/Imap/vendor/fguillot/json-rpc/src/JsonRPC/Validator/JsonFormatValidator.php on line 26`

tasks

EstebanMonge commented 7 years ago

I know about this error is related with characters in mail body or subject. I need work in correct it.\

Can you try fetch email without special characters? Are you sending from with some email client?

EstebanMonge commented 7 years ago

I resolved this issue with a complete rewrite and utilization of this library https://github.com/tedious/Fetch