Repository navigation
Closed
Labels
i/regressionThis issue described a confirmed regression on a currently supported versionp/0Current heighest priority issues that we are targeting for a release.platform/androidregressed-in-10-rc1s/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working
Milestone
Description
Description
Android application created with NET MAUI 10 (latest release - Long Term Support)
Tested in Emulator API 36
With the MainPage on screen, clicking the Back button passes though an unhandled exception before closing the app.
Steps to Reproduce
- Create an application NET MAUI 10.0
- Capture lifecycle events
- Start Android emulator, API 36
- Run the application
- Click the Back button
Expected result: the application quits
Actual result: Unhandled exception ‘Android.Runtime.JavaProxyThrowable’ showing for a few seconds, then the app quits
Link to public reproduction project repository
No response
Version with bug
10.0.10
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
9.0.120 SR12
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
NO workaround. Albeit the issue does not in fact affect the application, it is a symptom of something wrong.
Relevant log output
Output after clicking the Back button:
Back button pressed in MainPage
Android Lifecycle event: OnBackPressed
Android Lifecycle event: OnPause
11-13 19:02:13.016 D/VRI[MainActivity]( 7075): visibilityChanged oldVisibility=true newVisibility=false
11-13 19:02:13.139 D/AndroidRuntime( 7075): Shutting down VM
11-13 19:02:13.141 E/AndroidRuntime( 7075): FATAL EXCEPTION: main
11-13 19:02:13.141 E/AndroidRuntime( 7075): Process: com.companyname.lifecycle, PID: 7075
11-13 19:02:13.141 E/AndroidRuntime( 7075): android.runtime.JavaProxyThrowable: [System.ObjectDisposedException]: Cannot access a disposed object.
11-13 19:02:13.141 E/AndroidRuntime( 7075): Object name: 'IServiceProvider'.
11-13 19:02:13.141 E/AndroidRuntime( 7075): at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException + 0x0(Unknown Source)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService + 0x8(Unknown Source)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at Microsoft.Maui.MauiContext+WrappedServiceProvider.GetService(/_/src/Core/src/MauiContext.cs:87)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at Microsoft.Maui.MauiContext+WrappedServiceProvider.GetService(/_/src/Core/src/MauiContext.cs:87)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService + 0x28(Unknown Source)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService + 0xb(Unknown Source)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at Microsoft.Maui.MauiContextExtensions.GetDispatcher(/_/src/Core/src/MauiContextExtensions.cs:33)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at Microsoft.Maui.Controls.Platform.Compatibility.ShellFragmentContainer.OnDestroy(/_/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFragmentContainer.cs:43)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at AndroidX.Fragment.App.Fragment.n_OnDestroy(C:\a\_work\1\s\generated\androidx.fragment.fragment\obj\Release
et10.0-android\generated\src\AndroidX.Fragment.App.Fragment.cs:2465)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw + 0x11(Unknown Source)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod + 0x86(Unknown Source)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod + 0x65(Unknown Source)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at Android.App.Activity.OnDestroy + 0x0(Unknown Source)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at Microsoft.Maui.MauiAppCompatActivity.OnDestroy(/_/src/Core/src/Platform/Android/MauiAppCompatActivity.cs:37)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at Android.App.Activity.n_OnDestroy + 0xe(Unknown Source)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at crc6488302ad6e9e4df1a.MauiAppCompatActivity.n_onDestroy(Native Method)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at crc6488302ad6e9e4df1a.MauiAppCompatActivity.onDestroy(MauiAppCompatActivity.java:59)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at android.app.Activity.performDestroy(Activity.java:9460)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1556)
OnSleep
Android Lifecycle event: OnStop
Android Lifecycle event: OnDestroy
An unhandled exception of type 'Android.Runtime.JavaProxyThrowable' occurred in Mono.Android.Runtime.dll
11-13 19:02:13.141 E/AndroidRuntime( 7075): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:6256)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:6301)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:52)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:63)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at android.app.servertransaction.TransactionExecutor.executeLifecycleItem(TransactionExecutor.java:169)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:101)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:80)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2823)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at android.os.Handler.dispatchMessage(Handler.java:110)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at android.os.Looper.loopOnce(Looper.java:248)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at android.os.Looper.loop(Looper.java:338)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at android.app.ActivityThread.main(ActivityThread.java:9067)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at java.lang.reflect.Method.invoke(Native Method)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
11-13 19:02:13.141 E/AndroidRuntime( 7075): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:932)
An error occurred in the vsdbg debug session of project 'C:\Users\Coding\source\repos\TestMaui10\Lifecycle\Lifecycle.csproj': An unhandled exception of type 'Android.Runtime.JavaProxyThrowable' occurred in Mono.Android.Runtime.dll
11-13 19:02:17.621 W/monodroid-assembly( 7075): Shared library 'liblog' not loaded, p/invoke '__android_log_print' may fail
11-13 19:02:17.621 I/MonoDroid( 7075): UNHANDLED EXCEPTION:
11-13 19:02:17.621 I/MonoDroid( 7075): Android.Runtime.JavaProxyThrowable: Exception of type 'Android.Runtime.JavaProxyThrowable' was thrown.
11-13 19:02:17.622 I/MonoDroid( 7075):
11-13 19:02:17.622 I/MonoDroid( 7075): --- End of managed Android.Runtime.JavaProxyThrowable stack trace ---
11-13 19:02:17.622 I/MonoDroid( 7075): android.runtime.JavaProxyThrowable
11-13 19:02:17.622 I/MonoDroid( 7075):
The program 'Lifecycle.dll' has exited with code 0 (0x0).
11-13 19:02:17.646 I/Process ( 7075): Sending signal. PID: 7075 SIG: 9
The vsdbg debug session for project 'C:\Users\Coding\source\repos\TestMaui10\Lifecycle\Lifecycle.csproj' has been stoppedReacted by DevDachi
Metadata
Metadata
Assignees
Labels
i/regressionThis issue described a confirmed regression on a currently supported versionp/0Current heighest priority issues that we are targeting for a release.platform/androidregressed-in-10-rc1s/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working
Type
Projects
- StatusShow more project fieldsDone
Activity
Ahamed-Ali commentedon Nov 14, 2025
This issue has been validated in Visual Studio Code 1.105.1 with MAUI versions 10.0.0 Preview 1, 10.0.0-preview7,10.0.0-rc1, 10.0.0-rc2 and 10.0.10 . It can be reproduced on Android platform from 10.0.0-rc1 versions
MauiApp13.zip
sheharyarshahid commentedon Nov 14, 2025
I'm getting the following exception when on app startup for Android. It used to work fine in 9.0.120.
Current Version: 10.0.10
39 remaining items
kubaflo commentedon Jan 28, 2026
Hi! could you please test #33720?
It would be super helpful if you could confirm whether the fix works in your apps.
Thanks a lot!
FleoRDI commentedon Jan 29, 2026
@kubaflo Hello, sorry, but i don't think that applies to me as my app doens't even open up, so i can't even know if it does that when backbutton is pressed, i also went from .net9 to 10 before having that issue, it's the same issue sheharyarshahid first mentioned, not the one coming from the backbutton's event.
brzezinol commentedon Feb 12, 2026
@kubaflo
I think it still not work.
Code below causes crash.
Edit
after
dotnet workloads updateit seems to work properly.kubaflo commentedon Oct 18, 2026
Fixed here #32647