Cannot deserialize instance of `java.lang.String` out of START_OBJECT token

Messaging service

After a year of usage my code I see many errors in production after the date 26.6.

Error: Wrong json format: Cannot deserialize instance of `java.lang.String` out of START_OBJECT token
 at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: com.backendless.services.mail.SendTemplateMailMessage["template-values"]->java.util.LinkedHashMap["customer"])

Application ID

3551EF8F-C241-7579-FF0D-45ECE827AF00

Expected Behavior

Should not cause an error. it should send a message from template.

Actual Behavior

Email from template is not sent.

Reproducible Test Case

Template: Order Template

Used variables JSON for template:
{"orderId":2021070105,"hostname":"localhost","customer":{"company":{"name":"","id":"","vat":""},"address":{"street":"","city":"","zip":0,"country":"Česká republika"},"firstname":"Martin","lastname":"Testuje","phone":"776 837 524","email":"info@inspirell.cz"},"store.name":"podle doporučení výrobce","store.address":"zatím neurčeno, 69632 Ždánice","customer.name":"Martin Testuje","customer.address":", 0 , Česká republika","customer.phone":"776 837 524","customer.email":"info@inspirell.cz","orderTable":"<style type=\"text/css\">\n.tg {border-collapse:collapse;border-color:#ccc;border-spacing:0;}\n.tg td{background-color:#fff;border-color:#ccc;border-style:solid;border-width:1px;color:#333;\n font-family:Arial, sans-serif;font-size:14px;overflow:hidden;padding:10px 5px;word-break:normal;}\n.tg th{background-color:#f0f0f0;border-color:#ccc;border-style:solid;border-width:1px;color:#333;\n font-family:Arial, sans-serif;font-size:14px;font-weight:normal;overflow:hidden;padding:10px 5px;word-break:normal;}\n.tg .tg-h9jn{background-color:#ffffff;border-color:#9b9b9b;text-align:center;vertical-align:top}\n.tg .tg-2fdn{border-color:#9b9b9b;text-align:left;vertical-align:top}\n.tg .tg-o40d{border-color:#9b9b9b;text-align:center;vertical-align:top}\n.tg .tg-n27u{border-color:#9b9b9b;text-align:right;vertical-align:top}\n.tg .tg-g5p9{background-color:#f9f9f9;border-color:#9b9b9b;font-weight:bold;text-align:center;vertical-align:top}\n.tg .tg-m1ee{background-color:#f9f9f9;border-color:#9b9b9b;text-align:center;vertical-align:bottom}\n@media screen and (max-width: 767px) {.tg {width: auto !important;}.tg col {width: auto !important;}.tg-wrap {overflow-x: auto;-webkit-overflow-scrolling: touch;}}</style><div class=\"tg-wrap\"><table class=\"tg\" style=\"undefined;table-layout: fixed; width: 1025px\">\n<colgroup>\n<col style=\"width: 500px\">\n<col style=\"width: 60px\">\n<col style=\"width: 70px\">\n<col style=\"width: 70px\">\n</colgroup>\n<thead>\n <tr>\n <th class=\"tg-o40d\">Název</th>\n <th class=\"tg-o40d\">Množství</th>\n <th class=\"tg-o40d\">Cena</th>\n <th class=\"tg-o40d\">Celkem</th>\n </tr>\n</thead>\n<tbody><tr>\n <td class=\"tg-2fdn\"> Tištěný katalog nábytku BMB, Tištěný katalog (obj. kód: KTLG)</td>\n <td class=\"tg-h9jn\">1</td>\n <td class=\"tg-o40d\">0 Kč </td>\n <td class=\"tg-m1ee\">0 Kč</td>\n </tr> <tr>\n <td class=\"tg-n27u\" colspan=\"3\">Suma</td>\n <td class=\"tg-g5p9\">0 Kč</td>\n </tr>\n</tbody>\n</table></div>","vopUrl":"http://localhost:4200/public/00000000/obchodni_podminky.pdf"}

Hello @Martin_Krajcir1,

thank you for reporting this issue!
I have created an internal ticket in order to resolve it asap.
You may reference it by its internal ID - BKNDLSS-25874.

BTW thanks for following the bug report template, it makes our work much easier and faster!

Regards,
Stanislaw

Guys, this is realy f**kup :frowning: I hope you fix it soon, because my customers are going to kill me if they don’t have notification for orders :see_no_evil:

PS: I realy like you template feature, it’s cool idea :+1:

I found a workaround to my solution, so I am safe now.

1 Like

Glad you’ve found a workaround, but anyway your issue in progress already

Regards,
Stanislaw

Hello @Martin_Krajcir1

Previously, we allowed for email templates to pass template-values, which could be like:

{"customer": {"company": "company1"}, "customer.name": "name1"}

but we only used customer.name anyway.

A change has been made that reads the request more strictly and allowed pass template-values, only which could be like:

{"customer.name": "name1"}
1 Like