You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When enabling multiple features in an import recipe, if the migrations of one feature fail, the migrations of other features can get stuck and not succeed either.
Follow the repro steps of #16346. Since that bug is now fixed, you can simulate a similar issue with a migration failing by e.g. changing OrchardCore.Facebook.Widgets.WidgetMigrationsCreateAsync() to this:
publicasyncTask<int>CreateAsync(){thrownew System.Exception("This is a test.");}
Open e.g. /about or /blog/post-1 and note that you'll get the below "no such table: LocalizedContentItemIndex" exception. This is because of the migrations of Localization not running properly. However, there's no issue with those migrations, rather, it got stuck due to the migrations of Meta Social Plugins Widgets failing.
An unhandled exception has occurred while executing the request. Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: 'no such table: LocalizedContentItemIndex'.
at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements()+MoveNext()
at Microsoft.Data.Sqlite.SqliteCommand.GetStatements()+MoveNext()
at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
at Dapper.SqlMapper.QueryAsync[T](IDbConnection cnn, Type effectiveType, CommandDefinition command) in /_/Dapper/SqlMapper.Async.cs:line 434
at YesSql.Store.<>c__DisplayClass44_0`2.<<ProduceAwaitedAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at YesSql.Data.WorkDispatcher`2.ScheduleAsync[TState](TKey key, TState state, Func`3 valueFactory)
at YesSql.Store.ProduceAwaitedAsync[T,TState](WorkerQueryKey key, Func`3 work, TState state)
at YesSql.Services.DefaultQuery.Query`1.ListImpl()
at YesSql.Services.DefaultQuery.Query`1.ListImpl()
at OrchardCore.ContentLocalization.Services.LocalizationEntries.InitializeEntriesAsync() in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore.Modules\OrchardCore.ContentLocalization\Services\LocalizationEntries.cs:line 195
at OrchardCore.ContentLocalization.Services.LocalizationEntries.EnsureInitializedAsync() in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore.Modules\OrchardCore.ContentLocalization\Services\LocalizationEntries.cs:line 71
at OrchardCore.ContentLocalization.Services.LocalizationEntries.TryGetLocalizationAsync(String contentItemId) in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore.Modules\OrchardCore.ContentLocalization\Services\LocalizationEntries.cs:line 37
at OrchardCore.ContentLocalization.Services.ContentCulturePickerService.GetLocalizationFromRouteAsync(PathString url) in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore.Modules\OrchardCore.ContentLocalization\Services\ContentCulturePickerService.cs:line 76
at OrchardCore.ContentLocalization.ContentRequestCultureProvider.DetermineProviderCultureResult(HttpContext httpContext) in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore.Modules\OrchardCore.ContentLocalization\ContentRequestCultureProvider.cs:line 23
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at OrchardCore.Diagnostics.DiagnosticsStartupFilter.<>c__DisplayClass3_0.<<Configure>b__1>d.MoveNext() in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore.Modules\OrchardCore.Diagnostics\DiagnosticsStartupFilter.cs:line 34
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
at OrchardCore.ContentPreview.PreviewStartupFilter.<>c.<<Configure>b__0_1>d.MoveNext() in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore.Modules\OrchardCore.ContentPreview\PreviewStartupFilter.cs:line 16
--- End of stack trace from previous location ---
at OrchardCore.Modules.ModularTenantRouterMiddleware.Invoke(HttpContext httpContext) in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore\OrchardCore\Modules\ModularTenantRouterMiddleware.cs:line 47
at OrchardCore.Modules.ModularTenantContainerMiddleware.<>c__DisplayClass4_0.<<Invoke>b__0>d.MoveNext() in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore\OrchardCore\Modules\ModularTenantContainerMiddleware.cs:line 61
--- End of stack trace from previous location ---
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell) in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 291
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell) in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 295
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell) in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 301
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell) in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 305
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell) in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 305
at OrchardCore.Modules.ModularTenantContainerMiddleware.Invoke(HttpContext httpContext) in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore\OrchardCore\Modules\ModularTenantContainerMiddleware.cs:line 59
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context) at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements()+MoveNext()
at Microsoft.Data.Sqlite.SqliteCommand.GetStatements()+MoveNext()
at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
at Dapper.SqlMapper.QueryAsync[T](IDbConnection cnn, Type effectiveType, CommandDefinition command) in /_/Dapper/SqlMapper.Async.cs:line 434
at YesSql.Store.<>c__DisplayClass44_0`2.<<ProduceAwaitedAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at YesSql.Data.WorkDispatcher`2.ScheduleAsync[TState](TKey key, TState state, Func`3 valueFactory)
at YesSql.Store.ProduceAwaitedAsync[T,TState](WorkerQueryKey key, Func`3 work, TState state)
at YesSql.Services.DefaultQuery.Query`1.ListImpl()
at YesSql.Services.DefaultQuery.Query`1.ListImpl()
at OrchardCore.ContentLocalization.Services.LocalizationEntries.InitializeEntriesAsync() in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore.Modules\OrchardCore.ContentLocalization\Services\LocalizationEntries.cs:line 195
at OrchardCore.ContentLocalization.Services.LocalizationEntries.EnsureInitializedAsync() in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore.Modules\OrchardCore.ContentLocalization\Services\LocalizationEntries.cs:line 71
at OrchardCore.ContentLocalization.Services.LocalizationEntries.TryGetLocalizationAsync(String contentItemId) in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore.Modules\OrchardCore.ContentLocalization\Services\LocalizationEntries.cs:line 37
at OrchardCore.ContentLocalization.Services.ContentCulturePickerService.GetLocalizationFromRouteAsync(PathString url) in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore.Modules\OrchardCore.ContentLocalization\Services\ContentCulturePickerService.cs:line 76
at OrchardCore.ContentLocalization.ContentRequestCultureProvider.DetermineProviderCultureResult(HttpContext httpContext) in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore.Modules\OrchardCore.ContentLocalization\ContentRequestCultureProvider.cs:line 23
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at OrchardCore.Diagnostics.DiagnosticsStartupFilter.<>c__DisplayClass3_0.<<Configure>b__1>d.MoveNext() in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore.Modules\OrchardCore.Diagnostics\DiagnosticsStartupFilter.cs:line 34
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
at OrchardCore.ContentPreview.PreviewStartupFilter.<>c.<<Configure>b__0_1>d.MoveNext() in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore.Modules\OrchardCore.ContentPreview\PreviewStartupFilter.cs:line 16
--- End of stack trace from previous location ---
at OrchardCore.Modules.ModularTenantRouterMiddleware.Invoke(HttpContext httpContext) in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore\OrchardCore\Modules\ModularTenantRouterMiddleware.cs:line 47
at OrchardCore.Modules.ModularTenantContainerMiddleware.<>c__DisplayClass4_0.<<Invoke>b__0>d.MoveNext() in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore\OrchardCore\Modules\ModularTenantContainerMiddleware.cs:line 61
--- End of stack trace from previous location ---
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell) in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 291
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell) in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 295
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell) in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 301
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell) in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 305
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell) in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 305
at OrchardCore.Modules.ModularTenantContainerMiddleware.Invoke(HttpContext httpContext) in E:\Projects\OrchardForks\OrchardCore8\src\OrchardCore\OrchardCore\Modules\ModularTenantContainerMiddleware.cs:line 59
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
Note that only enabling Meta Social Plugins Widgets by hand does NOT cause a similar issue: its migrations will fail, the exception is logged, and everything else works still. I'd expect this to happen when enabling multiple features at once too.
Expected behavior
The offending migrations fail, but the migrations of all other features still run.
Logs and screenshots
See above.
The text was updated successfully, but these errors were encountered:
We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).
This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.
Describe the bug
When enabling multiple features in an import recipe, if the migrations of one feature fail, the migrations of other features can get stuck and not succeed either.
Orchard Core version
9d79ab5
To Reproduce
Follow the repro steps of #16346. Since that bug is now fixed, you can simulate a similar issue with a migration failing by e.g. changing
OrchardCore.Facebook.Widgets.WidgetMigrationsCreateAsync()
to this:Open e.g. /about or /blog/post-1 and note that you'll get the below "no such table: LocalizedContentItemIndex" exception. This is because of the migrations of Localization not running properly. However, there's no issue with those migrations, rather, it got stuck due to the migrations of Meta Social Plugins Widgets failing.
Note that only enabling Meta Social Plugins Widgets by hand does NOT cause a similar issue: its migrations will fail, the exception is logged, and everything else works still. I'd expect this to happen when enabling multiple features at once too.
Expected behavior
The offending migrations fail, but the migrations of all other features still run.
Logs and screenshots
See above.
The text was updated successfully, but these errors were encountered: