[regression/7.0.0] Connectivity.ConnectivityChanged Event throws exception at network change #15843
Labels
area-essentials
Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info
fixed-in-8.0.7
fixed-in-9.0.100-preview.1.9973
i/regression
This issue described a confirmed regression on a currently supported version
p/1
Work that is important, and has been scheduled for release in this or an upcoming sprint
partner/cat 😻
this is an issue that impacts one of our partners or a customer our advisory team is engaged with
platform/windows 🪟
t/bug
Something isn't working
Milestone
Description
This exception is thrown at network connection change after I subscribe to Connectivity.ConnectivityChanged event
"The application called an interface that was marshalled for a different thread. (0x8001010E (RPC_E_WRONG_THREAD))"
Steps to Reproduce
Connectivity.ConnectivityChanged += (sender, e) => { // never reach this point };
"The application called an interface that was marshalled for a different thread. (0x8001010E (RPC_E_WRONG_THREAD))"
In Release mode it seems the only problem is if the event never get called.
If I change Windows target framework to .NET 6.0, event is called and it seems fine, but exception message is there
It works fine on Android.
Link to public reproduction project repository
https://github.com/mrherkar/MauiAppWithConnectivityChangedIssue
Version with bug
7.0.86
Last version that worked well
6.0
Affected platforms
Windows
Affected platform versions
Windows SDK 10.0.19041.0
Did you find any workaround?
no
Relevant log output
The text was updated successfully, but these errors were encountered: