Azure / api-management-developer-portal

Developer portal provided by the Azure API Management service.
MIT License
478 stars 305 forks source link

Facing Unable to complete the request in test console(try it) of developer portal for apis that takes longer time to process request. #2481

Open NagendraBabuRayabarapu opened 1 month ago

NagendraBabuRayabarapu commented 1 month ago

Bug description

We are getting Unable to complete the request in test console of developer portal for apis that takes longer time to process request. I could see below error in console : (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received.

One of our API has complex business logic built so it is taking a bit longer to produce the response. I have tested this API from Postman where it is working and giving the response. but in test console i am getting Unable to complete the request.

Reproduction steps

  1. Configure an API that takes around 20 sec to process request.
  2. Go to interactive API test console in API details page.
  3. Send a request to that API
  4. See error

Expected behavior

I should be getting the response from API although it takes a bit late.

Is your portal managed or self-hosted?

Managed

Release tag or commit SHA (if using self-hosted version)

[e.g., release 2.0.0, commit c45da9778b70d369aba60fa2e63c191efe2b548f]

API Management service name

Environment

Additional context

image

PavanMoturu commented 3 weeks ago

I am getting same issue for a basic api request also.

I have an Apim. I created a custom domain for developer portal to access outside vm but inside from my organization. I enabled "Use Cors Proxy" in operational details of apim as mentioned in https://learn.microsoft.com/en-us/azure/api-management/enable-cors-developer-portal#cors-proxy-option

When I try to test an api, I am getting "Unable to complete request" error.

Can someone look into this issue please?