IKeyValueStorage throwing errors for Windows #2096
Replies: 1 comment
-
Also saw this in output System.InvalidOperationException: Operation is not valid due to the current state of the object. |
Beta Was this translation helpful? Give feedback.
-
I've made a new Uno App using the latest template, chose OIDC for authentication, and set the Windows project as the startup project then caught this exception on debug mode.
System.InvalidOperationException
HResult=0x80073D54
Message=Operation is not valid due to the current state of the object.
Source=WinRT.Runtime
StackTrace:
at WinRT.ExceptionHelpers.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.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.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.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.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.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.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 System.Runtime.CompilerServices.ValueTaskAwaiter
1.GetResult() at Uno.Extensions.DispatcherExtensions.<>c__DisplayClass2_0
1.<b__0>d.MoveNext()at System.Threading.Tasks.ValueTask
1.get_Result() at System.Runtime.CompilerServices.ValueTaskAwaiter
1.GetResult()at Uno.Extensions.Dispatcher.d__4
1.MoveNext() at System.Threading.Tasks.ValueTask
1.get_Result()at System.Runtime.CompilerServices.ValueTaskAwaiter
1.GetResult() 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__5>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 UnoApp1.App.d__8.MoveNext() in C:\Users\WenHong.Lau\source\workspaces\UnoApp1\UnoApp1\App.cs:line 83
Beta Was this translation helpful? Give feedback.
All reactions