[Bug] MAUI App Crashes/Freezes on Debugging (iOS & Android) with Real Device #27204
Labels
platform/android 🤖
platform/iOS 🍎
platform/macOS 🍏
macOS / Mac Catalyst
potential-regression
This issue described a possible regression on a currently supported version., verification pending
s/needs-attention
Issue has more information and needs another look
t/bug
Something isn't working
Description
When running a .NET MAUI app on a real iOS or Android device using Visual Studio Code in debug mode, the app runs successfully only after following a strict sequence:
Delete bin and obj folders
Perform a clean build
Restore dependencies
Rebuild the project
Delete the app from the device
Deploy and run the app
However, when attempting to re-run the app without repeating the above steps, the application either crashes on startup or freezes. This forces me to repeat the entire cycle again.
Steps to Reproduce
Expected Behavior
The app should run consistently in debug mode without requiring a full clean-up and rebuild every time.
Actual Behavior
The app crashes or freezes unless the cleanup steps are performed before every debug session.
Additional Information
.NET MAUI Version: [Provide your MAUI version]
Visual Studio Code Version: [Provide VS Code version]
Operating System: [Windows/macOS + version]
Target Devices: [iOS version / Android version & model]
Any Exception Logs?: [Attach logs if available]
Link to public reproduction project repository
No response
Version with bug
9.0.14 SR1.4
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.90 SR9
Affected platforms
iOS, Android, macOS
Affected platform versions
iOS 15.8, iOS 18, Android 10
Did you find any workaround?
The workaround is going through that annoying cycle
Relevant log output
You may only use the Microsoft Visual Studio .NET/C/C++ Debugger (vsdbg) with
Visual Studio Code, Visual Studio or Visual Studio for Mac software to help you
develop and test your applications.
The program 'App.Client.Maui.dll' has exited with code 0 (0x0).
[rom.arcrom] Late-enabling -Xcheck:jni
[rom.arcrom] Unquickening 22 vdex files!
[rom.arcrom] The ClassLoaderContext is a special shared library.
[LoadedApk] LoadedApk::makeApplication() appContext=android.app.ContextImpl@c5c149e appContext.mOpPackageName=com.mypackage appContext.mBasePackageName=com.mypackage appContext.mPackageInfo=android.app.LoadedApk@1b11b7f
2
[NetworkSecurityConfig] No Network Security Config specified, using platform default
[DOTNET] AndroidCryptoNative_InitLibraryOnLoad: jint AndroidCryptoNative_InitLibraryOnLoad(JavaVM *, void *) in /__w/1/s/src/native/libs/System.Security.Cryptography.Native.Android/pal_jni.c
[DOTNET] GetOptionalClassGRef: optional class com/android/org/conscrypt/OpenSSLEngineImpl was not found
[monodroid] Failed to create directory '/data/user/0/com.mypackage/files/.override/armeabi-v7a'. File exists
[monodroid] Creating public update directory:
/data/user/0/com.mypackage/files/.__override__/armeabi-v7a
[rom.arcrom] Attempt to remove non-JNI local reference, dumping thread
[monodroid-debug] Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:51507,server=y,embedding=1,timeout=-459748843
The text was updated successfully, but these errors were encountered: