Activities of "improwise"

I have followed all the documentation and the application successfully runs but when I click on the login button i get the following error

I am even using ngrok so the backend is available on the web

System.InvalidOperationException Message=Error loading discovery document: Error connecting to https://<omited>.au.ngrok.io/.well-known/openid-configuration. An error occurred while sending the request..

When i go to that URL in browser I do get a response with off the openid-configuration

I recall that I had some similar problems when I by mistake used HTTP instead of HTTPS with Ngrok, but don't remember the details now. Also please note that VS 2022 Preview now has port tunnelling as well, closed beta though so you have to sign up to use it. That said, I recently had a discussion with some of the developers working on that and we agreed that they needed to make some improvements regarding OpenID in particular so might not be the best bet as of now.

Yes, it'll be included in v6.0 and it'll be released very soon.

Quick question, how do we keep track of changes between versions in the ABP Commercial as I would imagine those are never available via GitHub, neither as Issues nor code? By creating a new ABP Suite project I can see that this changes seem to be included now but would like to be able to track changes more in detail. Thanks.

We completed all the configurations in the template and add a section to the documentation about iOS configuration. With the new version, SecureStorage will be used in startup templates.

Great. thanks. Is that expected to make the version 6 release then?

Hi,

I can reproduce the problem and will create an internal issue to fix it, BTW your ticket was refunded.

Thanks.

This is the last output from ABP Suite you get

Building....: (1/1)M:\Projects\ASP.NET\ABP\src\TEST\aspnet-core\src\TEST.Blazor\TEST.Blazor.csproj Executing...: dotnet build M:\Projects\ASP.NET\ABP\src\TEST\aspnet-core\src\TEST.Blazor\TEST.Blazor.csproj MSBuild version 17.3.0+92e077650 for .NET Determining projects to restore... Restored M:\Projects\ASP.NET\ABP\src\TEST\aspnet-core\src\TEST.Application.Contracts\TEST.Application.Contracts.csproj (in 1,55 sec). Restored M:\Projects\ASP.NET\ABP\src\TEST\aspnet-core\src\TEST.HttpApi.Client\TEST.HttpApi.Client.csproj (in 2,1 sec). Restored M:\Projects\ASP.NET\ABP\src\TEST\aspnet-core\src\TEST.Blazor\TEST.Blazor.csproj (in 7,44 sec). 1 of 4 projects are up-to-date for restore. TEST.Domain.Shared -> M:\Projects\ASP.NET\ABP\src\TEST\aspnet-core\src\TEST.Domain.Shared\bin\Debug\netstandard2.0\TEST.Domain.Shared.dll TEST.Application.Contracts -> M:\Projects\ASP.NET\ABP\src\TEST\aspnet-core\src\TEST.Application.Contracts\bin\Debug\netstandard2.0\TEST.Application.Contracts.dll TEST.HttpApi.Client -> M:\Projects\ASP.NET\ABP\src\TEST\aspnet-core\src\TEST.HttpApi.Client\bin\Debug\netstandard2.0\TEST.HttpApi.Client.dll TEST.Blazor -> M:\Projects\ASP.NET\ABP\src\TEST\aspnet-core\src\TEST.Blazor\bin\Debug\net6.0\TEST.Blazor.dll TEST.Blazor (Blazor output) -> M:\Projects\ASP.NET\ABP\src\TEST\aspnet-core\src\TEST.Blazor\bin\Debug\net6.0\wwwroot

Build succeeded. 0 Warning(s) 0 Error(s)

Time Elapsed 00:00:13.07

Hi,

When you create a new project, the ABP suite will build the project, try to restore libs, and create initial migration files. so yes, it will lock the file and take a while(not long)

You need to wait until these steps are finished, then you can open the solution in VS2022 and do anything.

Yes I know, but in this case that never seems to happen. Have not experienced similar problems with previous versions of ABP Suite before version 6 RC3/4,

Hi,

Could you share the steps to reproduce? thanks.

Hi,

Basically just create a new solution in ABP Suite (Blazor WASM with MAUI mobile in our case), let it complete, then open the solution in VS2022 (both Preview and not Preview) and then try to build it there. You will get a lot of build errors because files are in use. Kill ABP Suite and rebuild and it all works. We have seen this multiple times when we have done some trial and error for other reasons and also with RC3. Maybe RC2 as well but don't remember.

Edit:

No errors from ABP Suite either, and the generated code seems to work fine, when files are not locked anymore.

  • ABP Framework version: 6.0.0-rc4
  • UI type: Blazor WASM
  • DB provider: SQL
    • Tiered (MVC) or Identity Server Separated (Angular): no

It seems ABP Suite 6.0 rc4 (and at least RC3 as well) are locking some files after generation, which leads to error messages when trying to build and not all of them are obvious that it is ABP Suite that is the reason for it, while some contain that information if you looks closely, like "XXXXX Exceeded retry count of 10. Failed. The file is locked by: "Volo.Abp.Suite (36088)"

Killing/restarting the ABP Suite process makes the error go away so it is no doubt about what is causing this, so as long as you know why this is, you can easily work around the problem.

Hi @improwise

As mentioned in article, Secure Storage requires platform-specific configuration. Preferences usage is for development purposes. You should replace it for production.

Even so that should probably be highlighted more than it is today, as I would assume that most people would assume that generated code is "best in class" and being ready for production (as ready as anything MAUI can be).

Just noticed that it was your community post I linked to :)

As I understand it, the MAUI mobile application generated by ABP Suite seem to use Preferences instead of SecureStorage for storing JWT tokens which AFAIK isn't the recommended way of doing it as it is not as secure as SecureStorage. There is even a community post about this

https://community.abp.io/posts/using-abp-client-proxies-in-maui-with-openid-connect-em7x1s8k

private async Task SetTokenCacheAsync(string accessToken, string refreshToken)
{
    await _storage.SetAsync(IssueTrackrConsts.OidcConsts.AccessTokenKeyName, accessToken);
    await _storage.SetAsync(IssueTrackrConsts.OidcConsts.RefreshTokenKeyName, refreshToken);
}

private async Task ClearTokenCacheAsync()
{
    await _storage.RemoveAsync(IssueTrackrConsts.OidcConsts.AccessTokenKeyName);
    await _storage.RemoveAsync(IssueTrackrConsts.OidcConsts.RefreshTokenKeyName);
}

public class DefaultStorage : IStorage, ITransientDependency
{
    public Task<string> GetAsync(string key)
    {
        return Task.FromResult(Preferences.Get(key, string.Empty));
    }

    public Task SetAsync(string key, string value)
    {
        Preferences.Set(key, value);
        return Task.CompletedTask;
    }

    public Task RemoveAsync(string key)
    {
        Preferences.Remove(key);
        return Task.CompletedTask;
    }
}
Showing 11 to 20 of 81 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11