ASP.NET CORE MVC + Brave = VS debug Crash after file select in file input


Developing with VS 2022 APS.NET Core MVC with Razor (with and without Docker) - Selecting a file for upload crashes VS debugging
How can this issue be reproduced?

  1. Start a new ASP.Net Core-Web-App MVC .Net 8.0 ContainerOS Linux project in VS 2022
  2. Add a razor file input or a simple HTML input:
<input asp-for="Image" type="file" class="form-control" accept="image/*" />
  1. Start debug
  2. Select an image
  3. Debugging crashes

Expected result:
No crash of VS debugging
Brave Version( check About Brave):
Version 1.66.118 Chromium: 125.0.6422.147 (Offizieller Build) (64-Bit)
Additional Information:
Developing with Windows 11 as host system. I am using docker, but have the crash with and without docker. First I thought would be a problem with my AntiForgeryToken, so I tried different approaches, ended up saving it in my MongoDB, but didn’t solve the problem. VS debugging crashes without any stacktrace. I just get:
Code 4294967295 (0xffffffff). Same on two different machines. After 10 hours trial end error I tried Edge and worked like it should, no crash. Same with Firefox. I have really no idea, why selecting a file with Brave during VS debugging crashes the debug session. The application is not in prod right now, still in dev. Also no console log or anything else in in dev-tools. Do you guys have any idea what’s going on? What kind of mechanism after selecting a file in a HTML file input can cause a VS debug session to crash?

Oh, just found this

So it could be a VS issue or a Brave issue. Closing the filepicker in Brave let VS think the Browser was closed. Really strange. Will report it to the VS team. But maybe you guys could also check why this happens and the differences in the closing event are in the brave browser compared to others. At least it seems it should be no problem in production.

Edit: Posted this also to the VS community