Hi liangshiwei, I had already tried, I added the following reference to the .EntityFrameworkCore.Tests.csproj <PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.1.8" />
Dear abp team, I recently updated a module project to v8.0.4, but when I run the test on an azure pipeline on linux environment, I receive the following exception on dotnet test. On windows env the test run successfull.
Exception:
Neos.Rvu.Application -> /agent/_work/3/s/src/Neos.Rvu.Application/bin/Debug/net8.0/Neos.Rvu.Application.dll Neos.Rvu.EntityFrameworkCore.Tests -> /agent/_work/3/s/test/Neos.Rvu.EntityFrameworkCore.Tests/bin/Debug/net8.0/linux-x64/Neos.Rvu.EntityFrameworkCore.Tests.dll Test run for /agent/_work/3/s/test/Neos.Rvu.EntityFrameworkCore.Tests/bin/Debug/net8.0/linux-x64/Neos.Rvu.EntityFrameworkCore.Tests.dll (.NETCoreApp,Version=v8.0) Microsoft (R) Test Execution Command Line Tool Version 17.9.0 (x64) Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait... A total of 1 test files matched the specified pattern. [xUnit.net 00:00:00.75] Neos.Rvu.Schedules.LegRepositoryTests.GetListAsync [FAIL] [xUnit.net 00:00:00.79] Neos.Rvu.Blockspaces.BlockspaceRepositoryTests.GetCountAsync [FAIL] [xUnit.net 00:00:00.81] Neos.Rvu.Schedules.LegRepositoryTests.GetCountAsync [FAIL] [xUnit.net 00:00:00.84] Neos.Rvu.Blockspaces.BlockspaceRepositoryTests.GetListAsync [FAIL] [xUnit.net 00:00:00.85] Neos.Rvu.Schedules.FlightRepositoryTests.GetCountAsync [FAIL] [xUnit.net 00:00:00.87] Neos.Rvu.NumericAvailabilities.NumericAvailabilityRepositoryTests.GetListAsync [FAIL] [xUnit.net 00:00:00.88] Neos.Rvu.Schedules.FlightRepositoryTests.GetListAsync [FAIL] [xUnit.net 00:00:00.89] Neos.Rvu.NumericAvailabilities.NumericAvailabilityRepositoryTests.GetCountAsync [FAIL] Failed Neos.Rvu.Schedules.LegRepositoryTests.GetListAsync [1 ms] Error Message: Volo.Abp.AbpInitializationException : An error occurred during ConfigureServices phase of the module Neos.Rvu.EntityFrameworkCore.RvuEntityFrameworkCoreTestModule, Neos.Rvu.EntityFrameworkCore.Tests, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details. ---- System.TypeInitializationException : The type initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception. -------- System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation. ------------ System.DllNotFoundException : Unable to load shared library 'e_sqlite3' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: /agent/_work/3/s/test/Neos.Rvu.EntityFrameworkCore.Tests/bin/Debug/net8.0/linux-x64/e_sqlite3.so: cannot open shared object file: No such file or directory /agent/_work/_tool/dotnet/shared/Microsoft.NETCore.App/8.0.2/e_sqlite3.so: cannot open shared object file: No such file or directory /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /agent/_work/3/s/test/Neos.Rvu.EntityFrameworkCore.Tests/bin/Debug/net8.0/linux-x64/libe_sqlite3.so) /agent/_work/_tool/dotnet/shared/Microsoft.NETCore.App/8.0.2/libe_sqlite3.so: cannot open shared object file: No such file or directory /agent/_work/3/s/test/Neos.Rvu.EntityFrameworkCore.Tests/bin/Debug/net8.0/linux-x64/e_sqlite3: cannot open shared object file: No such file or directory /agent/_work/_tool/dotnet/shared/Microsoft.NETCore.App/8.0.2/e_sqlite3: cannot open shared object file: No such file or directory /agent/_work/3/s/test/Neos.Rvu.EntityFrameworkCore.Tests/bin/Debug/net8.0/linux-x64/libe_sqlite3: cannot open shared object file: No such file or directory /agent/_work/_tool/dotnet/shared/Microsoft.NETCore.App/8.0.2/libe_sqlite3: cannot open shared object file: No such file or directory
Stack Trace:
at Volo.Abp.AbpApplicationBase.ConfigureServices()
at Volo.Abp.AbpApplicationBase..ctor(Type startupModuleType, IServiceCollection services, Action1 optionsAction) at Volo.Abp.AbpApplicationWithExternalServiceProvider..ctor(Type startupModuleType, IServiceCollection services, Action
1 optionsAction)
at Volo.Abp.AbpApplicationFactory.Create(Type startupModuleType, IServiceCollection services, Action1 optionsAction) at Volo.Abp.AbpApplicationFactory.Create[TStartupModule](IServiceCollection services, Action
1 optionsAction)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplication[TStartupModule](IServiceCollection services, Action1 optionsAction) at Volo.Abp.Testing.AbpIntegratedTest
1..ctor()
at Neos.Rvu.RvuTestBase`1..ctor()
at Neos.Rvu.EntityFrameworkCore.RvuEntityFrameworkCoreTestBase..ctor()
at Neos.Rvu.Schedules.LegRepositoryTests..ctor() in /agent/_work/3/s/test/Neos.Rvu.EntityFrameworkCore.Tests/Schedules/LegRepositoryTests.cs:line 15
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
----- Inner Stack Trace -----
at Microsoft.Data.Sqlite.SqliteConnection..ctor(String connectionString)
at Neos.Rvu.EntityFrameworkCore.RvuEntityFrameworkCoreTestModule.CreateDatabaseAndGetConnection() in /agent/_work/3/s/test/Neos.Rvu.EntityFrameworkCore.Tests/EntityFrameworkCore/RvuEntityFrameworkCoreTestModule.cs:line 41
at Neos.Rvu.EntityFrameworkCore.RvuEntityFrameworkCoreTestModule.ConfigureServices(ServiceConfigurationContext context) in /agent/_work/3/s/test/Neos.Rvu.EntityFrameworkCore.Tests/EntityFrameworkCore/RvuEntityFrameworkCoreTestModule.cs:line 27
at Volo.Abp.AbpApplicationBase.ConfigureServices()
----- Inner Stack Trace -----
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
at Microsoft.Data.Sqlite.SqliteConnection..cctor()
----- Inner Stack Trace -----
at SQLitePCL.SQLite3Provider_e_sqlite3.NativeMethods.sqlite3_libversion_number()
at SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number()
at SQLitePCL.raw.SetProvider(ISQLite3Provider imp)
at SQLitePCL.Batteries_V2.Init()
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Did you know
The missing section in dynamic-env.json was AbpAccountPublic. We solve adding the following section inside the file.
{
"production": true,
"application": {
"baseUrl":"http://localhost:4200",
"name": "App",
"logoUrl": ""
},
"oAuthConfig": {
"issuer": "https://localhost:44391/",
"redirectUri": "http://localhost:4200",
"clientId": "App_App",
"responseType": "code",
"scope": "offline_access openid profile email phone App"
},
"apis": {
"default": {
"url": "https://localhost:44391",
"rootNamespace": "App"
},
"AbpAccountPublic": {
"url": "https://localhost:44391/",
"rootNamespace": "AbpAccountPublic"
}
}
}
Hi, the problem is only on account module. The app now is deployed on nginx using the dynamic-env.json All modules are using the right endpoint apis->default->url instead the account module use the localhost.
{
"production": true,
"application": {
"baseUrl":"https://etsapp-ui-dev.mydomain.it",
"name": "App",
"logoUrl": ""
},
"oAuthConfig": {
"issuer": "https://etsapp-api-dev.mydomain.it/",
"redirectUri": "https://etsapp-ui-dev.mydomain.it",
"clientId": "App_App",
"responseType": "code",
"scope": "offline_access openid profile email phone App"
},
"apis": {
"default": {
"url": "https://etsapp-api-dev.mydomain.it",
"rootNamespace": "App"
}
}
}
Greetings, after publishing an application generated with abp suite, I have an error on the browser because the account module points to an address in localhost. How do I set the module account URL?
all other endpoints are ok~~~~
Hi,
I'm writing to bring your attention to an issue with the auditing process in the Volo.Abp.Auditing module. I've observed that the auditing process does not properly support value objects, and I would like to discuss a specific problem I've encountered.
Through a test, I've identified that the error in inserting data into the EntityChanges table is due to the fact that the EntityId is null, as evidenced by the test results.
In summary, I'm raising a concern with the Volo.Abp.Auditing module, as it currently fails to track changes to the properties of value objects. This issue stems from an error in inserting data into the EntityChanges table, which does not allow null values in the EntityId column.
I would appreciate your guidance on a potential solution to this problem. Your assistance in resolving this issue would be greatly appreciated.
Hi, the unit test confirm my error: EntityId is null-
Please add the following check here on the update operation
&& !x.EntityChanges[1].EntityId.IsNullOrEmpty()
You will have the following test result:
Volo.Abp.Auditing.Auditing_Tests.Should_Write_AuditLog_For_ValueObject_Entity Source: Auditing_Tests.cs line 366 Duration: 9,8 sec Message: NSubstitute.Exceptions.ReceivedCallsException : Expected to receive a call matching: SaveAsync(x => ((((((((((x.EntityChanges.Count == 2) AndAlso (Convert(x.EntityChanges.get_Item(0).ChangeType, Int32) == 1)) AndAlso (x.EntityChanges.get_Item(0).EntityTypeFullName == Volo.Abp.Auditing.App.Entities.AppEntityWithValueObject.FullName)) AndAlso (Convert(x.EntityChanges.get_Item(1).ChangeType, Int32) == 1)) AndAlso (x.EntityChanges.get_Item(1).EntityTypeFullName == Volo.Abp.Auditing.App.Entities.AppEntityWithValueObjectAddress.FullName)) AndAlso (x.EntityChanges.get_Item(1).PropertyChanges.Count == 1)) AndAlso (x.EntityChanges.get_Item(1).PropertyChanges.get_Item(0).PropertyName == "Country")) AndAlso (x.EntityChanges.get_Item(1).PropertyChanges.get_Item(0).OriginalValue == ""England"")) AndAlso (x.EntityChanges.get_Item(1).PropertyChanges.get_Item(0).NewValue == ""Germany"")) AndAlso Not(x.EntityChanges.get_Item(1).EntityId.IsNullOrEmpty()))) Actually received no matching calls. Received 2 non-matching calls (non-matching arguments indicated with '*' characters): SaveAsync(*AUDIT LOG: [---: -------] - UserName - UserId : - - ClientIpAddress : - ExecutionDuration : 332 - Entity Changes: - [Created] Volo.Abp.Auditing.App.Entities.AppEntityWithValueObjectAddress, Id = AppEntityWithValueObjectId: -> "08d140ca-5b9f-4f28-a797-b7d3b77b1522" Country: -> "England" - [Updated] Volo.Abp.Auditing.App.Entities.AppEntityWithValueObject, Id = 08d140ca-5b9f-4f28-a797-b7d3b77b1522 Name: "test name" -> "test name 2" - [Deleted] Volo.Abp.Auditing.App.Entities.AppEntityWithValueObjectAddress, Id = AppEntityWithValueObjectId: "08d140ca-5b9f-4f28-a797-b7d3b77b1522" -> Country: "USA" -> *) SaveAsync(*AUDIT LOG: [---: -------] - UserName - UserId : - - ClientIpAddress : - ExecutionDuration : 59 - Entity Changes: - [Updated] Volo.Abp.Auditing.App.Entities.AppEntityWithValueObject, Id = 08d140ca-5b9f-4f28-a797-b7d3b77b1522 - [Updated] Volo.Abp.Auditing.App.Entities.AppEntityWithValueObjectAddress, Id = Country: "England" -> "Germany" *) Stack Trace: ReceivedCallsExceptionThrower.Throw(ICallSpecification callSpecification, IEnumerable`1 matchingCalls, IEnumerable`1 nonMatchingCalls, Quantity requiredQuantity) CheckReceivedCallsHandler.Handle(ICall call) Route.Handle(ICall call) CallRouter.Route(ICall call) CastleForwardingInterceptor.Intercept(IInvocation invocation) AbstractInvocation.Proceed() ProxyIdInterceptor.Intercept(IInvocation invocation) AbstractInvocation.Proceed() ObjectProxy.SaveAsync(AuditLogInfo auditInfo) Auditing_Tests.Should_Write_AuditLog_For_ValueObject_Entity() line 412 --- End of stack trace from previous location ---
The changes made to the value objects of an aggregate root are not tracked in the 'AbpEntityPropertyChanges' table. If I add the value object to the 'EntityHistorySelector' list, I get an error. 2023-10-23 16:36:46.686 +02:00 [ERR] An error occurred while saving the entity changes. See the inner exception for details. Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Npgsql.PostgresException (0x80004005): 23502: null value in column "EntityId" of relation "AbpEntityChanges" violates not-null constraint
I'm sorry. I changed the default AuthorizationEndpoint on *AppHttpApiHostModule,cs to "https://login.microsoftonline.com/common/oauth2/v2.0/authorize" for a multitenant app
ExCheck the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, and please first use the search on the homepage. Provide us with the following info:
I tryed to configure the external login with Microsoft. I created a new app on azure with the secret, but when I try to login I have the following error:
unauthorized_client: The client does not exist or is not enabled for consumers. If you are the application developer, configure a new application through the App Registrations in the Azure Portal at https://go.microsoft.com/fwlink/?linkid=2083908.
I inserted the clientId and client secret on the seetings > account > external provider.
Can you help me?
many thanks