Open DrewBrasher opened 6 months ago
Hi @DrewBrasher, I will try to reproduce the issue, because I didn't see such error previously
@DrewBrasher I just tried to delete App_Data
and started fresh, everything works as expected, please run git clean -xdf
and try again
I tried git clean -xdf
and get the same results as before. I also tried on another computer and got the same results.
If I disable hot reload, I can continue past the exception in visual studio and after continuing past several of those exceptions for other features the webpage will load and I can log in.
Then I can stop the app and run it again and the page loads now with no exceptions.
Could you comment the code inside the InstalledAsync
and then check
If I change it to this:
public Task InstalledAsync(IFeatureInfo feature) => Task.CompletedTask;
//public async Task InstalledAsync(IFeatureInfo feature)
// => await _migrationRunner.MigrateAsync(feature.Extension.Manifest.ModuleInfo.Id);
It runs fine with no exceptions.
Strange!! The line above is used to install the features with custom migration
With that commented out, if I go to Tenants in the dashboard, and select the blog tenant I get this exception in the browser:
System.ArgumentException: An item with the same key has already been added. Key: Blank
at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at System.Linq.Enumerable.ToDictionary[TSource,TKey](IEnumerable`1 source, Func`2 keySelector, IEqualityComparer`1 comparer)
at OrchardCore.Recipes.RecipeSteps.RecipesStep.ExecuteAsync(RecipeExecutionContext context)
at OrchardCore.Recipes.Services.RecipeExecutor.<>c__DisplayClass7_0.<<ExecuteStepAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
at OrchardCore.Recipes.Services.RecipeExecutor.ExecuteStepAsync(RecipeExecutionContext recipeStep)
at OrchardCore.Recipes.Services.RecipeExecutor.ExecuteAsync(String executionId, RecipeDescriptor recipeDescriptor, IDictionary`2 environment, CancellationToken cancellationToken)
at OrchardCore.Recipes.Services.RecipeExecutor.ExecuteAsync(String executionId, RecipeDescriptor recipeDescriptor, IDictionary`2 environment, CancellationToken cancellationToken)
at OrchardCore.Recipes.Services.RecipeExecutor.ExecuteAsync(String executionId, RecipeDescriptor recipeDescriptor, IDictionary`2 environment, CancellationToken cancellationToken)
at OrchardCore.Setup.Services.SetupService.SetupInternalAsync(SetupContext context)
at OrchardCore.Setup.Services.SetupService.SetupInternalAsync(SetupContext context)
at OrchardCore.Setup.Services.SetupService.SetupAsync(SetupContext context)
at OrchardCore.Setup.Services.SetupService.SetupAsync(SetupContext context)
at OrchardCore.AutoSetup.AutoSetupMiddleware.SetupTenantAsync(ISetupService setupService, TenantSetupOptions setupOptions, ShellSettings shellSettings)
at OrchardCore.AutoSetup.AutoSetupMiddleware.InvokeAsync(HttpContext httpContext)
at OrchardCore.AutoSetup.AutoSetupMiddleware.InvokeAsync(HttpContext httpContext)
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at OrchardCore.Modules.ModularTenantRouterMiddleware.Invoke(HttpContext httpContext)
at OrchardCore.Modules.ModularTenantContainerMiddleware.<>c__DisplayClass4_0.<<Invoke>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
at OrchardCore.Modules.ModularTenantContainerMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
Could you try building a new OC app and reference the modules that you want to try
The reason I was trying to run it from the source code is because I'm planning to add a new module for issue https://github.com/OrchardCoreContrib/OrchardCoreContrib.Modules/issues/101 .
I'm still surprised why this happening, I already created all the available modules then added a reference to the module in the web app
Could you try building a new OC app and reference the modules that you want to try
I created a new OC app and referenced the IssueTracker module and that is working so I think I'm good to go as far as being able to work on that module.
I will have a look into your PR, we can put a brief plan for this module as an initial version then we can extend it over the time
Thanks again
I forked this repo and cloned it to my machine and tried to run the OrchardCoreContrib.Modules.Web project but I'm getting errors. I think I must be missing something that needs to be in the appsettings file but I don't know what it would be.
The first time I try to run it after a fresh cloning I get the![image](https://github.com/OrchardCoreContrib/OrchardCoreContrib.Modules/assets/9272802/1a6f547f-c7a2-4361-b2ee-013e560d7a9b)
Object reference not set to an instance of an object.
error in this screenshot in visual studio but I don't see anything that is null:If I stop debugging and run it again I don't get that error again but the webpage shows this error: