flawiddsouza / Restfox

Offline-First Minimalistic HTTP & Socket Testing Client for the Web & Desktop

Home Page:https://restfox.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Windows - After recent updates to 0.3.x of Restfox, get "Error: Request Failed" on every query. Downgrading to Restfox 0,2,1 fixes this

AlanChiu-TELUS opened this issue · comments

Firstly, how about a way to see which version of Restfox is currently running?

As for the actual issue.

Friday Dec 1st, everything is working. Leave for work over the weekend, come back Monday morning, notice two updates to RF. Then all queries from 4 different sites stop working. Coworkers who don't use Restfox and in the same working environment as I am on have no issues with the same sites. I spend all day troubleshooting, contacting our firewall/proxy admin, the external sites admins to ask if there were any changes on their end. No changes over the weekend.

I download what I assume was the version I had on Friday (0.2.1) and ALL of my queries work again. But of course, since updates are automatic with NO WAY TO TURN THEM OFF (except clicking LATER, but when I relaunch RF, or restart my PC I am FORCED to use the latest version again). In any case, whenever I am forced to use the new version or download .3.0 or .3.1 and use them my requests keep failing.

The error on all of my queries are:
Error: Request failed
Possible causes for this error:

  1. Given request URL is incorrect or invalid
  2. The server for the url isn't returning a valid response for the created request
  3. The server for the url has an expired or invalid ssl certificate

When I use 0.2.1 my requests go through fine. I've tried to check "Disable SSL Verification" under settings and this still happens.

Extremely sorry that you're facing this issue.

There was an architecture change on how the requests are made from 0.2 to 0.3. To allow for better more unrestricted requests. Seems like that is causing the issue.

Without a reproduction url, I'm not able to fix this issue. Since it's specific to your servers.

I will be testing different urls to reproduce this. But my testing so far is showing no errors.

Please import the below restfox export and see if it works and confirm if the issue you've raised is specific to your servers or is a general one. Since this imported request should work. As I have installed the latest windows version of Restfox and tested it. If it does not work, then there might be something else going on.

Restfox export: Restfox_2023-12-06.json

As a temporary workaround, I'm attaching a windows build of Restfox 0.2.1 with updates disabled. Please use it until we can understand what the issue is.

https://github.com/flawiddsouza/Restfox/releases/download/v0.2.1/Restfox-0.2.1.Setup-no_auto_update.exe

I try my best to test as much as possible before releasing an update. I tested against different APIs before deploying the new version. I really want to fix this. I would be extremely grateful if you can help debug this when you find some time.

Any info about the servers you're accessing would be good. Like what framework & language the servers are using. To reproduce the issue.

HI. Thanks for the quick reply. The query you provided that uses httpbin.org/post also exhibits the same behaviour. Works on 0.2.1 but fails on 0.3.x.

Some info on the servers I use. They both use bearer tokens but I the endpoint to get the token also exhibits this behaviour, as do the actual endpoints themselves. Usually if there's a token error it would say invalid token.

I have attached 4 exports from Restfox I use - 2 are bearer token requests from 2 different production servers, 2 are API endpoint requests from one of the production servers.

sample_API_request-1.json
sample_bearer_token_request-server2.json
sample_bearer_token_request-server1.json
sample_API_request-2.json

I noticed that even if I uninstall and reinstall RF, that my workspaces and settings remain. Is there a way to do a complete wipe and clean install of RF?

If the httpbin endpoint is exhibiting similar behaviour. Just to check. Can you try the same APIs on a different windows system with the latest version of Restfox, on the same network? I have a suspicion network requests are getting blocked on the os level.

Then as a 2nd test, if the above doesn't work can you try on a different windows system on a different network? I want to know if something changes.

In windows, for clearing your user data, you'll have to go to %APPDATA% and delete the Restfox folder. Restfox should recreate it when you open it again. All your settings and workplaces should be reset. Currently there's no such option in the installer or the uninstaller. Sadly a limitation of electron's default packager. It doesn't provide much control over the process.

Ok. So some more troubleshooting. I work from home so I use a corporate VPN (Cisco AnyConnect) to log in. When I am off VPN, one set of servers works, but the other does not. But the non-working server is expected because there is an IP whitelist for that server. So it looks like the VPN is blocking traffic. How does your architecture change between 0.2.1 and 0.3.0 change a request query that my VPN blocks it?

Could it be an SSL thing? Is it possible that your checkbox for 0.3.x for disable SSL checking doesn't actually work? I noticed that 0.2.1 does not have that checkbox. Does 0.2.1 have strict SSL checking? The servers I connect to though do have valid certs... so this is probably not the issue.

Could it be an SSL thing? Is it possible that your checkbox for 0.3.x for disable SSL checking doesn't actually work? I noticed that 0.2.1 does not have that checkbox. Does 0.2.1 have strict SSL checking? The servers I connect to though do have valid certs... so this is probably not the issue.

Regarding the disable SSL checkbox, you can test it using https://badssl.com. Just do a GET to https://self-signed.badssl.com. Should give different result when the checkbox is ticked and when it isn't. Without your VPN of course.

Ok. So some more troubleshooting. I work from home so I use a corporate VPN (Cisco AnyConnect) to log in. When I am off VPN, one set of servers works, but the other does not. But the non-working server is expected because there is an IP whitelist for that server. So it looks like the VPN is blocking traffic. How does your architecture change between 0.2.1 and 0.3.0 change a request query that my VPN blocks it?

So the issue is the VPN. I tried to connect to a vpn only ip address through the latest windows version and was able to reach it just fine. Not really sure what's going in.

The architecture change was using electron bundled node's fetch implementation instead of electron bundled chromium's fetch. This allows us to pass headers like User-Agent and Cookie. Otherwise, these headers are ignored when we make a request. Logically, this should not cause issues with the VPN but I don't know what the internal differences are. Maybe there's a bug in the fetch implementation in Node 20.

I think I'll provide a toggle to switch to the old fetch in the Settings. That way you can continue to use it, and get the latest fixes and updates.

Please let me know when you have a test build with this toggle and I will gladly help you test it. Thanks for being so on top of this.

Please try the new version: https://github.com/flawiddsouza/Restfox/releases/download/v0.3.2/Restfox-0.3.2.Setup.exe

image

Closing this issue for now. Though this is just a workaround, I feel like a fix won't be possible until I can reproduce it on my environment.

This workaround does the trick.

Thanks so much again for your quick response and turnaround time!

Maybe related, maybe not: I have a WildFly server running at http://localhost:8080, and RestFox reports the initial error for those API calls. Switching to "Chromium Fetch" fixes it. No SSL certificates involved here.
What do you think? Is this the "official" way to resolve it, or should I create a new issue?

Hey @WolfgangHG I think it's best if you create a new issue for this. By the way, you mention "initial error". Does this mean, api calls to that server work after the first few tries? Or do they work only when Chromium Fetch is ticked?

Done: #94
@flawiddsouza Nope, the calls fail every time without Chromium Fetch. They work only if the option is checked.