[GH-ISSUE #5003] [bug]:The desktop application cannot access the local API. #1905

Open
opened 2026-03-16 22:19:22 +03:00 by kerem · 9 comments
Owner

Originally created by @shixing2 on GitHub (Apr 17, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5003

Is there an existing issue for this?

  • I have searched existing issues and this bug hasn't been reported yet

Current behavior

In Windows 11, I want to access the local api, but it doesn't work. None of the options are working.

Steps to reproduce

Image

Logs and Screenshots


Environment

Production

Hoppscotch Version

Local

Interceptor

Native - Desktop App

Browsers Affected

Not applicable (Desktop app)

Operating System

Windows

Additional Information

No response

Originally created by @shixing2 on GitHub (Apr 17, 2025). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5003 ### Is there an existing issue for this? - [x] I have searched existing issues and this bug hasn't been reported yet ### Current behavior In Windows 11, I want to access the local api, but it doesn't work. None of the options are working. ### Steps to reproduce ![Image](https://github.com/user-attachments/assets/55182f7d-eb29-4e81-95b2-54c9239f5efd) ### Logs and Screenshots ```shell ``` ### Environment Production ### Hoppscotch Version Local ### Interceptor Native - Desktop App ### Browsers Affected Not applicable (Desktop app) ### Operating System Windows ### Additional Information _No response_
Author
Owner

@shixing2 commented on GitHub (Apr 17, 2025):

Image

<!-- gh-comment-id:2812007736 --> @shixing2 commented on GitHub (Apr 17, 2025): ![Image](https://github.com/user-attachments/assets/b95b5c60-416e-4017-a5b9-d801f32b5b24)
Author
Owner

@CuriousCorrelation commented on GitHub (Apr 17, 2025):

Hi @shixing2, could you please add a title for the bug report that summarizes the situation you are experiencing? Empty titles are difficult to track.

As I understand, you appear to be using both Hoppscotch Desktop app and Hoppscotch Agent simultaneously, which isn't the intended configuration. The Hoppscotch Agent is specifically designed to work with the Hoppscotch Web app, not the desktop app. The desktop app already has built-in capabilities via “Native” interceptor that make the Agent unnecessary. The docs provide a great walkthrough on these distributions.

I also notice you're trying to use a proxy to connect to the endpoint, but the proxy field appears to be empty in your settings page screenshot. If you don't actually need to proxy the requests, it is recommended to disable this option using the toggle shown above the field.

I'm also seeing that you aren't connecting to a local server but rather a server hosted on a domain, so unsure as to what you meant by "access to local api".

Could you clarify these with some more details about what you're specifically trying to accomplish? This would help a lot in determining the exact issue. Thanks!

<!-- gh-comment-id:2812139437 --> @CuriousCorrelation commented on GitHub (Apr 17, 2025): Hi @shixing2, could you please add a title for the bug report that summarizes the situation you are experiencing? Empty titles are difficult to track. As I understand, you appear to be using both Hoppscotch Desktop app and Hoppscotch Agent simultaneously, which isn't the intended configuration. The Hoppscotch Agent is specifically designed to work with the Hoppscotch Web app, not the desktop app. The desktop app already has built-in capabilities via “Native” interceptor that make the Agent unnecessary. The docs provide a great walkthrough on these distributions. I also notice you're trying to use a proxy to connect to the endpoint, but the proxy field appears to be empty in your settings page screenshot. If you don't actually need to proxy the requests, it is recommended to disable this option using the toggle shown above the field. I'm also seeing that you aren't connecting to a local server but rather a server hosted on a domain, so unsure as to what you meant by "access to local api". Could you clarify these with some more details about what you're specifically trying to accomplish? This would help a lot in determining the exact issue. Thanks!
Author
Owner

@shixing2 commented on GitHub (Apr 17, 2025):

desktop application cannot access the local API.
the same API can be successfully requested in Google Chrome.
What configuration is causing this issue?

Image

Image

<!-- gh-comment-id:2812547117 --> @shixing2 commented on GitHub (Apr 17, 2025): desktop application cannot access the local API. the same API can be successfully requested in Google Chrome. What configuration is causing this issue? ![Image](https://github.com/user-attachments/assets/e582ef6d-232a-4479-905e-ef828013fcb7) ![Image](https://github.com/user-attachments/assets/9bc88e1b-d3f2-4e6a-87fc-d6b1977d86ca)
Author
Owner

@CuriousCorrelation commented on GitHub (Apr 17, 2025):

Thanks for the update. The settings seems to be set correctly, although status code 502 can sometimes mean an issue with domain resolution. Could you please check if the generated cURL request is able to correctly connect to the server?

Here's an example of a GET request to https://echo.hoppscotch.io
Image

Image

<!-- gh-comment-id:2812576495 --> @CuriousCorrelation commented on GitHub (Apr 17, 2025): Thanks for the update. The settings seems to be set correctly, although status code `502` can sometimes mean an issue with domain resolution. Could you please check if the generated `cURL` request is able to correctly connect to the server? Here's an example of a `GET` request to `https://echo.hoppscotch.io` ![Image](https://github.com/user-attachments/assets/f3a0ef25-f7bb-49dd-9c5e-e62f51419fd7) ![Image](https://github.com/user-attachments/assets/d14ab28f-a480-40f1-a17d-eeb282b5fd13)
Author
Owner

@shixing2 commented on GitHub (Apr 17, 2025):

test result.

Image

Google Chrome request result

Image

test results using other tools

Image

<!-- gh-comment-id:2812718345 --> @shixing2 commented on GitHub (Apr 17, 2025): ### test result. ![Image](https://github.com/user-attachments/assets/dbf2a8d1-c8dc-413f-a712-c73cb1816d01) ### Google Chrome request result ![Image](https://github.com/user-attachments/assets/4f256967-6a47-4aed-972f-4f6ec796ddef) ### test results using other tools ![Image](https://github.com/user-attachments/assets/bff4eca4-8033-4f3e-b444-b48e434af942)
Author
Owner

@CuriousCorrelation commented on GitHub (Apr 17, 2025):

Thanks for running the diagnostics! This doesn't appear to be a resolution issue, let's investigate how the request is being handled differently between the two clients.

Could you help me:

  1. By sharing the request body you're using? Feel free to anonymize any sensitive data if required.
  2. Or even better, could you try making a test request to our echo server at https://echo.hoppscotch.io using both Web app and the desktop app with identical parameters and sharing the response? This would help a lot to understand the differences in how requests are being formed, transmitted and received. You can simply change the URL and keep everything as is to run this test.
<!-- gh-comment-id:2812772650 --> @CuriousCorrelation commented on GitHub (Apr 17, 2025): Thanks for running the diagnostics! This doesn't appear to be a resolution issue, let's investigate how the request is being handled differently between the two clients. Could you help me: 1. By sharing the request body you're using? Feel free to anonymize any sensitive data if required. 2. Or even better, could you try making a test request to our echo server at `https://echo.hoppscotch.io` using both Web app and the desktop app with identical parameters and sharing the response? This would help a lot to understand the differences in how requests are being formed, transmitted and received. You can simply change the URL and keep everything as is to run this test.
Author
Owner

@shixing2 commented on GitHub (Apr 18, 2025):

Thank you, please see the test results.

Image

Image

Image

<!-- gh-comment-id:2814369246 --> @shixing2 commented on GitHub (Apr 18, 2025): Thank you, please see the test results. ![Image](https://github.com/user-attachments/assets/b52f45dc-47f8-4bd1-b909-3233842ba5f3) ![Image](https://github.com/user-attachments/assets/3f53f440-67f0-4787-bd0d-10624057f1a3) ![Image](https://github.com/user-attachments/assets/51b853f4-adf0-4849-ba1d-68d5c4b0b1a4)
Author
Owner

@CuriousCorrelation commented on GitHub (Apr 18, 2025):

Hi @shixing2, thanks for the info!

I’m finding it a bit difficult to replicate this on my machine, even with setting up a local server with custom host files. All requests seems to be going through correctly. So perhaps this is an environment specific issue that is affecting native request calls.

The 502 Bad Gateway in some cases points to an internal proxy/gateway in the app's communication path still, where it’s receiving invalid response from an upstream server.
A workaround to try first would be using the direct IP address instead of the domain name, like so http://192.168.174.133:80/credit/v2/creditApply which might bypass potential domain handling issues.

No worries if that doesn't work, I'm working on a log rotation system for the desktop app that will provide much better insights into the communication path. This should be available in one of the upcoming releases and will definitely accelerate diagnosis of issues like this in the future.

<!-- gh-comment-id:2814872943 --> @CuriousCorrelation commented on GitHub (Apr 18, 2025): Hi @shixing2, thanks for the info! I’m finding it a bit difficult to replicate this on my machine, even with setting up a local server with custom host files. All requests seems to be going through correctly. So perhaps this is an environment specific issue that is affecting native request calls. The 502 Bad Gateway in some cases points to an internal proxy/gateway in the app's communication path still, where it’s receiving invalid response from an upstream server. A workaround to try first would be using the direct IP address instead of the domain name, like so `http://192.168.174.133:80/credit/v2/creditApply` which might bypass potential domain handling issues. No worries if that doesn't work, I'm working on a log rotation system for the desktop app that will provide much better insights into the communication path. This should be available in one of the upcoming releases and will definitely accelerate diagnosis of issues like this in the future.
Author
Owner

@CuriousCorrelation commented on GitHub (Apr 30, 2025):

Hello @shixing2, the latest update for the desktop app (v25.4.0) now includes file-based rotating logs, a feature specifically implemented to help diagnose environment-specific issues like the one you were experiencing.

If you're still experiencing this issue after trying the IP address workaround, please update to the latest version (v25.4.0) and if you can, share your anonymized logs here.

The log files are located at:

  • Windows: C:\Users\<username>\AppData\Local\io.hoppscotch.desktop\logs\io.hoppscotch.desktop.log
  • macOS: ~/Library/Logs/io.hoppscotch.desktop/io.hoppscotch.desktop.log
  • Linux: ~/.local/share/io.hoppscotch.desktop/logs/io.hoppscotch.desktop.log

For more info on this logging feature, see PR https://github.com/hoppscotch/hoppscotch/pull/5009

<!-- gh-comment-id:2841575272 --> @CuriousCorrelation commented on GitHub (Apr 30, 2025): Hello @shixing2, the latest update for the desktop app ([v25.4.0](https://hoppscotch.com/download)) now includes file-based rotating logs, a feature specifically implemented to help diagnose environment-specific issues like the one you were experiencing. If you're still experiencing this issue after trying the IP address workaround, please update to the latest version (v25.4.0) and if you can, share your anonymized logs here. The log files are located at: - Windows: `C:\Users\<username>\AppData\Local\io.hoppscotch.desktop\logs\io.hoppscotch.desktop.log` - macOS: `~/Library/Logs/io.hoppscotch.desktop/io.hoppscotch.desktop.log` - Linux: `~/.local/share/io.hoppscotch.desktop/logs/io.hoppscotch.desktop.log` For more info on this logging feature, see PR https://github.com/hoppscotch/hoppscotch/pull/5009
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1905
No description provided.