Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET 9 template app with sample content cannot start on Android 14 #9952

Open
janseris opened this issue Mar 22, 2025 · 0 comments
Open

.NET 9 template app with sample content cannot start on Android 14 #9952

janseris opened this issue Mar 22, 2025 · 0 comments
Labels
needs-triage Issues that need to be assigned. t/bug

Comments

@janseris
Copy link

janseris commented Mar 22, 2025

Description

The only output from Debug which I get is:

> am start -D -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "com.companyname.net9maui/crc64857f384c33df677d.MainActivity"> Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.companyname.net9maui/crc64857f384c33df677d.MainActivity }
> warning: Could not connect Jdwp. System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> Mono.AndroidTools.AdbException: closed
   at Mono.AndroidTools.Util.AggregateAsyncResult.CheckError(CancellationToken token) in D:\a\_work\1\s\External\androidtools\Mono.AndroidTools\Util\AggregateAsyncResult.cs:line 72
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
   --- End of inner exception stack trace ---
   at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass66_0.<RunShellCommand>b__1(Task t) in D:\a\_work\1\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:line 410
   at System.Threading.Tasks.ContinuationResultTaskFromTask`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
   at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass63_0.<RunShellCommand>b__0(Task t) in D:\a\_work\1\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:line 376
   at System.Threading.Tasks.ContinuationResultTaskFromTask`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass82_0.<GetProcessId>b__0(Task`1 t) in D:\a\_work\1\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:line 592
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Mono.AndroidTools.AndroidDevice.<GetProcessId>d__81.MoveNext() in D:\a\_work\1\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:line 558
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at AndroidDeviceExtensions.<GetProcessIDAsync>d__9.MoveNext() in D:\a\_work\1\s\External\androidtools\Xamarin.AndroidTools\Devices\AndroidDeviceExtensions.cs:line 155
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Xamarin.AndroidTools.Debugging.DebuggingExtensions.<ConnectJdwpAsync>d__8.MoveNext() in D:\a\_work\1\s\External\androidtools\Xamarin.AndroidTools\Debugging\DebuggingExtensions.cs:line 179
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Xamarin.AndroidTools.Debugging.DebuggingExtensions.<StartWithDebuggingAsync>d__2.MoveNext() in D:\a\_work\1\s\External\androidtools\Xamarin.AndroidTools\Debugging\DebuggingExtensions.cs:line 63
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> Mono.AndroidTools.AdbException: closed
   at Mono.AndroidTools.Util.AggregateAsyncResult.CheckError(CancellationToken token) in D:\a\_work\1\s\External\androidtools\Mono.AndroidTools\Util\AggregateAsyncResult.cs:line 72
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
   --- End of inner exception stack trace ---
   at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass66_0.<RunShellCommand>b__1(Task t) in D:\a\_work\1\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:line 410
   at System.Threading.Tasks.ContinuationResultTaskFromTask`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
   at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass63_0.<RunShellCommand>b__0(Task t) in D:\a\_work\1\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:line 376
   at System.Threading.Tasks.ContinuationResultTaskFromTask`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> Mono.AndroidTools.AdbException: closed
   at Mono.AndroidTools.Util.AggregateAsyncResult.CheckError(CancellationToken token) in D:\a\_work\1\s\External\androidtools\Mono.AndroidTools\Util\AggregateAsyncResult.cs:line 72
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
   --- End of inner exception stack trace ---
   at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass66_0.<RunShellCommand>b__1(Task t) in D:\a\_work\1\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:line 410
   at System.Threading.Tasks.ContinuationResultTaskFromTask`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
---> (Inner Exception #0) Mono.AndroidTools.AdbException: closed
   at Mono.AndroidTools.Util.AggregateAsyncResult.CheckError(CancellationToken token) in D:\a\_work\1\s\External\androidtools\Mono.AndroidTools\Util\AggregateAsyncResult.cs:line 72
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)<---
<---
<---
Failed to clear debug property on deviceUnable to terminate Android app in debugger cleanup

Image

Steps to Reproduce

Create .NET 9 project template with sample content option checked.
Run on Debug on builtin Pixel 5 Android 14 emulator.

Link to public reproduction project repository

No response

Version with bug

9.0.50 SR5

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

14

Did you find any workaround?

No response

Relevant log output

Microsoft Visual Studio Community 2022 (64-bit) - Current
Version 17.13.4

@janseris janseris added the t/bug label Mar 22, 2025
@mattleibow mattleibow transferred this issue from dotnet/maui Mar 23, 2025
@dotnet-policy-service dotnet-policy-service bot added the needs-triage Issues that need to be assigned. label Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Issues that need to be assigned. t/bug
Projects
None yet
Development

No branches or pull requests

1 participant