Starts in:
2 DAYS
4 HRS
54 MIN
44 SEC
Starts in:
2 D
4 H
54 M
44 S
Open Closed

Bugs & Problems v3.1.X #282


User avatar
0
maliming created
Support Team Fullstack Developer

Update the ABP CLI:

dotnet tool update -g Volo.Abp.Cli

Update the ABP Suite:

abp suite update or dotnet tool update -g Volo.Abp.Suite

  • Release notes https://docs.abp.io/en/commercial/latest/release-notes

105 Answer(s)
  • User Avatar
    0
    Esben_Dalgaard created

    Typescript:

    import { TerminalMessageStatus } from '../../shared/enums/terminal-message-status';
    import { ABP, ListService, PagedResultDto, TrackByService } from '@abp/ng.core';
    import { Confirmation, ConfirmationService } from '@abp/ng.theme.shared';
    import { DateAdapter } from '@abp/ng.theme.shared/extensions';
    import { Component, OnInit } from '@angular/core';
    import { FormBuilder, FormGroup, Validators } from '@angular/forms';
    import { NgbDateAdapter } from '@ng-bootstrap/ng-bootstrap';
    import { filter, finalize, switchMap, tap } from 'rxjs/operators';
    import { TerminalCommands } from '../../store/models';
    import { TerminalCommandsService } from './terminalCommands.service';
    import { Observable, timer, Subscription, interval } from 'rxjs';
    import { Router } from '@angular/router';
    
    @Component({
      selector: 'app-terminalCommands',
      templateUrl: './terminalCommands.component.html',
      styleUrls: ['./terminalCommands.component.scss'],
      providers: [ListService, { provide: NgbDateAdapter, useClass: DateAdapter }],
    })
    export class TerminalCommandsComponent implements OnInit {
      data: PagedResultDto<TerminalCommands.TerminalCommandWithNavigationProperties> = {
        items: [],
        totalCount: 0,
      };
    
      filters: Partial<TerminalCommands.TerminalCommandsQueryParams> = {};
    
      form: FormGroup;
    
      isFiltersHidden = true;
    
      isModalBusy = false;
    
      isModalOpen = false;
    
      selected: TerminalCommands.TerminalCommandWithNavigationProperties;
    
      terminalMessageTypeArr = Object.keys(TerminalMessageType).filter(value => isNaN(Number(value)) === false).map(key => ({ key: key, value: TerminalMessageType[key] }));
      terminalMessageStatusArr = Object.keys(TerminalMessageStatus).filter(value => isNaN(Number(value)) === false).map(key => ({ key: key, value: TerminalMessageStatus[key] }));
      
    
      constructor(
        public readonly list: ListService,
        public readonly track: TrackByService,
        public readonly terminalCommandsService: TerminalCommandsService,
        private confirmation: ConfirmationService,
        private fb: FormBuilder,
        private router: Router
      ) {}
    
      ngOnInit() {
        const getData = (query: ABP.PageQueryParams) =>
          this.terminalCommandsService.getListByInput({
            filterText: query.filter,
            ...query,
            ...this.filters,
          });
    
        const setData = (response: TerminalCommands.Response) => (this.data = response);
    
        this.list.hookToQuery(getData).subscribe(setData);
        this.start();
      }
    
      start(){
        if(this.router.url == "/terminalCommands")
        {
          setTimeout(this.ngOnInit.bind(this),2000);
        }
      }
    
      buildForm() {
        this.form = this.fb.group({
          productInstanceId: [(this.selected.productInstance || {}).id]
          
        });
      }
    
      hideForm() {
        this.isModalOpen = false;
        this.form.reset();
      }
    
      showForm() {
        /*
        if(this.filters.productInstanceId == null){
          return;
        }*/
        this.buildForm();
        this.isModalOpen = true;
      }
    
      submitForm() {
        if (this.form.invalid) return;
        
    
        const request = this.selected.terminalCommand.id
          ? this.terminalCommandsService.updateByIdAndInput(this.form.value, this.selected.terminalCommand.id)
          : this.terminalCommandsService.createByInput(this.form.value);
    
        this.isModalBusy = true;
    
        request
          .pipe(
            finalize(() => (this.isModalBusy = false)),
            tap(() => this.hideForm()),
          )
          .subscribe(this.list.get);
      }
    
      create() {
        this.selected = {
        terminalCommand: {},
          productInstance: {}
        } as TerminalCommands.TerminalCommandWithNavigationProperties;
        this.showForm();
      }
    
      update(record: TerminalCommands.TerminalCommandWithNavigationProperties) {
        this.terminalCommandsService
          .getByIdWithNavigationProperties(record.terminalCommand.id)
          .subscribe((response: TerminalCommands.TerminalCommandWithNavigationProperties) => {
            this.selected = response;
            this.showForm();
          });
      }
    
      delete(record: TerminalCommands.TerminalCommandWithNavigationProperties) {
        this.confirmation.warn(
          '::DeleteConfirmationMessage',
          '::AreYouSure',
          { messageLocalizationParams: [] }
        ).pipe(
          filter(status => status === Confirmation.Status.confirm),
          switchMap(() => this.terminalCommandsService.deleteById(record.terminalCommand.id)),
        ).subscribe(this.list.get);
      }
    }
    

    There's a method that keeps refreshing the data, and a lot of html removed, but other than that, it should be standard.

  • User Avatar
    0
    armanozak created

    Hi Esben_Dalgaard,

    This cannot be the component that causes the problem, because it has no NgbPaginationComponent in it. And from the code we could not figure out anything problematic.

    Could you please do one one the following?

    • Share the steps to reproduce the problem.
    • Share a minimal reproducible example.

    Thanks.

  • User Avatar
    0
    Esben_Dalgaard created

    Hi armanozak, We're sort of deep into our development, so our angular directory alone is 700 mb, and we have several customizations on our program, such as, rabbitMq, microservices, custom identity entities and over 3-4 updates from 3.0.0 to 3.3.0, so honestly, it's a bit of a sizable jungle, and although I think the problem is in our frontend, but I agree not the component, it could also be from generating entities over several versions, where your Angular architecture changed considerably (which is my chief suspecion).

    I'm not sure if I can share the project easily, but I've made a ticket out of it, if it helps.

  • User Avatar
    0
    armanozak created

    Hi Esben_Dalgaard,

    Seeing the whole project is not going to help anyway. A better approach is for you to reproduce the same error with a minimal repo. The general steps would be like this:

    1. Initiate a new project with ABP CLI.
    2. Add only one or two entities.
    3. Try to get the same error.

    If you can get the same error, this minimal example can be shared (without the node_modules folder) and will help us find the problem. Otherwise, it is extremely difficult to spot what is wrong.

  • User Avatar
    0
    scott7106 created

    Exception when attempting to run all Application Tests

    Note, they run when executed one application service at a time, but fail if I try to run all the tests. I did a little searching on the support forums but did not see anything I thought was relevant. This project was created on 3.0 and then upgraded to 3.1.

    Volo.Abp.AbpInitializationException : An error occurred during PostConfigureServices phase of the module Volo.Saas.Host.SaasHostApplicationContractsModule, Volo.Saas.Host.Application.Contracts, Version=3.1.2.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details. ---- System.InvalidOperationException : Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.

    Stack Trace: AbpApplicationBase.ConfigureServices() AbpApplicationBase.ctor(Type startupModuleType, IServiceCollection services, Action1 optionsAction) AbpApplicationWithExternalServiceProvider.ctor(Type startupModuleType, IServiceCollection services, Action1 optionsAction) AbpApplicationFactory.Create(Type startupModuleType, IServiceCollection services, Action1 optionsAction) AbpApplicationFactory.Create[TStartupModule](IServiceCollection services, Action1 optionsAction) ServiceCollectionApplicationExtensions.AddApplication[TStartupModule](IServiceCollection services, Action1 optionsAction) AbpIntegratedTest1.ctor() SynergyzTestBase1.ctor() SynergyzApplicationTestBase.ctor() ClassificationCategoryAppServiceTests.ctor() line 14 ----- Inner Stack Trace ----- Dictionary2.FindEntry(TKey key) Dictionary2.TryGetValue(TKey key, TValue& value) AbpDictionaryExtensions.GetOrAdd[TKey,TValue](IDictionary2 dictionary, TKey key, Func2 factory) AbpDictionaryExtensions.GetOrAdd[TKey,TValue](IDictionary2 dictionary, TKey key, Func1 factory) ObjectExtensionInfo.AddOrUpdateProperty(Type propertyType, String propertyName, Action1 configureAction) <>c__DisplayClass3_0.<AddOrUpdateProperty>b__0(ObjectExtensionInfo options) ObjectExtensionManager.AddOrUpdate(Type type, Action1 configureAction) ObjectExtensionManagerExtensions.AddOrUpdateProperty(ObjectExtensionManager objectExtensionManager, Type objectType, Type propertyType, String propertyName, Action1 configureAction) ObjectExtensionManagerExtensions.AddOrUpdateProperty(ObjectExtensionManager objectExtensionManager, Type[] objectTypes, Type propertyType, String propertyName, Action`1 configureAction) ModuleExtensionConfigurationHelper.ApplyPropertyConfigurationToTypes(ExtensionPropertyConfiguration propertyConfig, Type[] types) ModuleExtensionConfigurationHelper.ApplyEntityConfigurationToApi(String moduleName, String objectName, Type[] getApiTypes, Type[] createApiTypes, Type[] updateApiTypes) SaasHostApplicationContractsModule.PostConfigureServices(ServiceConfigurationContext context) AbpApplicationBase.ConfigureServices()

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06