I am deploying an ABP microserviceābased project using Docker Compose, and the application encounters an error when running the AuthServer. The application returns an HTTP 500 (Internal Server Error) from the server side. After checking the logs, I found the following error:
I have checked the language-related tables in the database, with the following results.
I would appreciate any assistance to help resolve this issue so the project can continue as soon as possible
[berkansasmaz] said: We have resolved this issue and will release a new version soon. Until then, you can continue using the previous version to create a new service. Thank you for your understanding.
Thanks.
[maliming] said: hi
I have fixed this in the Studio template; the next version will be no problem.
Thanks.
Thanks.
[maliming] said: hi
Configure<AbpExternalLocalizationOptions>(options => {⨠options.SaveToExternalStore = false; });
Thanks, maliming. I followed the solution you provided and it resolved the issue.
new LanguageManagementDbContext(
new DbContextOptionsBuilder<LanguageManagementDbContext>().UseSqlite(connection).Options
).GetService<IRelationalDatabaseCreator>().CreateTables();
Configure<AbpExternalLocalizationOptions>(options =>
{
options.SaveToExternalStore = false;
});
I would like to understand why these steps need to be added manually. Without them, the tests fail. Shouldnāt ABP automatically handle this when generating a new project, so that the testing environment works out of the box?
Could you please clarify why this behavior occurs and whether it is expected?
[maliming] said: hi
Please update the
CreateDatabaseAndGetConnectionas belowprivate static SqliteConnection CreateDatabaseAndGetConnection() { var connection = new SqliteConnection("Data Source=:memory:"); connection.Open(); // AdministrationServiceDbContext () new AdministrationServiceDbContext( new DbContextOptionsBuilder<AdministrationServiceDbContext>().UseSqlite(connection).Options ).GetService<IRelationalDatabaseCreator>().CreateTables(); // BlobStoringDbContext new BlobStoringDbContext( new DbContextOptionsBuilder<BlobStoringDbContext>().UseSqlite(connection).Options ).GetService<IRelationalDatabaseCreator>().CreateTables(); // LanguageManagementDbContext () new LanguageManagementDbContext( new DbContextOptionsBuilder<LanguageManagementDbContext>().UseSqlite(connection).Options ).GetService<IRelationalDatabaseCreator>().CreateTables(); return connection; }Thanks.
Hello maliming, I followed your instructions. After running dotnet test, the errors related to the missing AbpLanguages and AbpLanguageTexts tables were resolved. However, the testing process is now taking a very long time and continues running without producing any results.
Exception message and full stack trace:
CsdlAttp.AdministrationService.Tests test net10.0 failed with 2 error(s) (6.9s)
D:\csdl-attp\services\administration\CsdlAttp.AdministrationService.Tests\bin\Debug\net10.0\CsdlAttp.AdministrationService.Tests.dll : error TESTERROR:
CsdlAttp.AdministrationService.Tests.Controllers.DemoController_Tests.HelloWorld (5s 9ms): Error Message: Microsoft.Data.Sqlite.SqliteException : SQLite Error 1: 'no such
table: AbpLanguages'.
Stack Trace:
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.ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellat ionToken) at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.AsyncEnumerator.MoveNextAsync()
at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable1 source, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable1 source, CancellationToken cancellationToken)
at Volo.Abp.LanguageManagement.EntityFrameworkCore.EfCoreLanguageRepository.GetListByIsEnabledAsync(Boolean isEnabled, CancellationToken cancellationToken)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.Abp.LanguageManagement.DatabaseLanguageProvider.q5L442B2Z() at Volo.Abp.Caching.DistributedCache2.GetOrAddAsync(TCacheKey key, Func1 factory, Func1 optionsFactory, Nullable1 hideErrors, Boolean considerUow, CancellationToke n token) at Volo.Abp.LanguageManagement.DatabaseLanguageProvider.GetLanguagesAsync() at Microsoft.AspNetCore.RequestLocalization.DefaultAbpRequestLocalizationOptionsProvider.GetLocalizationOptionsAsync() at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.TestHost.HttpContextBuilder.<>c__DisplayClass23_0.<<SendAsync>g__RunRequestAsync|0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.TestHost.ClientHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.AspNetCore.Mvc.Testing.Handlers.CookieContainerHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCt s, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at CsdlAttp.AdministrationService.Tests.AdministrationServiceIntegrationTestBase.GetResponseAsync(String url, HttpStatusCode expectedStatusCode) in D:\csdl-attp\servic es\administration\CsdlAttp.AdministrationService.Tests\AdministrationServiceIntegrationTestBase.cs:line 34 at CsdlAttp.AdministrationService.Tests.AdministrationServiceIntegrationTestBase.GetResponseAsStringAsync(String url, HttpStatusCode expectedStatusCode) in D:\csdl-att p\services\administration\CsdlAttp.AdministrationService.Tests\AdministrationServiceIntegrationTestBase.cs:line 26 at CsdlAttp.AdministrationService.Tests.Controllers.DemoController_Tests.HelloWorld() in D:\csdl-attp\services\administration\CsdlAttp.AdministrationService.Tests\Cont rollers\DemoController_Tests.cs:line 17 --- End of stack trace from previous location --- D:\csdl-attp\services\administration\CsdlAttp.AdministrationService.Tests\bin\Debug\net10.0\CsdlAttp.AdministrationService.Tests.dll : error TESTERROR: CsdlAttp.AdministrationService.Tests.ApplicationServices.PermissionAppService_Tests.Should_Get_Permissions (5s 46ms): Error Message: Microsoft.Data.Sqlite.SqliteException : SQLite Error 1: 'no such table: AbpLanguageTexts'. Stack Trace: 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.ExecuteDbDataReader(CommandBehavior behavior) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject) at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.Enumerator.InitializeReader(Enumerator enumerator)
at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.Enumerator.<>c.<MoveNext>b__22_0(DbContext _, Enumerator enumerator) at Microsoft.EntityFrameworkCore.Storage.NonRetryingExecutionStrategy.Execute[TState,TResult](TState state, Func3 operation, Func3 verifySucceeded) at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.Enumerator.MoveNext()
at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Volo.Abp.LanguageManagement.EntityFrameworkCore.EfCoreLanguageTextRepository.GetList(String resourceName, String cultureName) at Castle.Proxies.Invocations.ILanguageTextRepository_GetList.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.DynamicProxy.AbstractInvocation.ProceedInfo.Invoke() at Castle.DynamicProxy.AsyncInterceptorBase.ProceedSynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) --- End of stack trace from previous location --- at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()
at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed
at Castle.Proxies.IBasicRepository1Proxy_7.GetList(String resourceName, String cultureName) at Volo.Abp.LanguageManagement.DynamicResourceLocalizer.CreateCacheItem(LocalizationResourceBase resource, String cultureName) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()
at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()
at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, IAuditingHelper auditingHelper, IAuditLogSc
ope auditLogScope)
at Volo.Abp.Auditing.AuditingInterceptor.ProcessWithNewAuditingScopeAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, ICurrentUser currentUser, IAudit
ingManager auditingManager, IAuditingHelper auditingHelper, IUnitOfWorkManager unitOfWorkManager)
at Volo.Abp.Auditing.AuditingInterceptor.ProcessWithNewAuditingScopeAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, ICurrentUser currentUser, IAudit
ingManager auditingManager, IAuditingHelper auditingHelper, IUnitOfWorkManager unitOfWorkManager)
at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()
at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed)
at CsdlAttp.AdministrationService.Tests.ApplicationServices.PermissionAppService_Tests.Should_Get_Permissions() in D:\csdl-attp\services\administration\CsdlAttp.Admini
strationService.Tests\ApplicationServices\PermissionAppService_Tests.cs:line 26
--- End of stack trace from previous location ---
Steps to reproduce the issue: Hello ABP support team,
Our project is encountering an issue related to testing. The project requirement is that all services must pass dotnet test. However, among all the services, AdministrationService fails when running dotnet test. In the output, the error indicates that several tables related to Languages are missing. Specifically:
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: 'no such table: AbpLanguages'
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: 'no such table: AbpLanguageTexts'.
CsdlAttp.AdministrationService.Tests.ApplicationServices.PermissionAppService_Tests.Should_Get_Permissions (5s 46ms):
Error Message: Microsoft.Data.Sqlite.SqliteException: SQLite Error 1: 'no such table: AbpLanguageTexts'.
Based on the ABP documentation (https://abp.io/docs/latest/framework/data/entity-framework-core/migrations ) and the ABP AI assistant, it seems I need to manually add the table creation logic for the Language module inside the AdministrationServiceTestsModule.
I would like to confirm with the ABP support team: What is the root cause of this issue, and what is the recommended way to fix it? Thank you.
volo.abp.studio.cli 2.1.0 abp volo.abp.suite 10.0.0 abp-suite
[maliming] said: hi
I found the problem and it will be fixed in 2.0.3
Thanks.
Thank you for your response. We have encountered another issue and hope you can assist us. When using ABP Suite to generate an Entity for a CRUD Page, we are facing a problem related to missing namespace imports. We were able to resolve it manually by adding the appropriate namespace, and then we could continue working. We are reporting this issue to you and hope your team can address and fix it so that generating new Entities can be fully automated without this error. Thank you. Abp version: volo.abp.studio.cli 2.0.2 abp volo.abp.suite 10.0.0 abp-suite
[maliming] said: hi
It seems your local template package is outdated.
Can you try to clear your nuget cache and run abp new command again?
dotnet nuget locals -c all abp new Microservicev101 -t microservice --ui-framework angular --mobile react-native --database-provider ef --database-management-system sqlserver --theme leptonx --skip-migrator --public-website --without-cms-kit --dont-run-bundling -no-file-management -no-language-managementYou will see: **Volo.Abp.Studio.Extensions.StandardSolutionTemplates (v: 2.0.2) **
Volo.Abp.Studio.Extensions.StandardSolutionTemplates (v: 2.0.2) extension trying install from the NuGet š ABP CLI 2.0.2 š Checking extensions...Thanks.
Hello Maliming, I am experiencing the same issue when creating a new Microservice project. I followed the instructions above, but Iām still getting an error related to _configuration in IdentityService. volo.abp.studio.cli 2.0.2 abp volo.abp.suite 10.0.0 abp-suite I hope you can respond soon so I can continue my work. Thank you.