ComponentDialog::BuildDialogState throws NullReferenceException
See original GitHub issueVersion
SDK 4.19 .NET 7
Describe the bug
BuildDialogState throws NullReferenceException (in line if (state.DialogStack == null)
Dialog isn’t properly restored in line state = instance.State[PersistedDialogState] as DialogState;
, although instance
object is set properly, and State seems to be proper JObject. It looks like deserialization goes wrong. Issue appears only after upgrade to 4.19, on 4.18.1 no exception is thrown.
To Reproduce
In my bot:
- Conversation is initiated
- First dialogstack is built
- Response to user is sent.
- User sends message
- On rebuilding stack exception is thrown
Expected behavior
DialogState is properly rebuilt
Issue Analytics
- State:
- Created 8 months ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Initialize Component throws a null reference exception
This works fine on my system but the Initialize Component throws a null reference exception when deployed on a colleagues system.
Read more >[SOLVED] GetGomponent throws NullReferenceException ...
In the standalone build, GetComponent() returns null, has a little hissy fit and throws a NullReferenceException, and execution stops before it ...
Read more >NullReferenceException when passing dialog name as ...
Describe the bug. When trying to start a dialog passing its name as a variable to Microsoft.BeginDialog , SDK throws a NullReferenceException ....
Read more >Blazor HotReload throws `System.NullReferenceException ...
When using the serilog browser-console sink, the application throws System.NullReferenceException . The author of the library already tried ...
Read more >media library - MediaManager throwing null error
It looks like you have a field ImageField imageItem but imageItem.MediaItem is null . It's either not selected or the media item is...
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
Fix merged, will be live in the next patch release.
Thank you both for that information. I will attempt to repro with Cosmos for state.