CommunityToolkit / CommunityToolkit/Maui

[BUG] Application crash when attempting to close popup

Open
#3,184 1 comment 0 reactions 0 assignees View on GitHub
bug unverified
Dominant language
C#
Stars
2.7k
Forks
500
Avg merge
2d 14h
Merged PRs (30d)
7

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Did you read the "Reporting a bug" section on Contributing file?

- [x] I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug

### Current Behavior

I am attempting to use the community toolkit popup as a busy dialog. The dialog is shown when a page loads for a certain duration of time until the page load is complete. The user does not interact with the popup and it is programmatically closed. When attempting to close the popup the application will crash.

### Expected Behavior

Application should not crash when calling Shell.Current.ClosePopupAsync();

### Steps To Reproduce

1. Create a new Maui application
2. Create a new page
3. Create button click event to navigate to the new page
4. During OnAppearing open a popup with a ViewModel
5. Wait a few seconds
6. Attempt to close the dialog
7. Launch the application on Android 16 and navigate to page with the dialog
8. Application will crash

See attached repo to reproduce issue

### Link to public reproduction project repository

https://github.com/jpcassano/ClosePopupIssue

### Environment

```markdown
- .NET MAUI CommunityToolkit:14.0.1
- Development OS: Windows 11 Pro 25H2
- Visual Studio: 2026 Version 18.4.3
- .NET: 10
- Android: 16
- Microsoft.Maui.Controls: 10.0.51
- CommunityToolkit.Mvvm: 8.4.2
```

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.