-
-
Notifications
You must be signed in to change notification se 8000 ttings - Fork 4.9k
[bug]:The desktop application cannot access the local API. #5003
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
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! |
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:
|
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. 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. |
This PR adds a file-based logging system with size-based rotation to the desktop application. It essentially redirects existing diagnostic to size-based rotating files for troubleshooting environment-specific issues. Closes HFE-805 The desktop application currently lacks a persistent logging mechanism in production environments. Logs are only available through the development mode console. This PR will help diagnose issues reported in #4859, #4950, #5003, discussions #4984 and #4986. Mainly aiming to understand errors in specific environments that can't be reproduced in our testing setups. This implementation uses the tracing ecosystem (`tracing`, `tracing_subscriber`, `tracing_appender`) along with `file_rotate` to create log files in the platform's log directory. The logs are automatically rotated when they reach `10MB`, with a maximum of `5` files retained. Thinking 10 * 5 MB is reasonable disk usage while maintaining sufficient history. The system currently writes to both the console (with ANSI colors where supported) and to files (without ANSI formatting for readability). Log levels are currently controlled via the `RUST_LOG` environment variable, defaulting to "debug" when not specified. | OS | Log File Path | |---------|------------------------------------------------------| | 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` |
This PR adds a file-based logging system with size-based rotation to the desktop application. It essentially redirects existing diagnostic to size-based rotating files for troubleshooting environment-specific issues. Closes HFE-801 The desktop a 8000 pplication currently lacks a persistent logging mechanism in production environments. Logs are only available through the development mode console. This PR will help diagnose issues reported in #4859, #4950, #5003, discussions #4984 and #4986. Mainly aiming to understand errors in specific environments that can't be reproduced in our testing setups. This implementation uses the tracing ecosystem (`tracing`, `tracing_subscriber`, `tracing_appender`) along with `file_rotate` to create log files in the platform's log directory. The logs are automatically rotated when they reach `10MB`, with a maximum of `5` files retained. Thinking 10 * 5 MB is reasonable disk usage while maintaining sufficient history. The system currently writes to both the console (with ANSI colors where supported) and to files (without ANSI formatting for readability). Log levels are currently controlled via the `RUST_LOG` environment variable, defaulting to "debug" when not specified. | OS | Log File Path | |---------|------------------------------------------------------| | 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` |
This PR adds a file-based logging system with size-based rotation to the desktop application. It essentially redirects existing diagnostic to size-based rotating files for troubleshooting environment-specific issues. Closes HFE-801 The desktop application currently lacks a persistent logging mechanism in production environments. Logs are only available through the development mode console. This PR will help diagnose issues reported in #4859, #4950, #5003, discussions #4984 and #4986. Mainly aiming to understand errors in specific environments that can't be reproduced in our testing setups. This implementation uses the tracing ecosystem (`tracing`, `tracing_subscriber`, `tracing_appender`) along with `file_rotate` to create log files in the platform's log directory. The logs are automatically rotated when they reach `10MB`, with a maximum of `5` files retained. Thinking 10 * 5 MB is reasonable disk usage while maintaining sufficient history. The system currently writes to both the console (with ANSI colors where supported) and to files (without ANSI formatting for readability). Log levels are currently controlled via the `RUST_LOG` environment variable, defaulting to "debug" when not specified. | OS | Log File Path | |---------|------------------------------------------------------| | 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` |
This PR adds a file-based logging system with size-based rotation to the desktop application. It essentially redirects existing diagnostic to size-based rotating files for troubleshooting environment-specific issues. Closes HFE-801 The desktop application currently lacks a persistent logging mechanism in production environments. Logs are only available through the development mode console. This PR will help diagnose issues reported in #4859, #4950, #5003, discussions #4984 and #4986. Mainly aiming to understand errors in specific environments that can't be reproduced in our testing setups. This implementation uses the tracing ecosystem (`tracing`, `tracing_subscriber`, `tracing_appender`) along with `file_rotate` to create log files in the platform's log directory. The logs are automatically rotated when they reach `10MB`, with a maximum of `5` files retained. Thinking 10 * 5 MB is reasonable disk usage while maintaining sufficient history. The system currently writes to both the console (with ANSI colors where supported) and to files (without ANSI formatting for readability). Log levels are currently controlled via the `RUST_LOG` environment variable, defaulting to "debug" when not specified. | OS | Log File Path | |---------|------------------------------------------------------| | 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` |
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:
For more info on this logging feature, see PR #5009 |
Is there an existing issue for this?
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
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
The text was updated successfully, but these errors were encountered: