Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

[#6542] Applying BotMessageSerializerSettings.MaxDepth doesn't seem to work#6546

Merged
tracyboehrer merged 2 commits into
mainfrom
southworks/fix/maxdepth-missing-settings
Nov 10, 2022
Merged

[#6542] Applying BotMessageSerializerSettings.MaxDepth doesn't seem to work#6546
tracyboehrer merged 2 commits into
mainfrom
southworks/fix/maxdepth-missing-settings

Conversation

@ceciliaavila
Copy link
Copy Markdown
Collaborator

Fixes #6542

Description

This PR sets the MaxDepth property as null in the MemoryStorage class' JsonSerializer to avoid the "The reader’s MaxDepth of 64 has been exceeded" error.
It also sets the property in other classes, with a similar implementation, that were skipped in the original issue.

Specific Changes

  • Set MaxDepth property to null in the serializer used in the following classes:
  • MemoryStorage
  • BlobStorage
  • BlobTranscriptStore
  • AzureBlobStorage
  • AzureBlobTranscriptStore
  • TextEntityRecognizer
  • ProtocolMessage
  • OAuthClient
  • SlackHelper

Testing

Here we can see a bot with a dialogs loop failing in loop 10 and after the fix, working as expected in loop 11.
image

@ceciliaavila ceciliaavila added the Automation: No parity PR does not need to be applied to other languages. label Nov 10, 2022
@ceciliaavila ceciliaavila requested a review from a team as a code owner November 10, 2022 13:07
@coveralls
Copy link
Copy Markdown
Collaborator

Pull Request Test Coverage Report for Build 328759

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 4 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.002%) to 79.023%

Files with Coverage Reduction New Missed Lines %
/libraries/Microsoft.Bot.Builder/MemoryStorage.cs 4 92.0%
Totals Coverage Status
Change from base Build 328040: 0.002%
Covered Lines: 25602
Relevant Lines: 32398

💛 - Coveralls

@BruceHaley
Copy link
Copy Markdown
Contributor

✔️ No Binary Compatibility issues for Microsoft.Bot.Builder.dll
✔️ No Binary Compatibility issues for Microsoft.Bot.Builder.Azure.dll
✔️ No Binary Compatibility issues for Microsoft.Bot.Connector.dll

@tracyboehrer tracyboehrer merged commit a522b4b into main Nov 10, 2022
@tracyboehrer tracyboehrer deleted the southworks/fix/maxdepth-missing-settings branch November 10, 2022 16:10
@462sai
Copy link
Copy Markdown

462sai commented Nov 22, 2022

Hi @ceciliaavila

Could you please confirm this fix is released? if yes please confirm the botbuilder version

Regards,
Sai.

This was referenced May 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Automation: No parity PR does not need to be applied to other languages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

applying BotMessageSerializerSettings.MaxDepth doesn't seem to work

5 participants