Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MessagingCenter in multiple windows scenario throw System.InvalidOperationException: 'A response has already been issued for the current message.' #815

Open
1 of 4 tasks
jingliancui opened this issue Dec 23, 2023 · 0 comments
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior

Comments

@jingliancui
Copy link

Describe the bug

Message will be occurred twice.
Lead exception thrown.

Regression

No response

Steps to reproduce

https://github.com/jingliancui/MAUIMessagingIssue
Open sln file using vs 2022.
f5 to run the app.
click "OpenNewWin" button on the main window
click "OpenNewWin" button on the main window
click "Do Delete" button on one of the second window
click "yes" on one of the second window
click "yes" on another of the second window
exception thorwn:
System.InvalidOperationException: 'A response has already been issued for the current message.'

Expected behavior

Message occurred should be under controlled.

Screenshots

No response

IDE and version

VS 2022

IDE version

No response

Nuget packages

  • CommunityToolkit.Common
  • CommunityToolkit.Diagnostics
  • CommunityToolkit.HighPerformance
  • CommunityToolkit.Mvvm (aka MVVM Toolkit)

Nuget package version(s)

8

Additional context

Workaround:

1.add a id something like guid stuff in viewmodel
2.determine the id from where, than go to control the receiver's action.

Help us help you

Yes, but only if others can assist

@jingliancui jingliancui added the bug 🐛 An unexpected issue that highlights incorrect behavior label Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior
Projects
None yet
Development

No branches or pull requests

1 participant