CommunityToolkit / CommunityToolkit/Maui

[BUG] Using Community.Toolkit.MAUI version 13.0.0 crashed MAUI app on iOS when Microsoft.Azure.Devices nuget is used in app

Open
#2,966 4 comments 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

Our MAUI project targets .NET 10 GA. We are currently using Community.Toolkit.MAUI version 9.0.3 . It works fine on iOS. When we upgrade the version to 13.0.0 (.NET 10 compatible as per the release notes of this version) app crashes on iOS with exception: error: Failed to load AOT module 'DotNetty.Buffers' while running in aot-only mode because a dependency cannot be found or it is out of date.
"
We use other packages like Microsoft.Azure.Devices, Microsoft.Azure.Devices.Client etc for communication with Azure.
It seems like the exception above coming from "DotNetty.Buffers" which is a transistive dependency of one of these 2 packages. Not sure why upgrading community.toolkit.MAUI to latest version causes crash due to these packages.

### Expected Behavior

App should not crash on iOS with 13.0.0 version of community.toolkit.MAUI.

### Steps To Reproduce

1. Open the solution from reproduction reposity and run it on iOS device.
2. Observe app crashing on launch.

### Link to public reproduction project repository

https://github.com/Ratnapriya/SampleMCTCrash

### Environment

```markdown
- .NET MAUI CommunityToolkit: 13.0.0
- OS: iOS 18.0
- .NET MAUI:10.0.10
```

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the linked SampleMCTCrash reproduction project and run it on an iOS device using .NET MAUI CommunityToolkit 13.0.0, then inspect the launch failure involving DotNetty.Buffers. Compare the working 9.0.3 setup with 13.0.0 and the Microsoft.Azure.Devices packages. Done means the reproduced app launches on iOS without the AOT loading crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp, ios
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.