Cosmos DB Throws "Unable to cast object of type 'System.Int64' to type 'System.Int32'" when Calling ContinueDialogAsync
See original GitHub issueGithub issues should be used for bugs and feature requests. Use Stack Overflow for general “how-to” questions.
Version
Microsoft.Bot.Builder v4.4.0
Describe the bug
When executing line
await dialogContext.ContinueDialogAsync(cancellationToken)
System.InvalidCastException is thrown with details “Unable to cast object of type ‘System.Int64’ to type ‘System.Int32’”
To Reproduce
Steps to reproduce the behavior: Using CosmosDB storage Execute the first message, works fine Upon the second message, calling ContinueDialogAsync(…) fails
Expected behavior
Give a clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Using MemoryStorage does not have this problem Works fine in version 4.3.0
[bug]
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
.net - C#: Unable to cast object of type 'System.Int64' ...
When I convert the Color to an int, I get the following exception: System.InvalidCastException: Unable to cast object of type 'System.Int64' to ...
Read more >System.InvalidCastException: Unable to cast object of type ...
HI, I received this message : System.InvalidCastException: Unable to cast object of type 'System.Int64' to type 'System.Int32'.
Read more >[Solved] C# Error: Unable to cast object of type 'System.Int64 ...
This error mostly accure due to SQL bigint is the equivalent to .NET long, GetInt64 returns a long, while GetInt32 returns an int....
Read more >Troubleshoot an application using the Azure Cosmos DB ...
The first thing to notice in this new code, is that on the catch we're capturing an exception of type CosmosException class. This...
Read more >Getting Started with the Microsoft Azure Cosmos Database ...
Microsoft Azure Cosmos DB operation - The operation represents an action against a specific record type. You can create one or more operations, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
we’re cutting a 4.4.1 release of the C# SDK to address this issue.
https://github.com/Microsoft/botbuilder-dotnet/blob/master/libraries/Microsoft.Bot.Builder.Dialogs/WaterfallDialog.cs#L112