Unable to make request in local

I am unable to make a request on the custom installation page locally. It always throws an error like Error in establishing connections(502). The request made through the client.request method. But if we make the same call using Javascript native method like fetch, it gives us a successful response. This same code works fine in another machine even using the client.request method. But this wasn’t working on my machine. All this happened, when I updated the FDK (v:6.2.2) . After this, I have installed the older FDK version 6.0.2 also. Still, I am unable to make the request calls. This is happening for all the apps running locally. Are there any ways to fix this issue?
Fdk version 6.2.2

Thanks you for reaching out and participating here, Sheik. First, let me welcome you to the Freshworks Developer Community!

It would help if you added some further information here describing the problem and the symptoms in greater detail.

  1. You said that it worked on another machine. Were you using the same FDK version (6.2.2) on both the machine?
  2. Is there any difference in the setup for the 2 machines you tested on? For example, one is connected to your office network while the other is connected to your home network.
  3. What is the request URL that client.request fails with? Are there multiple URLs that fail?
  4. Could you probably share more detailed logs from the browser console from when this error occurs?

We should hopefully be able to quickly arrive at a solution based on these details.

1 Like

I am facing this issue when I updated the FDK(v:6.2.2) recently. It is failing for all the request made through the client.request method. I tried the same code in one of a colleague machines with the FDK(v:6.0.2), it works fine and this machine was connected to his home network. So I decided to uninstall the latest FDK and reinstall with the older version. I have tried with FDK version 6.0.2 and 6.2.1 but this also failed to resolve this issue. To find out the issue, I tried with my other machine which has been installed with the FDK(v:6.2.1) and this machine was connected to my home network. It works fine in that machine. I have attached the video and screenshot below for your reference
Tested with FDK(v:6.2.2) Connected to my home network

Hi,

Can you help us with some more logs? Please use NODE_DEBUG=fdk fdk run instead of fdk run. This would log a lot of things on the terminal. Please run the app as you did and send us the logs. We will try our best to identify the issue. Meanwhile, you can upload the app as a custom app in your product to see it in action.

Thanks!

1 Like

I am unable to upload the app as a custom app in my helpdesk. I am getting an email like Your custom app could not be published due to a technical issue. But I am able to pack the app successfully(App packed successfully at /dist/Whatsapp.zip).

Here is the detailed log for your reference
Log
We have created a ticket for this issue in the support.freshdesk.com and the ticket id is 5976625.

1 Like

Hi,

I checked the logs and seems like the calls are getting timed-out. We have a 5-second timeout limit set for the FDK. If your call does not finish within that, an error is thrown. This maybe due to multiple reasons. Network latency is one. Can you maybe try simpler Request calls like making a get call to https://postman-echo.com/get?foo1=bar1&foo2=bar2 to find out whether client.request works at all. Also try a different network.

Thanks

1 Like