I can run the tests from my project with no issues. However, any attempt to run the module tests fails. A snippet of the diagnostic log from the test run is below and indicates that it failed to load a couple of assemblies. This may be an environmental issue. However, adding an explicit reference for the offending assemblies did not resolve the issue.
Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework.TestPluginDiscoverer.GetTestExtensionsFromAssembly[TPluginInfo,TExtension](Assembly assembly, Dictionary`2 pluginInfos)
.....
TpTrace Information: 0 : 30512, 1, 2021/08/10, 11:51:26.854, 6165870832021, vstest.console.dll, Failed to create newly implemented Fakes Configurator. Reason:System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.Fakes, Version=16.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.Fakes, Version=16.0.0.0, Culture=neutral, PublicKeyToken=null'
at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly)
at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, RuntimeAssembly requestingAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at Microsoft.VisualStudio.TestPlatform.Common.Utilities.FakesUtilities.TryGetFakesCrossPlatformDataCollectorConfigurator()
Please see video demonstrating the issue at https://www.screencast.com/t/vyBIoN4Zg
Reference original reported issue from Paul https://support.abp.io/QA/Questions/1648/DatePicker-picks-day-before-not-user-selected-date
This issue occurs in all tested browsers (IE, FireFox, Chrome, Edge), it happens when the users local time zone is set to anything with a negative offset to UTC. In our case, we are on Eastern (UTC - 5). It does not happen with UTC or positive offset time zones which is probably why you couldn't reproduce the issue. In the future, please give us an opportunity to provide more details before closing an issue.
Thanks!
The link to download the project was sent to your email.
Hi maliming,
I have compared every line of code and cannot find a difference. With each version, we generate a new version of a baseline project (no code) and then issue a pull request to compare the source code differences of the new version for a baseline project. We use this information to implement the changes needed for the new version. In this case, we have implemented everything shown in the project compare and are still missing the data listed.
We upgraded our application from 4.2.1 to 4.3.0. After upgrading, certain administrative functions are no longer available in the client application. I cannot reproduce the problem when creating a new project using 4.3. Which leads me to think there is something incorrect or missing in my upgraded project.
When I look at the grantedPolicies from the /api/abp/application-configuration endpoint, there is a noticable difference between a "new" project created in 4.3 and my upgraded project from 4.2. The following policies exist under policies in both projects and have entries for the admin role in the AbpPermissionGrants table for both projects. However, these permissions do not exist under granted policies in my upgraded project while they are listed under granted policies in my new project.
"AbpIdentity.OrganizationUnits": true,
"AbpIdentity.OrganizationUnits.ManageOU": true,
"AbpIdentity.OrganizationUnits.ManageRoles": true,
"AbpIdentity.OrganizationUnits.ManageMembers": true,
"AbpIdentity.ClaimTypes": true,
"AbpIdentity.ClaimTypes.Create": true,
"AbpIdentity.ClaimTypes.Update": true,
"AbpIdentity.ClaimTypes.Delete": true,
"IdentityServer.IdentityResource": true,
"IdentityServer.IdentityResource.Update": true,
"IdentityServer.IdentityResource.Delete": true,
"IdentityServer.IdentityResource.Create": true,
"IdentityServer.ApiResource": true,
"IdentityServer.ApiResource.Update": true,
"IdentityServer.ApiResource.Delete": true,
"IdentityServer.ApiResource.Create": true,
"IdentityServer.Client": true,
"IdentityServer.Client.Update": true,
"IdentityServer.Client.Delete": true,
"IdentityServer.Client.Create": true,
"IdentityServer.Client.ManagePermissions": true,
These are listed in the AbpPermissionGrants table for the admin role in both projects.
@Alper, I am confirming this resolved the issue for me. Is there any documentation on what the requiresNew parameter is doing?
The issue occurs when trying to create a tenant using Use Shared Database. In this case, I would not expect it to create the tenant connection string record. However, it fails attempting to find the tenant in the TenantStore.
edit: using a new database for the tenant processes successfully and adds the identity information to the new database.
In my use case, we do not use separated databases per tenant. I want to completely disable this function and always use the shared database.
Log Snippet
2021-05-19 12:55:06.128 -04:00 [ERR] Failed executing DbCommand (30,060ms) [Parameters=[@__ef_filter__p_0='?' (DbType = Boolean), @__id_0='?' (DbType = Guid)], CommandType='"Text"', CommandTimeout='30']
...
2021-05-19 12:55:06.147 -04:00 [ERR] An exception occurred while iterating over the results of a query for context type 'Volo.Saas.EntityFrameworkCore.SaasDbContext'.
Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
---> System.ComponentModel.Win32Exception (258): The wait operation timed out.
at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__169_0(Task`1 result)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
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.SplitQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
ClientConnectionId:d32b8097-20fb-489d-8a01-02a9e35f514a
Error Number:-2,State:0,Class:11
Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
---> System.ComponentModel.Win32Exception (258): The wait operation timed out.
at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__169_0(Task`1 result)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
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.SplitQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
ClientConnectionId:d32b8097-20fb-489d-8a01-02a9e35f514a
Error Number:-2,State:0,Class:11
2021-05-19 13:04:00.072 -04:00 [ERR] Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
---> System.ComponentModel.Win32Exception (258): The wait operation timed out.
at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__169_0(Task`1 result)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
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.SplitQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository`3.FindAsync(TKey id, Boolean includeDetails, CancellationToken cancellationToken)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Volo.Saas.Tenants.TenantStore.GetCacheItemAsync(Nullable`1 id, String name)
at Volo.Saas.Tenants.TenantStore.FindAsync(Guid id)
at OtisEd.Zipline.Data.ZiplineTenantDatabaseMigrationHandler.MigrateAndSeedForTenantAsync(Guid tenantId, String adminEmail, String adminPassword) in C:\AppDev\otised\OtisEd.Zipline\aspnet-core\src\OtisEd.Zipline.Domain\Data\ZiplineTenantDatabaseMigrationHandler.cs:line 92
ClientConnectionId:d32b8097-20fb-489d-8a01-02a9e35f514a
Error Number:-2,State:0,Class:11
reported by @chris.tune@gmail.com
Create new tenant not creating admin user
- ABP Framework version: v4.3.0 (Upgraded from 4.2.1)
- UI type: Angular
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no
- Exception message and stack trace: No error is thrown.
- Steps to reproduce the issue:
- Goto SaaS-->Tenants-->New Tenant
- Create a new tenant with the admin user and pass entered.
- Save
It looks like the tenant is created but the admin user is not added.
In the database the tenant is added but there is no user.
Potentially a problem in ObjectExtensions or TenantAppService?Chris
The issue is more pervasive than Chris reported. None of the identity components are created for the new tenant. This includes the admin user, the default admin role and the initial permission grants needed for the new admin role.
Is there a status available for this issue? Will it be addressed in the next patch?
There is an issue with the current UnitOfWork system of the ABP Framework. Please see https://github.com/abpframework/abp/issues/8740 for the details. As of now, I can confirm the issue in 4.2.2 which is my current version. I have not tested additional versions.
The code for the AppService.UpdateAsync method which gets generated by ABP Suite is problematic. The default for the autoSave parameter is false which may fail silently in certain situations.