Starts in:
2 DAYS
9 HRS
35 MIN
32 SEC
Starts in:
2 D
9 H
35 M
32 S

Activities of "mgurer"

  • ABP Framework version: v8.2+
  • UI Type: Angular / MVC / Blazor WASM / Blazor Server
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..) / MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I have just intalled new abp cli using the command below;

dotnet tool install -g Volo.Abp.Studio.Cli

Now I get following error when I type abp in command window.

abp --version [08:33:46 INF] ABP CLI 0.7.4 (Beta) [08:33:46 INF] You are running the second generation of the ABP CLI. If you're interested in the legacy CLI, see https://abp.io/new-cli NuGet.Protocol.Core.Types.FatalProtocolException: Failed to retrieve information about 'Volo.Abp.Studio.Cli' from remote source 'https://nuget.telerik.com/v3/package/volo.abp.studio.cli/index.json'. System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized). at HttpResponseMessage System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() at void NuGet.Protocol.HttpSource.<>c__DisplayClass15_01.<<GetAsync>b__0>d.MoveNext() at async Task<T> NuGet.Common.ConcurrencyUtilities.ExecuteWithFileLockedAsync<T>(string filePath, Func<CancellationToken, Task<T>> action, CancellationToken token) at async Task<T> NuGet.Common.ConcurrencyUtilities.ExecuteWithFileLockedAsync<T>(string filePath, Func<CancellationToken, Task<T>> action, CancellationToken token) at async Task<T> NuGet.Protocol.HttpSource.GetAsync<T>(HttpSourceCachedRequest request, Func<HttpSourceResult, Task<T>> processAsync, ILogger log, CancellationToken token) at async Task<SortedDictionary<NuGetVersion, PackageInfo>> NuGet.Protocol.HttpFileSystemBasedFindPackageByIdResource.FindPackagesByIdAsync(string id, SourceCacheContext cacheContext, ILogger logger, CancellationToken cancellationToken) at async Task<SortedDictionary<NuGetVersion, PackageInfo>> NuGet.Protocol.HttpFileSystemBasedFindPackageByIdResource. FindPackagesByIdAsync(string id, SourceCacheContext cacheContext, ILogger logger, CancellationToken cancellationToken) at async Task<SortedDictionary<NuGetVersion, PackageInfo>> NuGet.Protocol.HttpFileSystemBasedFindPackageByIdResource. EnsurePackagesAsync(string id, SourceCacheContext cacheContext, ILogger logger, CancellationToken cancellationToken ) at async Task<IEnumerable<NuGetVersion>> NuGet.Protocol.HttpFileSystemBasedFindPackageByIdResource.GetAllVersionsAsync (string id, SourceCacheContext cacheContext, ILogger logger, CancellationToken cancellationToken) at async Task<SortedSet<NuGetVersion>> Volo.Abp.Studio.Nuget.NugetPackageManager.FindVersionsAsync(string packageId, bool includeNightly) at async Task<NuGetVersion> Volo.Abp.Studio.Nuget.NugetPackageManager.FindLatestVersionAsync(string packageId, bool includeNightly, bool includeReleaseCandidates) at async Task<NuGetVersion> Volo.Abp.Studio.Nuget.NugetPackageManager.GetLatestVersionAsync(string packageId, bool includeNightly, bool includeReleaseCandidates) at async Task Volo.Abp.Studio.Cli.StudioCliService.CheckCliVersionAsync(CommandLineArgs commandLineArgs, SemanticVersion currentCliVersion) at async Task Volo.Abp.Studio.Cli.StudioCliService.RunAsync(string[] args) Unhandled exception. NuGet.Protocol.Core.Types.FatalProtocolException: Failed to retrieve information about 'Volo.Abp.Studio.Cli' from remote source 'https://nuget.telerik.com/v3/package/volo.abp.studio.cli/index.json'. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized). at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() at NuGet.Protocol.HttpSource.<>c__DisplayClass15_01.<<GetAsync>b__0>d.MoveNext() --- End of stack trace from previous location --- at NuGet.Common.ConcurrencyUtilities.ExecuteWithFileLockedAsync[T](String filePath, Func2 action, CancellationToken token) at NuGet.Common.ConcurrencyUtilities.ExecuteWithFileLockedAsync[T](String filePath, Func2 action, CancellationToken token) at NuGet.Protocol.HttpSource.GetAsync[T](HttpSourceCachedRequest request, Func`2 processAsync, ILogger log, CancellationToken token) at NuGet.Protocol.HttpFileSystemBasedFindPackageByIdResource.FindPackagesByIdAsync(String id, SourceCacheContext cacheContext, ILogger logger, CancellationToken cancellationToken) --- End of inner exception stack trace --- at NuGet.Protocol.HttpFileSystemBasedFindPackageByIdResource.FindPackagesByIdAsync(String id, SourceCacheContext cacheContext, ILogger logger, CancellationToken cancellationToken) at NuGet.Protocol.HttpFileSystemBasedFindPackageByIdResource.EnsurePackagesAsync(String id, SourceCacheContext cacheContext, ILogger logger, CancellationToken cancellationToken) at NuGet.Protocol.HttpFileSystemBasedFindPackageByIdResource.GetAllVersionsAsync(String id, SourceCacheContext cacheContext, ILogger logger, CancellationToken cancellationToken) at Volo.Abp.Studio.Nuget.NugetPackageManager.FindVersionsAsync(String packageId, Boolean includeNightly) at Volo.Abp.Studio.Nuget.NugetPackageManager.FindLatestVersionAsync(String packageId, Boolean includeNightly, Boolean includeReleaseCandidates) at Volo.Abp.Studio.Nuget.NugetPackageManager.GetLatestVersionAsync(String packageId, Boolean includeNightly, Boolean includeReleaseCandidates) at Volo.Abp.Studio.Cli.StudioCliService.CheckCliVersionAsync(CommandLineArgs commandLineArgs, SemanticVersion currentCliVersion) at Volo.Abp.Studio.Cli.StudioCliService.RunAsync(String[] args) at Volo.Abp.Studio.Cli.Program.RtRr72CxI(Object ) at Volo.Abp.Studio.Cli.Program.

(String[] args)

When I visit https://nuget.telerik.com/v3/package/volo.abp.studio.cli/index.json address, I am being asked for a basic authentication user.

Where the heck the telerik came from?

Can you advise me asap?

Answer

Hi,

I think problem was due to a property on Message entity. The cli typed property was mapped to a db column containing json string. The json mapping convension somehow didnt worked in new version. Everytime context is saved, the context assumed that the property is altered so savechanges triggered once more which lead the loop in unitofwork.

I simplified the mapping convension of entity property to json column, the problem gone away. I wont dig into detail and have no clue what changed between abp versions.

Here is the mentioned simplified convension function which works fine.

public static PropertyBuilder<Message> HasMessageJsonConversion(this PropertyBuilder<Message> propertyBuilder) { var settings = GetSettings();

var converter = new ValueConverter&lt;Message, string&gt;
(
    v => JsonConvert.SerializeObject(v, settings),
    v => JsonConvert.DeserializeObject&lt;Message&gt;(v, settings)
);

var comparer = new ValueComparer&lt;Message&gt;
(
    (l, r) => l.Equals(r, settings),
    v => v == null ? 0 : JsonConvert.SerializeObject(v, settings).GetHashCode(),
    v => JsonConvert.DeserializeObject&lt;Message&gt;(JsonConvert.SerializeObject(v, settings), settings)
);

propertyBuilder.HasConversion(converter);
propertyBuilder.Metadata.SetValueConverter(converter);
propertyBuilder.Metadata.SetValueComparer(comparer);

return propertyBuilder;

}

Thanks Murat

Question
  • ABP Framework version: v8.2.0
  • UI Type: Blazor WASM
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Hello,

I have just upgraded my v8.02 solution to v8.2.0

I exprerience a strange problem on all versions after v8.0.2. The versions below also does not produce such problem.

When I try to complete a unitofwork by call completeasync() method, the methods falls into a loop and never returns. In each loop LocalEvents collection gets filled with one item although collection is cleared in previous loop.

When I checked the unitofwork source code and commented out the second call to SaveChangesAsync method, everything seems to work fine. I know this change has serious drawbacks, but I could not figure out another solution.

Below is the code (abp's unitofwork.cs) that I altered;

public virtual async Task CompleteAsync(CancellationToken cancellationToken = default)
{
    if (_isRolledback)
    {
        return;
    }

    PreventMultipleComplete();

    try
    {
        _isCompleting = true;
        await SaveChangesAsync(cancellationToken);

        while (LocalEvents.Count != 0 || DistributedEvents.Count != 0)
        {
            if (LocalEvents.Count != 0)
            {
                var localEventsToBePublished = LocalEvents.OrderBy(e => e.EventOrder).ToArray();
                LocalEvents.Clear();
                await UnitOfWorkEventPublisher.PublishLocalEventsAsync(
                    localEventsToBePublished
                );
            }

            if (DistributedEvents.Count != 0)
            {
                var distributedEventsToBePublished = DistributedEvents.OrderBy(e => e.EventOrder).ToArray();
                DistributedEvents.Clear();
                await UnitOfWorkEventPublisher.PublishDistributedEventsAsync(
                    distributedEventsToBePublished
                );
            }

            //This is the place where I commented out.
            //await SaveChangesAsync(cancellationToken);
        }

        await CommitTransactionsAsync(cancellationToken);
        IsCompleted = true;
        await OnCompletedAsync();
    }
    catch (Exception ex)
    {
        _exception = ex;
        throw;
    }
}

Here is the test service method that I used to trigger the problem during my debug session;

[AllowAnonymous]
    [UnitOfWork(IsDisabled = true)]
public async Task<string> TestAsync(Guid id)
{
    try
    {
        var message = await _messageRepository.FindAsync(id);

        if (message == null)
            return "null";

        message.SetTitle(message.Title + "!");

        await _messageRepository.UpdateAsync(message, true);

        return message.Title;
    }
    catch (Exception e)
    {
        return e.Message + " -- " + e.InnerException?.Message;
    }
}

During my test above, data gets updated in db but the method never returns back to caller. I even tested by creating a new unitofwork instance using unitofworkmanager and manually triggering the completeasync method as described in your unitofwork documentation.

Can you advice me a solution for my problem?

Thanks Murat

Thanks

No related backlog item is listed about the update.

https://docs.abp.io/en/commercial/latest/road-map

  • ABP Framework version: v8.2
  • UI Type: Blazor WebApp
  • Database System: EF Core (SQL Server..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Hello,

I have created a new microservice project using the command below;

abp new BookStore -t microservice-pro -u blazor-webapp

The solution created successfully and there exists two projects in solution named BookStore.Blazor and BookStore.Blazor.Client

I also checked the following documentation;

https://docs.abp.io/en/abp/8.2/Migration-Guides/Abp-8-2-Blazor-Web-App#create-a-new-blazor-web-app

There is no project named xxx.Blazor.WebApp and xxx.Blazor.WebApp.Client as described in the document.

I assumed that xxx.Blazor.WebApp is the BookStore.Blazor project and xxx.Blazor.WebApp.Client is the BookStore.Blazor.Client in my solution. I tried to apply the steps described in the document depending on this assumption.

The steps described in the document does not seem to fit the files in the blazor projects in my solution.

For example there is no XXModule.cs in the BookStore.Blazor project but the document expects me apply some changes in the file.

So I applied the changes in client project. But for my oppinion, in the BookStore.Blazor.Client/BookStoreBlazorClientModule I expect the steps to be already applied as in the document since I have created a new microservice solution, there should be no migration need as described in document. I tried to apply the steps to this document, added PreConfigureServices method, altered ConfigureAuthentication, ran the abp bundle command, altered App.razor to share the access;_token etc.

The result is failure. These are the errors in console, when I tried to launch Blazor app in the chrome browser.

1 * Uncaught ReferenceError: bootstrap is not defined at 306 (VM63 global.js:39:71902) at n (VM63 global.js:39:72011) at 12 (VM63 global.js:39:19279) at n (VM63 global.js:39:72011) at 848 (VM63 global.js:39:32941) at n (VM63 global.js:39:72011) at 524 (VM63 global.js:39:18999) at n (VM63 global.js:39:72011) at VM63 global.js:39:72378 at VM63 global.js:39:72396

2 * crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Could not find 'resetLeptonXToolbar' ('resetLeptonXToolbar' was undefined). Error: Could not find 'resetLeptonXToolbar' ('resetLeptonXToolbar' was undefined). at https://localhost:44307/_framework/blazor.web.js:1:734 at Array.forEach (<anonymous>) at l.findFunction (https://localhost:44307/_framework/blazor.web.js:1:702) at b (https://localhost:44307/_framework/blazor.web.js:1:5445) at https://localhost:44307/_framework/blazor.web.js:1:3238 at new Promise (<anonymous>) at y.beginInvokeJSFromDotNet (https://localhost:44307/_framework/blazor.web.js:1:3201) at Object.ri [as invokeJSJson] (https://localhost:44307/_framework/blazor.web.js:1:165152) at https://localhost:44307/_framework/dotnet.runtime.8.0.6.qp5p9if9yx.js:3:178364 at Tl (https://localhost:44307/_framework/dotnet.runtime.8.0.6.qp5p9if9yx.js:3:179198) Microsoft.JSInterop.JSException: Could not find 'resetLeptonXToolbar' ('resetLeptonXToolbar' was undefined). Error: Could not find 'resetLeptonXToolbar' ('resetLeptonXToolbar' was undefined). at https://localhost:44307/_framework/blazor.web.js:1:734 at Array.forEach (<anonymous>) at l.findFunction (https://localhost:44307/_framework/blazor.web.js:1:702) at b (https://localhost:44307/_framework/blazor.web.js:1:5445) at https://localhost:44307/_framework/blazor.web.js:1:3238 at new Promise (<anonymous>) at y.beginInvokeJSFromDotNet (https://localhost:44307/_framework/blazor.web.js:1:3201) at Object.ri [as invokeJSJson] (https://localhost:44307/_framework/blazor.web.js:1:165152) at https://localhost:44307/_framework/dotnet.runtime.8.0.6.qp5p9if9yx.js:3:178364 at Tl (https://localhost:44307/_framework/dotnet.runtime.8.0.6.qp5p9if9yx.js:3:179198) at Microsoft.JSInterop.JSRuntime.<InvokeAsync>d__16`1[[Microsoft.JSInterop.Infrastructure.IJSVoidResult, Microsoft.JSInterop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext() at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args) at Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXTheme.Components.ApplicationLayout.SideMenu.Navigation.MobileWasmNavbar.SetMenuAndProfileAsync() at Volo.Abp.AspNetCore.Components.Web.LeptonXTheme.Components.ApplicationLayout.SideMenu.Navigation.MobileNavbar.OnInitializedAsync() at Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXTheme.Components.ApplicationLayout.SideMenu.Navigation.MobileWasmNavbar.OnInitializedAsync() at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync() at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

3 *

blazor.web.js:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Could not find 'initLeptonX' ('initLeptonX' was undefined). Error: Could not find 'initLeptonX' ('initLeptonX' was undefined). at https://localhost:44307/_framework/blazor.web.js:1:734 at Array.forEach (

I guess the steps in the migration document is not properly applicable for microservice projects.

So, how can I test the blazor-webapp in microservice projects?

Thanks Murat Gürer

Thanks for your answer. I have already set up Elastic APM and most of the loads and errors takes place in abp's token/handle method. It seems that there is a performance issue there. I hoped you may be avare of the issue. According to my findings, all the bottlenecks seems to occur in abp's built in endpoints. For me, the proplem is that Abp's oppeniddict implementation can not handle high load. Thanks.

  • ABP Framework version: v8.0.2
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server, PostgreSQL..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue: Hi there.

We are using abp framework microservice template and we already have about 20 microservices. Postgresql is our db system. When there are 1000+ active users, microservices loses connection to administration db. We face db timeouts on administration db, and microservices stops responding when connection to administration db fails. We have optimized the indexes on tables so that cpu, ram etc. compsumptions seem stable on db server, still we could not fix the timeout on administration db. The index usage on db seems fine (especially on administration db), and table scan on queries almost never occur. Queries takes the advantage of indexes on tables. There are more than 500K users on identity users table. OpenIdTokens, AuditLogs, PermissionGrants tables have almost 1.5M rows (each).

Do you have any suggestions to optimize the application on high load? Especially authserver and administration services fails to respond on high load. Because the identity, saas and administration microservices and databases are core essential part of the framework, we are somehow can not figure out why this core elements stuck on high load. We are also ready to purchase a detailed technical assistance from Abp team if possible.

We will be glad for any assistance.

Thanks Murat Gürer

Hi,

Everything works fine.

I also deleted subdomain cookies within a js interval of 500 ms.

Thanks.

Hi again.

Some progress made finally.

I have two issues now;

1 - I have applied the script on blazor project. Now cookies are dubled with subdomain and root domain. I have tried to delete the cookie for the subdomain but still cookies are doubled. Maybe it will be helpful to unsubscribe before new subscribtion.

function setCookie(name, value, domain, day = 365) {
    delete_cookie(name, '/', document.location.host);
    var expires = new Date();
    expires.setTime(expires.getTime() + (day * 24 * 60 * 60 * 1000));
    document.cookie = name + '=' + value + ';expires=' + expires.toUTCString() + ';domain=' + domain + ';path=/';
}
function get_cookie(name) {
    return document.cookie.split(';').some(c => {
        return c.trim().startsWith(name + '=');
    });
}
function delete_cookie(name, path, domain) {
    if (get_cookie(name)) {
        document.cookie = name + "=" +
            ((path) ? ";path=" + path : "") +
            ((domain) ? ";domain=" + domain : "") +
            ";expires=Thu, 01 Jan 1970 00:00:01 GMT";
    }
}

This issue is not big deal, because I see that theme is synchronised when I switch selected theme on blazor ui.

2 - On authserver project, I tried to apply the same javascript but I get an error indicating leptonx is not defined. I guess the flow is somehow different for auth-server project. This issue needs to be fixed, when I set theme on auth-server site, synchronisation gets broken again.

hi,,

that does not help.

still abp loptonx theme cookies are created for subdomain.

I could able to apply the code you provided from auth-server app. Changed the cookie name with the ones below. Still no chage. lpx_appereance lpx_loaded-css

I could not even apply the given code for blazor webassembly ui. Too many missing types.

I have traced all abp source codes, public/commercieal, and could not find where you place these cookies.

I beleive I am not the only one experiencing this problem, you should have more common, built-in solution for this theme synchronisation issue. Blazor ui and auth-server ui must also be out-of-phase for someone else.

Showing 11 to 20 of 69 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06