Open Closed

Microservice screen loading issue #3501


User avatar
0
Anuradha_Singh created

Microservice screen loading issue: New Order button not doing anything

  • ABP Framework version: 5.3.3
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hello ,

I follow steps mention in link https://docs.abp.io/en/commercial/latest/startup-templates/microservice/add-microservice to create a new microservice in my microservice project.

new microservice get created , I have also added the new order entity using abp suite,

my screen is looking like this

issue is New Order button is not opening the entry form, when I have checked the console it is showing jquery error -

jquery.js?_v=637949368116776328:4050 jQuery.Deferred exception: Cannot read properties of undefined (reading 'orders') TypeError: Cannot read properties of undefined (reading 'orders') at HTMLDocument.<anonymous> (https://localhost:44321/Pages/Orders/index.js?_v=637950237448713603:4:54) at mightThrow (https://localhost:44321/libs/jquery/jquery.js?_v=637949368116776328:3766:29) at process (https://localhost:44321/libs/jquery/jquery.js?_v=637949368116776328:3834:12) undefined jQuery.Deferred.exceptionHook @ jquery.js?_v=637949368116776328:4050 process @ jquery.js?_v=637949368116776328:3838 setTimeout (async) (anonymous) @ jquery.js?_v=637949368116776328:3872 fire @ jquery.js?_v=637949368116776328:3500 fireWith @ jquery.js?_v=637949368116776328:3630 fire @ jquery.js?_v=637949368116776328:3638 fire @ jquery.js?_v=637949368116776328:3500 fireWith @ jquery.js?_v=637949368116776328:3630 ready @ jquery.js?_v=637949368116776328:4110 completed @ jquery.js?_v=637949368116776328:4120

Reason of above error is window object not loading my newly created orderservice, it only loading productservice.

Please tell me what changes I have to make so that I can load my order screen.


3 Answer(s)
  • User Avatar
    0
    berkansasmaz created
    Support Team .NET Developer

    Can you run the following two commands in the YourProjectName.OrderService.HttpApi.Client project?

    Note: Before running the commands, make sure to write your OrderService's port in the {YourOrderServicePort} section and make sure the application is running.

    1. abp generate-proxy -t csharp -u https://localhost:{YourOrderServicePort} -m OrderService
    2. abp generate-proxy -t js -u https://localhost:{YourOrderServicePort} -m OrderService

    Afterward, it should be sufficient to run the project again.

    I'm creating an internal issue on the topic. Thanks for reporting it.

  • User Avatar
    0
    Anuradha_Singh created

    Hi,

    I have generated the client proxy as per your suggestion but showing the same error ,

    Please check attached screenshot.

    The process which I did is :

    [1] Run my main application.

    [2] Then I have open MyTestApp.OrderService project separately in VS2022 and open console for My.OrderService.HttpApi.Client

    I have run both the commands, which you have mentioned,

    abp generate-proxy -t csharp -u https://localhost:45127 -m OrderService
    abp generate-proxy -t js -u https://localhost:45127 -m OrderService
    

    I can now see ClientProxies folder pls refer screenshot

    [3] After this I have stopped my main project .

    [4] Again I have started main project.

    [5] Again not able to open the order form. Please refer screenshot.

    Please check and let me know why my project is not running now. Waiting for your response.

    Thanks !

    Anuradha

  • User Avatar
    0
    berkansasmaz created
    Support Team .NET Developer

    Any chance you could send your OrderService.Web/Pages/Orders/index.js and OrderService.HttpApi.Client/wwwroot/client-proxies/OrderService-proxy.js files?

Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35