Activities of "LW"

Yes, that seems to work. I got the impression that that was the fix for the hanging tests, but everything seems to work without it. Thank you for your help!

Ok, thanks. Do you have any suggestions on how to handle our current problem? We didn't have nested transactions problem before, but now we do. What caused the change? Why does the nested transactions problem occur during the tests? As far as I know, Abp unit of work system should be able to recognize if there is a transaction open already.

Is this a new limitation? This worked fine earlier.

Ok. that " context.Services.AddAlwaysDisableUnitOfWorkTransaction();" actually brought another problem for us. With some of our integration tests, we use test collection to speed up the test execution. We used the transactional unit of work to control the system state, so the tests were not dependent on each other. System state changes were rollbacked after the test. Now that the transactions are disabled, these tests are now interdepended and some query tests fail because another test has affected the database state. I know that Abp recommends to do the test initilization per test, but with larger test sets, that makes the test excecution slower and slower. Is there any way to control the transaction separately per test now? Is there any other good way to speed up the test excecution with larger amount of integration tests?

hi, that seemed to fix the problem.Awesome, Thank you! Can you please explain why that helps, so I can put a comment in our code?

  • ABP Framework version: v7.0.2
  • UI type: Angular /
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no

We have a big problem with our backend unit tests after we migrated from the 5.3.1 version to the most current (7.0.2) version. Now some of the tests are hanging in execution indefinitely when running large batches of tests at once. The same thing happens whether we run the tests from VS or through the "dotnet test" via cmd. From my investigation, this might be due to using synchronization with async-methods.https://github.com/abpframework/abp/issues/2075#issuecomment-561582158. One obvious place where this is done is the common data seeding in the test base.

private static void SeedTestData(ApplicationInitializationContext context)
{
    if (context == null)
    {
    throw new ArgumentNullException(nameof(context));
    }

    AsyncHelper.RunSync(async () =>
    {
    using (var scope = context.ServiceProvider.CreateScope())
    {
    	await scope.ServiceProvider
    		.GetRequiredService<IDataSeeder>()
    		.SeedAsync();
    }
    });
}

For validation, I created a structure that does the seeding through IAsyncLifetime initialization so the seeding is done properly through the asynchronous call stack. That seemed to mitigate the problem alot but there were still some tests that were left hanging. After that, I disabled the parallel test execution. With these changes, I can get larger batches of tests to finish execution. Forcing non-parallel execution is not ideal, however. Have you seen this problem occur previously? And what can be done to fix the issue? I checked that, we don't use synchronous calls for async methods in our own code.

Same here :(

  • ABP Framework version: v5.1.4
  • UI type: Angular / MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

When we deploy identity server to azure app service the login page logs an exception about missing assets:

  • Exception message and stack trace: 404 Not Found on GET /Themes/Lepton/Global/assets/fonts/OpenSans-Bold.ttf for example.

I cannot find any information on how to include those assets to identity server deployment package. Gulpfile-scripts does not seem to copy anything to identity server side. So is there a desingned way to make sure the assets are copied to the Identity Server deployment package.

  • ABP Framework version: v5.1.4
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no We would like to enable our customers to create and edit users by themselves inside a tenant. However, we have an admin role and user per every tenant that is and needs to remain in our control. We have come to a situation where we cannot give our clients the permissions to edit or create users since they could either set users as admin or remove the admin role from our admin user. Is there a way to disable the editing of a specific user and disable permissions to add or remove a specific role to a user?
  • ABP Framework version: v5.1.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace: core.mjs:6461 ERROR NullInjectorError: R3InjectorError(ConsumptionForecastModule)[ValidationGroupDirective -> ValidationGroupDirective -> ValidationGroupDirective -> ValidationGroupDirective -> ValidationGroupDirective]: NullInjectorError: No provider for ValidationGroupDirective! at NullInjector.get (core.mjs:11095:1) at R3Injector.get (core.mjs:11262:1) at R3Injector.get (core.mjs:11262:1) at R3Injector.get (core.mjs:11262:1) at NgModuleRef.get (core.mjs:21807:1) at R3Injector.get (core.mjs:11262:1) at NgModuleRef.get (core.mjs:21807:1) at R3Injector.get (core.mjs:11262:1) at NgModuleRef.get (core.mjs:21807:1) at Object.get (core.mjs:21484:1) defaultErrorLogger @ core.mjs:6461 handleError @ core.mjs:6508 (anonymous) @ core.mjs:26428 invoke @ zone.js:372 run @ zone.js:134 runOutsideAngular @ core.mjs:25356 tick @ core.mjs:26428 (anonymous) @ core.mjs:26273 invoke @ zone.js:372 onInvoke @ core.mjs:25457 invoke @ zone.js:371 run @ zone.js:134 run @ core.mjs:25311 next @ core.mjs:26272 __tryOrUnsub @ Subscriber.js:183 next @ Subscriber.js:122 _next @ Subscriber.js:72 next @ Subscriber.js:49 next @ Subject.js:39 emit @ core.mjs:22402 checkStable @ core.mjs:25379 onLeave @ core.mjs:25507 onInvokeTask @ core.mjs:25451 invokeTask @ zone.js:405 runTask @ zone.js:178 invokeTask @ zone.js:487 invokeTask @ zone.js:1648 globalCallback @ zone.js:1679 globalZoneAwareCallback @ zone.js:1712

We have an issue with NgxValidateCoreModule that emerges after it is imported to a module that has a component in which we have the following: The component is a view that has KendoTreeList in which we use kendoTreeListCellTemplate to be able to render our own custom FormControl of choice to its table cells. Kendo rows/cells have “edit mode” which means Kendo renders the form control with the form group when an editable cell or whole row is clicked. There is kendoTreeListEditTemplate for the edit mode content, but in our case, we have a custom form control that has two functionalities in one so we need to use kendoTreeListCellTemplate. This means that the content (form control) is there 100% of the time, not only in the cell’s edit mode like things are with kendo’s own editable cells. The edit mode means that when the user clicks a cell in the tree list table, it transforms to a form control with a form group. So, with the cell template with our custom form control being rendered there straight away when initing the KendoTreeList and it’s there without any surrounding form group. The control is given to it in the template definition via [formControl] directive from the the collection of form groups that represent the tree list table rows (e.g. this.formGroups[rowIndex].controls[col.field]). When we import the NgxValidateCoreModule, the following error is given <customCellTemplateWithOurFormControlCount> times:

core.mjs:6461 ERROR NullInjectorError: R3InjectorError(ConsumptionForecastModule)[ValidationGroupDirective -> ValidationGroupDirective -> ValidationGroupDirective -> ValidationGroupDirective -> ValidationGroupDirective]:
  NullInjectorError: No provider for ValidationGroupDirective!
    at NullInjector.get (core.mjs:11095:1)
    at R3Injector.get (core.mjs:11262:1)
    at R3Injector.get (core.mjs:11262:1)
    at R3Injector.get (core.mjs:11262:1)
    at NgModuleRef.get (core.mjs:21807:1)
    at R3Injector.get (core.mjs:11262:1)
    at NgModuleRef.get (core.mjs:21807:1)
    at R3Injector.get (core.mjs:11262:1)
    at NgModuleRef.get (core.mjs:21807:1)
    at Object.get (core.mjs:21484:1)
defaultErrorLogger @ core.mjs:6461
handleError @ core.mjs:6508
(anonymous) @ core.mjs:26428
invoke @ zone.js:372
run @ zone.js:134
runOutsideAngular @ core.mjs:25356
tick @ core.mjs:26428
(anonymous) @ core.mjs:26273
invoke @ zone.js:372
onInvoke @ core.mjs:25457
invoke @ zone.js:371
run @ zone.js:134
run @ core.mjs:25311
next @ core.mjs:26272
__tryOrUnsub @ Subscriber.js:183
next @ Subscriber.js:122
_next @ Subscriber.js:72
next @ Subscriber.js:49
next @ Subject.js:39
emit @ core.mjs:22402
checkStable @ core.mjs:25379
onLeave @ core.mjs:25507
onInvokeTask @ core.mjs:25451
invokeTask @ zone.js:405
runTask @ zone.js:178
invokeTask @ zone.js:487
invokeTask @ zone.js:1648
globalCallback @ zone.js:1679
globalZoneAwareCallback @ zone.js:1712

So the questions are:

  1. Is this a bug that NgxValidate requires a form group wrapper for form controls or am I missing something? Isn’t it fully legit to have form controls without a surrounding form group to begin with?
  2. If this is fully intended and avoidable, how to fix this issue for our use case and ignore the required formGroup?
Showing 1 to 10 of 44 entries
Made with ❤️ on ABP v8.3.0-preview Updated on July 05, 2024, 15:13