microsoft / botframework-components

The repository for components built by Microsoft for the Azure Bot Framework.
https://aka.ms/botdocs
MIT License
113 stars 82 forks source link

Failed to start C# Calendar_assistant bot (created from calendar template) #691

Closed tsuwandy closed 3 years ago

tsuwandy commented 3 years ago

Describe the bug

Looking at package manager, Microsoft.Bot.Components.Orchestrator not installed. When trying to install from package manager, it failed. Errors from trying to manually install from bot folder:

c:\Users\tiens\Downloads\calendar_assistant\calendar_assistant\runtime\azurewebapp>dotnet add package "Microsoft.Bot.Components.Orchestrator" --version="1.0.0-preview.20210226.87f28fe" --source="https://api.nuget.org/v3/index.json" Determining projects to restore... Writing C:\Users\tiens\AppData\Local\Temp\tmp2893.tmp info : Adding PackageReference for package 'Microsoft.Bot.Components.Orchestrator' into project 'c:\Users\tiens\Downloads\calendar_assistant\calendar_assistant\runtime\azurewebapp\Microsoft.BotFramework.Composer.WebApp.csproj'. info : Restoring packages for c:\Users\tiens\Downloads\calendar_assistant\calendar_assistant\runtime\azurewebapp\Microsoft.BotFramework.Composer.WebApp.csproj... info : CACHE https://api.nuget.org/v3-flatcontainer/microsoft.bot.builder.ai.orchestrator/index.json error: NU1102: Unable to find package Microsoft.Bot.Builder.AI.Orchestrator with version (>= 4.12.0-rc1.preview) error: - Found 5 version(s) in https://api.nuget.org/v3/index.json [ Nearest version: 4.11.1-preview ] warn : NU1701: Package 'Microsoft.Azure.KeyVault.Core 1.0.0' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v3.1'. This package may not be fully compatible with your project. error: Package 'Microsoft.Bot.Components.Orchestrator' is incompatible with 'all' frameworks in project 'c:\Users\tiens\Downloads\calendar_assistant\calendar_assistant\runtime\azurewebapp\Microsoft.BotFramework.Composer.WebApp.csproj'.

Error from starting bot:

Start bot failed

Unhandled exception. System.InvalidOperationException: conversational-core.dialog error: Type Microsoft.OrchestratorRecognizer not registered in factory. ---> System.ArgumentException: Type Microsoft.OrchestratorRecognizer not registered in factory. at Microsoft.Bot.Builder.Dialogs.Declarative.Resources.ResourceExplorer.BuildType[T](String kind, JToken obj, JsonSerializer serializer) at Microsoft.Bot.Builder.Dialogs.Declarative.Converters.InterfaceConverter1.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateDictionary(IDictionary dictionary, JsonReader reader, JsonDictionaryContract contract, JsonProperty containerProperty, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolvePropertyAndCreatorValues(JsonObjectContract contract, JsonProperty containerProperty, JsonReader reader, Type objectType) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor1 creator, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.Serialization.JsonSerializerProxy.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType) at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer) at Microsoft.Bot.Builder.Dialogs.Declarative.Loaders.DefaultLoader.Load(JToken obj, JsonSerializer serializer, Type type) at Microsoft.Bot.Builder.Dialogs.Declarative.Resources.ResourceExplorer.BuildType[T](String kind, JToken obj, JsonSerializer serializer) at Microsoft.Bot.Builder.Dialogs.Declarative.Converters.InterfaceConverter1.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolvePropertyAndCreatorValues(JsonObjectContract contract, JsonProperty containerProperty, JsonReader reader, Type objectType) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor1 creator, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.Serialization.JsonSerializerProxy.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType) at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer) at Microsoft.Bot.Builder.Dialogs.Declarative.Loaders.DefaultLoader.Load(JToken obj, JsonSerializer serializer, Type type) at Microsoft.Bot.Builder.Dialogs.Declarative.Resources.ResourceExplorer.BuildType[T](String kind, JToken obj, JsonSerializer serializer) at Microsoft.Bot.Builder.Dialogs.Declarative.Converters.InterfaceConverter1.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolvePropertyAndCreatorValues(JsonObjectContract contract, JsonProperty containerProperty, JsonReader reader, Type objectType) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor1 creator, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.Serialization.JsonSerializerProxy.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType) at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer) at Microsoft.Bot.Builder.Dialogs.Declarative.Loaders.DefaultLoader.Load(JToken obj, JsonSerializer serializer, Type type) at Microsoft.Bot.Builder.Dialogs.Declarative.Resources.ResourceExplorer.BuildType[T](String kind, JToken obj, JsonSerializer serializer) at Microsoft.Bot.Builder.Dialogs.Declarative.Converters.InterfaceConverter1.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType) at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer) at Newtonsoft.Json.Linq.JToken.ToObject[T](JsonSerializer jsonSerializer) at Microsoft.Bot.Builder.Dialogs.Declarative.Resources.ResourceExplorer.Load[T](JToken token, SourceContext sourceContext) at Microsoft.Bot.Builder.Dialogs.Declarative.Resources.ResourceExplorer.LoadTypeAsync[T](Resource resource, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.Bot.Builder.Dialogs.Declarative.Resources.ResourceExplorer.LoadTypeAsync[T](Resource resource, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Declarative.Resources.ResourceExplorer.LoadType[T](Resource resource) at Microsoft.BotFramework.Composer.Core.ComposerBot.LoadRootDialogAsync() in C:\Users\tiens\Downloads\calendar_assistant\calendar_assistant\runtime\core\ComposerBot.cs:line 63 at Microsoft.BotFramework.Composer.Core.ComposerBot..ctor(ConversationState conversationState, UserState userState, ResourceExplorer resourceExplorer, BotFrameworkClient skillClient, SkillConversationIdFactoryBase conversationIdFactory, IBotTelemetryClient telemetryClient, String rootDialog, String defaultLocale, Boolean removeRecipientMention) in C:\Users\tiens\Downloads\calendar_assistant\calendar_assistant\runtime\core\ComposerBot.cs:line 43 at Microsoft.BotFramework.Composer.WebAppTemplates.Startup.<>c__DisplayClass14_0.<ConfigureServices>b__5(IServiceProvider s) in C:\Users\tiens\Downloads\calendar_assistant\calendar_assistant\runtime\azurewebapp\Startup.cs:line 214 at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite singletonCallSite, 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.<>cDisplayClass1_0.b0(ServiceProviderEngineScope scope) at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, 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 Microsoft.Bot.Builder.Integration.AspNet.Core.ApplicationBuilderExtensions.UseNamedPipes(IApplicationBuilder applicationBuilder, String pipeName, String audience, String appId, String callerId) at Microsoft.Bot.Builder.Integration.AspNet.Core.ApplicationBuilderExtensions.UseNamedPipes(IApplicationBuilder applicationBuilder, String pipeName, String audience) at Microsoft.BotFramework.Composer.WebAppTemplates.Startup.Configure(IApplicationBuilder app, IWebHostEnvironment env) in C:\Users\tiens\Downloads\calendar_assistant\calendar_assistant\runtime\azurewebapp\Startup.cs:line 231 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder) at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>cDisplayClass4_0.b0(IApplicationBuilder builder) at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>cDisplayClass13_0.b2(IApplicationBuilder app) at Microsoft.ApplicationInsights.AspNetCore.ApplicationInsightsStartupFilter.<>cDisplayClass2_0.b0(IApplicationBuilder app) at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>cDisplayClass0_0.gMiddlewareFilterBuilder|0(IApplicationBuilder builder) at Microsoft.AspNetCore.HostFilteringStartupFilter.<>cDisplayClass0_0.b0(IApplicationBuilder app) at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host) at Microsoft.BotFramework.Composer.WebAppTemplates.Program.Main(String[] args) in C:\Users\tiens\Downloads\calendar_assistant\calendar_assistant\runtime\azurewebapp\Program.cs:line 16

Version

1.3.1-nightly.219396...

lauren-mills commented 3 years ago

@peterinnesmsft, @benbrown

I’m not sure what would cause this. Can either of you advise what changes I need to make in the calendar generator?

peterinnesmsft commented 3 years ago

I don't think this is a generator issue - this is a package source issue.

The original bits that we've been validating against has been all of the RC1 bits published to MyGet, which is why we see the error on being unable to find the right package version.

My assumption is that the NuGet sources in this case don't include the dailies feed. It should be getting output as part of the NuGet.config on project scaffolding. If that's not happening, then that's a bug. Meanwhile, we should establish whether we should be pointing against versions that are published to nuget.org or not.

peterinnesmsft commented 3 years ago

Following up on this - we are going through the process of updating our components and generators to point against 4.12.1 packages. This should eliminate any potential confusion around configured NuGet sources.