thunder-client-support icon indicating copy to clipboard operation
thunder-client-support copied to clipboard

Local Caddy with Https not working "Couldn't resolve the hostname to an IP address"

Open BilalBudhani opened this issue 1 year ago • 7 comments

Question:

Hello, I'm running the Caddy server locally to proxy a project with multiple subdomains.

While I'm able to open Caddy configured domain project.localhost in the browser and via curl in the terminal. However, I'm unable to query it via Thunder Client.

I get the following error image

I tried changing the underlying http-library as recommended in other issues but no success

image

What am I missing?

Are you using the free version/paid version/trial:

BilalBudhani avatar Jan 22 '24 11:01 BilalBudhani

Hi @BilalBudhani

try these solutions https://github.com/rangav/thunder-client-support/blob/master/docs/common-issues.md

rangav avatar Jan 23 '24 16:01 rangav

Thanks for response @rangav

I'm actually sending requests to a subdomain like api.project.localhost which is why I can't send it via 0.0.0.0 or any other local IP.

BilalBudhani avatar Jan 24 '24 09:01 BilalBudhani

@BilalBudhani I have implemented a fix in v2.17.2, can you please test it and let me know if it's working or not?

How to use

  1. Update Extension to v2.17.2
  2. From Vs Code Settings Enable setting Preview Features ( see screenshot below)
  3. Change Http Libary to Axios in Vs Code setting
  4. Now test the localhost URL and let me know your feedback.
Screenshot 2024-01-31 at 16 25 07

rangav avatar Jan 31 '24 16:01 rangav

Hey @rangav I appreciate you looking into this issue. I tried following all the above mentioned steps but unfortunately, the problem persists.

image image

BilalBudhani avatar Feb 01 '24 10:02 BilalBudhani

Thanks for testing, can share logs data in output window if possible

Screenshot 2024-02-01 at 10 24 51

rangav avatar Feb 01 '24 10:02 rangav

Here it is

---------------- Running Request: ----------------
Environment Used: development (Active)
Request Url: https://api.project.localhost/v2/path
Method: GET
Request Headers:
{
  "Accept": "*/*",
  "User-Agent": "vscode",
  "x-api-key": "[redacted]"
}
Request Body:
{
  "uuid": "[redacted]"
}

I guess there ain't much to work with

BilalBudhani avatar Feb 01 '24 11:02 BilalBudhani

I have updated the code again to fix localhost issues in update v2.17.5

Can you test again with axios and got and let me know your feedback.

You can use the DNS Test command to verify the IP used https://github.com/rangav/thunder-client-support/releases/tag/v2.17.5

Please test and let me know your feedback.

rangav avatar Feb 03 '24 15:02 rangav

Closing this issue let me if you still have any problems

rangav avatar Feb 27 '24 04:02 rangav