Errorcode=529 JSONObject isDeliveryReceiptRequested is not a boolean

Hi,

I am using the graphClient for java and when calling fetchMessage(id), I am receiving the following error:

error=ErrorModel [errorCode=529, errorMessage=Process InboundEMail Exception. Details: Exception while process message with uuId: {removed_uuid}=, exception: JSONObject[“isDeliveryReceiptRequested”] is not a Boolean…]

So, my code cannot process the email. Can you please help me understand what might be wrong here. Here is basically what my code is doing

GraphMessageInfoCollection messages = eslGraphClient.listMessages();
if (messages != null) {
for (GraphMessageInfo messageInfo : messages) {
// Exception occurs on this fetchMessage call for the email I am processing
MapiMessage message = eslGraphClient.fetchMessage(messageInfo.getItemId())

@mlittle4444

I suggest you to please download the examples for Graph client from this link. If you still find issue, please share the account credentials that we may use on our end to verify and resolve the issue.

From using postman without any application code, I can see the json value of null being returned for isDeliveryReceiptRequested, possibly a null check is needed in your code as msgraph is not returning a boolean value. I am using the sample code in my application already, I am trying to further create the smallest possible java app with your sample and will continue on that effort, but seeing this null value and the exception seems like a pretty big clue, so I would appreciate if you could give me your opinion on if you think it could be your code.

  "isDeliveryReceiptRequested": null,

https://graph.microsoft.com/v1.0/users/{id | principalName}/mailFolders/inbox/messages

Here is the stack trace, we are using 20.9 version of aspose-email. aspose-email:aspose-email:20.9

0 = {StackTraceElement@14226} “com.aspose.email.internal.hw.zc.a(SourceFile:2589)”
1 = {StackTraceElement@14227} “com.aspose.email.internal.hw.zc.b(SourceFile:623)”
2 = {StackTraceElement@14228} “com.aspose.email.GraphMessageInfo.a(SourceFile:422)”
3 = {StackTraceElement@14229} “com.aspose.email.zyj.b(SourceFile:83)”
4 = {StackTraceElement@14230} “com.aspose.email.zxu.a(SourceFile:173)”
5 = {StackTraceElement@14231} “com.aspose.email.zxu.n(SourceFile:63)”
6 = {StackTraceElement@14232} “com.aspose.email.zxv.fetchMessage(SourceFile:235)”
7 = {StackTraceElement@14233} “{removed}.fetchMessage(EslGraphClient.java:79)"

@mlittle4444

Please provide the working sample app that we may try on our end and log the issue for further investigation and resolution on our end.

Here is the sample. A basic spring boot web app. demo.zip (111.2 KB)

@mlittle4444

I have created an issue with ID EMAILJAVA-34788 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

We have the same issue.
It looks like it only affects some emails (2 out of 10 test mails) and I can also reproduce it with the latest version 21.1.

@fxhak

We will share updates with you as soon as the issue will be addressed.

@fxhak
@mlittle4444

We have made a special hotfix for the stated issue. Can you please try using the hotfix share over following link and provide your feedback.

Aspose.Email for Java 21.1.2

The hotfix resolved the problem with handling null value of isDeliveryReceiptedRequested. I am no longer getting the exception and able to process the email. Thank you. Please let me know when you estimate making it available.

@mlittle4444

Thank you for sharing the feedback. We will try to make that a part of upcoming release.

@fxhak
Can you please share your feedback too.

I can confirm that the hotfix solved this problem.
Thanks for the fast reaction!

@fxhak

Thank you for the feedback. We will make it part of upcoming product release.

Thanks. Do you have a estimated date(even rough) for the next product release?

@mlittle4444

The next release will be shared in-line by end of February 2021.

The issues you have found earlier (filed as EMAILJAVA-34788) have been fixed in this update.