Starts in:
0 DAY
22 HRS
14 MIN
21 SEC
Starts in:
0 D
22 H
14 M
21 S
Open Closed

Generating client proxy gives error "The API description of the Namespace.IAppService.ActionNameAsync method was not found!" #4535


User avatar
0
jeffbuot created
  • ABP Framework version: v7.0.1
  • UI type: Blazor Server
  • DB provider: EF Core
  • Project Template: Microservice
  • Steps to reproduce the issue:"
    • Created new microservice project template from abp suite
    • Updated the connection strings to correct db
    • Added microservice project "Global"
    • Added entities to domain in Global.Domain
    • Added repositories to Global.EfCore
    • Added services for Global.Application.Contracts and Global.Application
    • Added controller to Global.HttpApi
    • Run the host for Global
    • Generated client proxy with this command abp generate-proxy -t csharp -u https://localhost:44395/ -m globalService
    • Used the generated client proxy on a wpf app that is already added as application client in openiddict Identity Service. Theb this annoying error happens: The API description of the CmvPoint.GlobalService.Controllers.IDataReferenceAppService.GetNextReferenceIdAsync method was not found!

Even trying to change the configuration on the client module using AddStaticHttpClientProxies and AddHttpClientProxies isn't working.


15 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Used the generated client proxy on a wpf app that is already added as application client in openiddict Identity Service. Theb this annoying error happens:

    Can you share the WPF appsettings.json file content(RemoteServices section) and the globalServicegenerate-proxy.json file content?

    ps: it's better if you can share a project that can reproduce the problem with me, shiwei.liang@volosoft.com I can check it quickly.

  • User Avatar
    0
    jim created

    Hello, Jeff and I are team members, however he is now unable to respond.

    Here is the appsettings.json file

    {
      "ConnectionStrings": {
        "ProductService": "mongodb://root:root123@localhost:27017/CMVPoint_ProductService?authSource=admin"
      },
      "RemoteServices": {
        "Default": {
          "BaseUrl": "https://localhost:44325/"
        }
      },
      "IdentityServer": {
        "AuthUri": "https://localhost:44322",
        "GatewayUri": "https://localhost:44325",
        "BrowserPort": 54955,
        "Oidc": {
          "RedirectUri": "http://127.0.0.1:54955/signin-oidc",
          "ClientId": "CmvPoint_WpfClient",
          "ClientSecret": "1q2w3e*",
          "Scope": "openid profile email ProductService AdministrationService IdentityService ShareholderService GlobalService"
        }
      }
    }
    
  • User Avatar
    0
    jim created

    In the meanwhile, here is globalServicegenerate-proxy.json. This is too long to put here, so I've uploaded it to Google Drive instead.

    https://drive.google.com/file/d/1TQV3-oQe4Pry6DYTYFgqMsKAkPV4Fa3T/view?usp=sharing

    Thank You!

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    1. Check the global service HttpApiClient module, and make sure AddStaticHttpClientProxies instead of AddHttpClientProxies

    2. As you described, you generated the proxy on the WPF app, ABP loads proxy files from the virtual file system. you need to configure the virtual file system:

    Configure<AbpVirtualFileSystemOptions>(options =>
    {
        options.FileSets.AddEmbedded<WpfAppModule>();
    });
    

    Use JSON files as embedded resources

    .

    Or you can generate the proxy files on the global service HttpApiClient project.

  • User Avatar
    0
    jim created

    Hello,

    We Already been configured the AddStaticHttpClientProxies and we also had the

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Can we have a meeting via zoom? I'd like to check it remotely. shiwei.liang@volosoft.com

  • User Avatar
    0
    jim created

    Hello, Yes sure, I'll send you an invitation.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    https://us05web.zoom.us/j/89547175766?pwd=RVpQd3A2WXo0LzBLVk9vMk4xSExRZz09

  • User Avatar
    1
    liangshiwei created
    Support Team Fullstack Developer

    Try:

    abp generate-proxy -t csharp -u https://localhost:44395/ -m globalService --without-contracts

  • User Avatar
    1
    liangshiwei created
    Support Team Fullstack Developer

    After my check, the ABP CLI is no problem.

    I think you changed the proxy namespace generated by ABP.

    You can always use --without-contracts option to avoid generating unnecessary files

  • User Avatar
    0
    jeffbuot created

    Hi,

    I did not change the generated client proxy's namespace.

  • User Avatar
    0
    jeffbuot created

    Hi, I tried using --without-contracts, it's weird I'm getting this exception:

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    I don't think the problem is related to this. I had a meeting with @jim before and it works. you can ask him.

  • User Avatar
    0
    jeffbuot created

    Yeah I asked him it was working on his machine but not mine 🤔, we checked the same commit.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    You can check the error log.

    If you still facing the problem, you can create a new question for this.

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