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

[Core] Windows - CustomApp - Operation is not valid due to the current state of the object. #2241

Open
2 of 15 tasks
agneszitte opened this issue Apr 9, 2024 · 10 comments
Open
2 of 15 tasks
Labels
kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification.

Comments

@agneszitte
Copy link
Contributor

agneszitte commented Apr 9, 2024

Current behavior

Operation is not valid due to the current state of the object occurs when launching the app for Windows when creating an app with latest template 5.3.0-dev.19 and using:

	dotnet new unoapp -o TestCustomApp530dev19 -preset "recommended" -platforms "android" -platforms "ios" -platforms "maccatalyst" -platforms "windows" -auth "oidc" -theme-service  -pwa False -maui  -theme "material" -presentation "mvvm" -config  -di  -log "serilog" -nav "regions" -http  -loc  -tests "unit" -tests "ui" -toolkit  -dsp  -id "com.companyname.TestCustomApp530dev19" -pub "O=TestCustomApp530dev19"
Equivalent to these options in the wizard: (expand to see)

image

Exception details to expand:
e.Exception.Message: 
Operation is not valid due to the current state of the object.
e.Exception.InnerException: 
null
e.Exception.StackTrace:
   at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|39_0(Int32 hr)
   at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr)
   at ABI.Windows.Storage.IApplicationDataStaticsMethods.get_Current(IObjectReference _obj)
   at Windows.Storage.ApplicationData.get_Current()
   at Uno.Extensions.Storage.KeyValueStorage.ApplicationDataKeyValueStorage..ctor(ILogger`1 Logger, InMemoryKeyValueStorage InMemoryStorage, KeyValueStorageSettings Settings, ISerializer Serializer)
   at Uno.Extensions.Storage.KeyValueStorage.EncryptedApplicationDataKeyValueStorage..ctor(ILogger`1 EncryptedLogger, InMemoryKeyValueStorage InMemoryStorage, KeyValueStorageSettings Settings, ISerializer Serializer)
   at Uno.Extensions.ServiceCollectionExtensions.<>c.<AddKeyedStorage>b__2_3(ILogger`1 l, InMemoryKeyValueStorage inmem, KeyValueStorageSettings settings, ISerializer s)
   at Uno.Extensions.ServiceCollectionExtensions.CreateKeyValueStorage[TKeyValueStorage](IServiceProvider sp, String name, Func`5 creator)
   at Uno.Extensions.ServiceCollectionExtensions.<>c.<AddKeyedStorage>b__2_1(IServiceProvider sp)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass2_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Uno.Extensions.DependencyInjection.NamedInstance`2.GetRequired()
   at Uno.Extensions.ServiceCollectionExtensions.GetRequiredNamedService[TService](IServiceProvider sp, String Name)
   at Uno.Extensions.DependencyInjection.NamedInstanceReference`1.GetRequired()
   at Uno.Extensions.ServiceCollectionExtensions.GetRequiredNamedService[TService](IServiceProvider sp, String Name)
   at Uno.Extensions.ServiceCollectionExtensions.GetRequiredDefaultInstance[TService](IServiceProvider sp)
   at Uno.Extensions.HostBuilderExtensions.<>c.<UseAuthentication>b__3_1(IServiceProvider sp)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass2_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Uno.Extensions.HostBuilderExtensions.<>c__DisplayClass2_0`2.<AddAuthentication>b__1(IServiceProvider sp)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass2_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
   at Uno.Extensions.Navigation.Navigators.ControlNavigator.<>c__DisplayClass8_0.<<CreateViewModel>b__0>d.MoveNext()
   at Uno.Extensions.Navigation.Navigators.ControlNavigator.<CreateViewModel>d__8.MoveNext()
   at Uno.Extensions.Navigation.Navigators.ControlNavigator`1.<InitializeCurrentView>d__9.MoveNext()
   at Uno.Extensions.Navigation.Navigators.ControlNavigator`1.<ExecuteRequestAsync>d__8.MoveNext()
   at Uno.Extensions.Navigation.Navigators.ControlNavigator.<ControlNavigateAsync>d__6.MoveNext()
   at Uno.Extensions.Navigation.Navigators.ControlNavigator.<>c__DisplayClass4_0.<<ControlCoreNavigateAsync>b__0>d.MoveNext()
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at Uno.Extensions.DispatcherExtensions.<>c__DisplayClass2_0`1.<<ExecuteAsync>b__0>d.MoveNext()
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at Uno.Extensions.Dispatcher.<ExecuteAsync>d__4`1.MoveNext()
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at Uno.Extensions.Navigation.Navigators.ControlNavigator.<ControlCoreNavigateAsync>d__4.MoveNext()
   at Uno.Extensions.Navigation.Navigators.ControlNavigator.<CoreNavigateAsync>d__3.MoveNext()
   at Uno.Extensions.Navigation.Navigator.<RegionNavigateAsync>d__37.MoveNext()
   at Uno.Extensions.Navigation.Navigator.<NavigateAsync>d__22.MoveNext()
   at Uno.Extensions.Navigation.FrameworkElementExtensions.<>c__DisplayClass1_1.<<HostAsync>b__6>d.MoveNext()
   at Uno.Extensions.Navigation.FrameworkElementExtensions.<Startup>d__2.MoveNext()
   at Uno.Extensions.ServiceProviderExtensions.<BuildAndInitializeHostAsync>d__5.MoveNext()
   at Uno.Extensions.ApplicationBuilderExtensions.<NavigateAsync>d__0`1.MoveNext()
   at TestCustomApp530dev19.App.<OnLaunched>d__9.MoveNext() in C:\Dev\Samples\Cli\TestCustomApp530dev19\TestCustomApp530dev19\App.xaml.cs:line 100
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.<Post>b__0()
Call Stack:
>	TestCustomApp530dev19.dll!TestCustomApp530dev19.App.InitializeComponent.AnonymousMethod__12_2(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e) Line 75	C#
 	Microsoft.WinUI.dll!WinRT._EventSource_global__Microsoft_UI_Xaml_UnhandledExceptionEventHandler.EventState.GetEventInvoke.AnonymousMethod__1_0(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e)	Unknown
 	Microsoft.WinUI.dll!ABI.Microsoft.UI.Xaml.UnhandledExceptionEventHandler.Do_Abi_Invoke(nint thisPtr, nint sender, nint e)	Unknown
 	[Native to Managed Transition]	
 	[Managed to Native Transition]	
 	WinRT.Runtime.dll!WinRT.ExceptionHelpers.ReportUnhandledError(System.Exception ex)	Unknown
 	Microsoft.InteractiveExperiences.Projection.dll!Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.Post.AnonymousMethod__0()	Unknown
 	Microsoft.InteractiveExperiences.Projection.dll!ABI.Microsoft.UI.Dispatching.DispatcherQueueHandler.Do_Abi_Invoke(nint thisPtr)	Unknown
 	[Native to Managed Transition]	
 	[Managed to Native Transition]	
 	Microsoft.WinUI.dll!ABI.Microsoft.UI.Xaml.IApplicationStaticsMethods.Start(WinRT.IObjectReference _obj, Microsoft.UI.Xaml.ApplicationInitializationCallback callback)	Unknown
 	Microsoft.WinUI.dll!Microsoft.UI.Xaml.Application.Start(Microsoft.UI.Xaml.ApplicationInitializationCallback callback)	Unknown
 	TestCustomApp530dev19.dll!TestCustomApp530dev19.Program.Main(string[] args) Line 32	C#

Expected behavior

No exception

How to reproduce it (as minimally and precisely as possible)

  • Create an app using these options with cli with latest template 5.3.0-dev.19:

     dotnet new unoapp -o TestCustomApp530dev19 -preset "recommended" -platforms "android" -platforms "ios" -platforms "maccatalyst" -platforms "windows" -auth "oidc" -theme-service  -pwa False -maui  -theme "material" -presentation "mvvm" -config  -di  -log "serilog" -nav "regions" -http  -loc  -tests "unit" -tests "ui" -toolkit  -dsp  -id "com.companyname.TestCustomApp530dev19" -pub "O=TestCustomApp530dev19"
    
    Equivalent to these options in the wizard: (expand to see)

    image

  • Try to launch the application for Windows

  • Notice the exception

Sample app used for the tests: TestCustomApp530dev19.zip

Environment

"Uno.Sdk": "5.3.0-dev.111"
<UnoExtensionsVersion>4.2.0-dev.13</UnoExtensionsVersion>
<UnoToolkitVersion>5.2.0-dev.56</UnoToolkitVersion>
<UnoThemesVersion>4.2.0-dev.30</UnoThemesVersion>
<UnoCSharpMarkupVersion>5.3.0-dev.11</UnoCSharpMarkupVersion>
Microsoft.WindowsAppSDK: 1.5.240311000
Microsoft.Windows.SDK.BuildTools: 10.0.22621.3233
MauiVersion: 8.0.6

Affected platform(s):

  • iOS
  • macOS (AppKit)
  • Mac Catalyst
  • Android
  • WebAssembly
  • Windows
  • Skia (WPF)
  • Skia (GTK on Linux/macOS/Windows)
  • Skia (Linux Framebuffer)
  • Build tasks

Visual Studio:

  • 2019 (version: )
  • 2022 (version: 17.9.2)
  • Visual Studio Code (version: )
  • Rider Windows (version: )
  • Rider macOS (version: )
@agneszitte agneszitte added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification. labels Apr 9, 2024
@nickrandolph
Copy link
Contributor

@agneszitte can you try running Windows as Packaged instead

@agneszitte
Copy link
Contributor Author

agneszitte commented Apr 10, 2024

@agneszitte can you try running Windows as Packaged instead

@nickrandolph I am having this when trying to run Windows as Packaged
image

But it is not specific to the options used for this issue, I can reproduce it with a simple blank maui embedding app as well.
So I entered a separate issue for it: #2244

@agneszitte
Copy link
Contributor Author

agneszitte commented Apr 12, 2024

@agneszitte can you try running Windows as Packaged instead

@nickrandolph I am having this when trying to run Windows as Packaged !

But it is not specific to the options used for this issue, I can reproduce it with a simple blank maui embedding app as well. So I entered a separate issue for it: #2244

@Darsh0307 now that #2244 (comment) is supposed to be fixed, can you re-test for this issue with latest stable packages + latest stable template to see if you are still able to reproduce the issue for Windows (Unpackaged) and to test Windows (Packaged) please.

@Darsh0307
Copy link

Darsh0307 commented Apr 15, 2024

Message

System.InvalidOperationException: 'Operation is not valid due to the current state of the object.

Inner exception :- None

Exception :- stack trace

   at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|39_0(Int32 hr)
   at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr)
   at ABI.Windows.Storage.IApplicationDataStaticsMethods.get_Current(IObjectReference _obj)
   at Windows.Storage.ApplicationData.get_Current()
   at Uno.Extensions.Storage.KeyValueStorage.ApplicationDataKeyValueStorage..ctor(ILogger`1 Logger, InMemoryKeyValueStorage InMemoryStorage, KeyValueStorageSettings Settings, ISerializer Serializer)
   at Uno.Extensions.Storage.KeyValueStorage.EncryptedApplicationDataKeyValueStorage..ctor(ILogger`1 EncryptedLogger, InMemoryKeyValueStorage InMemoryStorage, KeyValueStorageSettings Settings, ISerializer Serializer)
   at Uno.Extensions.ServiceCollectionExtensions.<>c.<AddKeyedStorage>b__2_3(ILogger`1 l, InMemoryKeyValueStorage inmem, KeyValueStorageSettings settings, ISerializer s)
   at Uno.Extensions.ServiceCollectionExtensions.CreateKeyValueStorage[TKeyValueStorage](IServiceProvider sp, String name, Func`5 creator)
   at Uno.Extensions.ServiceCollectionExtensions.<>c.<AddKeyedStorage>b__2_1(IServiceProvider sp)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass2_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Uno.Extensions.DependencyInjection.NamedInstance`2.GetRequired()
   at Uno.Extensions.ServiceCollectionExtensions.GetRequiredNamedService[TService](IServiceProvider sp, String Name)
   at Uno.Extensions.DependencyInjection.NamedInstanceReference`1.GetRequired()
   at Uno.Extensions.ServiceCollectionExtensions.GetRequiredNamedService[TService](IServiceProvider sp, String Name)
   at Uno.Extensions.ServiceCollectionExtensions.GetRequiredDefaultInstance[TService](IServiceProvider sp)
   at Uno.Extensions.HostBuilderExtensions.<>c.<UseAuthentication>b__3_1(IServiceProvider sp)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass2_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Uno.Extensions.HostBuilderExtensions.<>c__DisplayClass2_0`2.<AddAuthentication>b__1(IServiceProvider sp)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass2_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
   at Uno.Extensions.Navigation.Navigators.ControlNavigator.<>c__DisplayClass8_0.<<CreateViewModel>b__0>d.MoveNext()
   at Uno.Extensions.Navigation.Navigators.ControlNavigator.<CreateViewModel>d__8.MoveNext()
   at Uno.Extensions.Navigation.Navigators.ControlNavigator`1.<InitializeCurrentView>d__9.MoveNext()
   at Uno.Extensions.Navigation.Navigators.ControlNavigator`1.<ExecuteRequestAsync>d__8.MoveNext()
   at Uno.Extensions.Navigation.Navigators.ControlNavigator.<ControlNavigateAsync>d__6.MoveNext()
   at Uno.Extensions.Navigation.Navigators.ControlNavigator.<>c__DisplayClass4_0.<<ControlCoreNavigateAsync>b__0>d.MoveNext()
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at Uno.Extensions.DispatcherExtensions.<>c__DisplayClass2_0`1.<<ExecuteAsync>b__0>d.MoveNext()
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at Uno.Extensions.Dispatcher.<ExecuteAsync>d__4`1.MoveNext()
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at Uno.Extensions.Navigation.Navigators.ControlNavigator.<ControlCoreNavigateAsync>d__4.MoveNext()
   at Uno.Extensions.Navigation.Navigators.ControlNavigator.<CoreNavigateAsync>d__3.MoveNext()
   at Uno.Extensions.Navigation.Navigator.<RegionNavigateAsync>d__37.MoveNext()
   at Uno.Extensions.Navigation.Navigator.<NavigateAsync>d__22.MoveNext()
   at Uno.Extensions.Navigation.FrameworkElementExtensions.<>c__DisplayClass1_1.<<HostAsync>b__6>d.MoveNext()
   at Uno.Extensions.Navigation.FrameworkElementExtensions.<Startup>d__2.MoveNext()
   at Uno.Extensions.ServiceProviderExtensions.<BuildAndInitializeHostAsync>d__5.MoveNext()
   at Uno.Extensions.ApplicationBuilderExtensions.<NavigateAsync>d__0`1.MoveNext()
   at TestCustomApp530dev19.App.<OnLaunched>d__9.MoveNext() in C:\Users\DarshPatel\Desktop\finalQA\TestCustomApp530dev19\TestCustomApp530dev19\App.xaml.cs:line 100

@Darsh0307
Copy link

Darsh0307 commented Apr 15, 2024

Enviournment :-

Templates :- Uno.Templates.5.3.0-dev.31.nupkg



  "Uno.Sdk": "5.3.0-dev.315"
<UnoExtensionsVersion>4.2.0-dev.13</UnoExtensionsVersion>
  <UnoToolkitVersion>5.2.0-dev.56</UnoToolkitVersion>
  <UnoThemesVersion>4.2.0-dev.30</UnoThemesVersion>
  <UnoCSharpMarkupVersion>5.3.0-dev.11</UnoCSharpMarkupVersion>
  <!-- <WindowsSdkPackageVersion>10.0.22621.28</WindowsSdkPackageVersion> -->


@Darsh0307
Copy link

Darsh0307 commented Apr 23, 2024

The exception error is still same , even in the newest versions of 5.2 version.
@agneszitte since the errorr message is same , should i add the exception error again ?

Uno.Templates.5.2.28
    "Uno.Sdk": "5.2.83"
  <UnoExtensionsVersion>4.1.14</UnoExtensionsVersion>
  <UnoToolkitVersion>6.0.18</UnoToolkitVersion>
  <UnoThemesVersion>5.0.13</UnoThemesVersion>
  <UnoCSharpMarkupVersion>5.2.13</UnoCSharpMarkupVersion>

@nickrandolph
Copy link
Contributor

@agneszitte / @Darsh0307 what's the status on this?

@nickrandolph nickrandolph changed the title [Windows][CustomApp] Operation is not valid due to the current state of the object. [Core] Windows - CustomApp - Operation is not valid due to the current state of the object. May 7, 2024
@agneszitte
Copy link
Contributor Author

@agneszitte / @Darsh0307 what's the status on this?

@Darsh0307 I moved this to your list last week. Can you re-test it with latest dev versions to give us an update, please

@Darsh0307
Copy link

Sure @agneszitte , i will test this one. :)

@Darsh0307
Copy link

Darsh0307 commented May 8, 2024

The error is still there with same exception mentioned and all.

The App was created using CLi , The cli was
dotnet new unoapp -o TestCustomApp530dev19 -preset "recommended" -platforms "android" -platforms "ios" -platforms "maccatalyst" -platforms "windows" -auth "oidc" -theme-service -pwa False -maui -theme "material" -presentation "mvvm" -config -di -log "serilog" -nav "regions" -http -loc -tests "unit" -tests "ui" -toolkit -dsp -id "com.companyname.TestCustomApp530dev19" -pub "O=TestCustomApp530dev19"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification.
Projects
None yet
Development

No branches or pull requests

3 participants