MAUI Blazor for Windows - Remote Debugging: "ERR_ADDRESS_INVALID"
See original GitHub issueDescription
I’m trying to Debug a MAUI Blazor App for Windows only on a Remote machine. I have added on launchSettings.json
a new profile to Deploy and Debug on another device, using Visual Studio 2022 Remote Debugger.
The app is deployed to the remote device successfully and after the app opens the BlazorWebView doesn’t work with the error “ERR_ADDRESS_INVALID”:
Remote Debugging with the template of MAUI Project with no Blazor works perfectly well.
Unfortunately on the Debug Output there are no errors or exceptions when executing, so i have no clue as to what is happening because when i execute using my local machine, it works normally. I have tried with 2 different devices, running Windows 11 x64 and both had the same issue, but when i publish the application for Windows following Publish a .NET MAUI app for Windows and install on the device that i was trying to Remote Debug, the application works normally, the issue appears to be just when the application is deployed from Visual Studio.
For this project that i’m working on, i really need to Debug our application using a Remote Device, so without this possibility it becomes time consuming, because i have to publish the application, copy and paste to another device, install and analyse the logs generated.
Steps to Reproduce
Visual Studio 2022 17.4.0 Preview 1.0
- Create a project with the Blazor MAUI Template
- Remove all the TargetFrameworks tags from .csproj and keep just the net6.0-windows10.0.19041.0
- On lauch
launchSettings.json
, add a new profile to deploy to a remote device Example:
{
"profiles": {
"Windows Machine": {
"commandName": "MsixPackage",
"nativeDebugging": false
},
"Windows Remote": {
"commandName": "MsixPackage",
"nativeDebugging": false,
"remoteDebugEnabled": true,
"remoteDebugMachine": "192.168.137.1",
"authenticationMode": "None"
}
}
}
- On the another device (Running Windows 11 21H2 x64), start the Visual Studio 2022 Remote Debugger (usually i’m using without Authentication)
- Start Debugging from Visual Studio 2022 using the Remote Profile
- The app should be deployed and opened on the remote Device
- The BlazorWebView component doesn’t work
Version with bug
6.0.400
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
windows10.0.19041.0
Did you find any workaround?
No response
Relevant log output
No logs found for this issue.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:5 (1 by maintainers)
In our case, it’s because we are developing an application for Windows devices that have Mobile Broadband Radio capabilities with SIM Card or eSIM, to make use of Mobile Broadband API. The app targets multiple types of devices (x64 and ARM64) and phone carriers, since it differs based on the carrier as well. The possibility to remote debug is to easily use your main company computer that have access to corporate network and git repository to develop and debug on multiple devices with ease, otherwise we would need to install Visual Studio on every machine and always copy the code to debug, and we need to debug with low-end devices with limited RAM for example, running Visual Studio would be difficult. Thanks!
Since our project is just for Windows, i decided to try the Blazor App inside a dotnet 6.0 WPF Project with a Windows Application Packaging Project for side-loading. By following this Tutorial Build a Windows Presentation Foundation (WPF) Blazor app, which uses the nuget package
Microsoft.AspNetCore.Components.WebView.Wpf
. And i found that deploying the App from Visual Studio to Debug on a Remote machine, the BlazorWebView component on MainWindow.xaml works perfectly well! Unfortunately i could not make the BlazorWebView to work on the MAUI project on Remote debugging. For now we are going to use WPF.