[GH-ISSUE #1752] Send double request [bug] #557

Closed
opened 2026-03-16 15:58:41 +03:00 by kerem · 20 comments
Owner

Originally created by @hedior03 on GitHub (Aug 1, 2021).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1752

Originally assigned to: @AndrewBastin on GitHub.

Describe the bug
Every request I make from Hoppscotch is sent twice, 10ms apart.

To Reproduce
Steps to reproduce the behavior:

  1. Send a Request to a service in localhost
  2. Two requests are received instead of one

Expected behavior
Get one request.

Desktop (please complete the following information):

  • OS: MacOs
  • Browser: Brave Browser
  • Version 1.27.108 Chromium: 92.0.4515.107 (Official Build) (x86_64)
Originally created by @hedior03 on GitHub (Aug 1, 2021). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1752 Originally assigned to: @AndrewBastin on GitHub. **Describe the bug** Every request I make from Hoppscotch is sent twice, 10ms apart. **To Reproduce** Steps to reproduce the behavior: 1. Send a Request to a service in localhost 2. Two requests are received instead of one **Expected behavior** Get one request. **Desktop (please complete the following information):** - OS: MacOs - Browser: Brave Browser - Version 1.27.108 Chromium: 92.0.4515.107 (Official Build) (x86_64)
kerem 2026-03-16 15:58:41 +03:00
Author
Owner

@liyasthomas commented on GitHub (Aug 1, 2021):

Deu to CORS policy in browsers, every request has a Preflight request.

Please make sure if the first request was a pre-flight request. Read more about this behavior on StackOverflow.

<!-- gh-comment-id:890453132 --> @liyasthomas commented on GitHub (Aug 1, 2021): Deu to [`CORS`](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policy in browsers, every request has a [Preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request). Please make sure if the first request was a pre-flight request. [Read more about this behavior on StackOverflow](https://stackoverflow.com/questions/15381105/what-is-the-motivation-behind-the-introduction-of-preflight-cors-requests).
Author
Owner

@hedior03 commented on GitHub (Aug 2, 2021):

I appreciate your answer, I checked the documentation and it doesn't seem to be this, given that both requests are exactly the same method of my request (GET or POST), and Preflight should be a OPTIONS method request.

GET

[02/Aug/2021 05:26:54] "GET /circles/unam-fciencias/rides/ HTTP/1.1" 200 52
==================================================


GET

[02/Aug/2021 05:26:54] "GET /circles/unam-fciencias/rides/ HTTP/1.1" 200 52
<!-- gh-comment-id:890733951 --> @hedior03 commented on GitHub (Aug 2, 2021): I appreciate your answer, I checked the documentation and it doesn't seem to be this, given that both requests are exactly the same method of my request (GET or POST), and Preflight should be a OPTIONS method request. ``` GET [02/Aug/2021 05:26:54] "GET /circles/unam-fciencias/rides/ HTTP/1.1" 200 52 ================================================== GET [02/Aug/2021 05:26:54] "GET /circles/unam-fciencias/rides/ HTTP/1.1" 200 52 ```
Author
Owner

@liyasthomas commented on GitHub (Aug 2, 2021):

Thanks for the detailed explanation. May I know whether if you've enabled any Hoppscotch interceptors in Settings? "Proxy mode" or "Extensions" ?

<!-- gh-comment-id:890759741 --> @liyasthomas commented on GitHub (Aug 2, 2021): Thanks for the detailed explanation. May I know whether if you've enabled any Hoppscotch interceptors in [Settings](https://hoppscotch.io/settings)? "Proxy mode" or "Extensions" ?
Author
Owner

@hedior03 commented on GitHub (Aug 2, 2021):

Since I'm testing something locally, I'm using the extension. But not any proxy.

Screenshot

<!-- gh-comment-id:890813211 --> @hedior03 commented on GitHub (Aug 2, 2021): Since I'm testing something locally, I'm using the extension. But not any proxy. ![Screenshot](https://user-images.githubusercontent.com/6667132/127825732-e1e2c1bf-e81b-4161-8cb3-81855d213eb6.png)
Author
Owner

@liyasthomas commented on GitHub (Aug 2, 2021):

Thank you, we'll look into it.

<!-- gh-comment-id:890813981 --> @liyasthomas commented on GitHub (Aug 2, 2021): Thank you, we'll look into it.
Author
Owner

@hedior03 commented on GitHub (Aug 2, 2021):

I just fixed it. I reckon that i had the PWA installed and both (PWA and website) were executing the request once I pressed Send.

I checked from a private window and realising that it worked fine, tried deleting all PWA installed. The only remaining problem is that i can't replicate the error.

Apologies for the concerns and thanks for your time.

<!-- gh-comment-id:890838535 --> @hedior03 commented on GitHub (Aug 2, 2021): I just fixed it. I reckon that i had the PWA installed and both (PWA and website) were executing the request once I pressed Send. I checked from a private window and realising that it worked fine, tried deleting all PWA installed. The only remaining problem is that i can't replicate the error. Apologies for the concerns and thanks for your time.
Author
Owner

@liyasthomas commented on GitHub (Aug 2, 2021):

Glad it worked out. Will track this behaviour and fix it as soon as possible.

<!-- gh-comment-id:890846713 --> @liyasthomas commented on GitHub (Aug 2, 2021): Glad it worked out. Will track this behaviour and fix it as soon as possible.
Author
Owner

@GorvGoyl commented on GitHub (Sep 19, 2021):

@liyasthomas I'm facing the same issue i.e. every call I make from hoppscotch web client (using chrome extension) hits my local api server twice! Both the requests are of type POST. Issue doesn't happen if I use some desktop client like Postman. let me know if you need further details.
Also, should I post a new bug since you closed this issue?

<!-- gh-comment-id:922458150 --> @GorvGoyl commented on GitHub (Sep 19, 2021): @liyasthomas I'm facing the same issue i.e. every call I make from hoppscotch web client (using chrome extension) hits my local api server twice! Both the requests are of type `POST`. Issue doesn't happen if I use some desktop client like Postman. let me know if you need further details. Also, should I post a new bug since you closed this issue?
Author
Owner

@liyasthomas commented on GitHub (Sep 19, 2021):

@GorvGoyl please provide more details on the issue you're having.

<!-- gh-comment-id:922458518 --> @liyasthomas commented on GitHub (Sep 19, 2021): @GorvGoyl please provide more details on the issue you're having.
Author
Owner

@GorvGoyl commented on GitHub (Sep 19, 2021):

OS: Win 10
Browser: Microsoft Edge Browser
Version 93.0.961.47 (Official build) (64-bit)

@liyasthomas let me know if I missed something

<!-- gh-comment-id:922458984 --> @GorvGoyl commented on GitHub (Sep 19, 2021): OS: Win 10 Browser: Microsoft Edge Browser Version 93.0.961.47 (Official build) (64-bit) @liyasthomas let me know if I missed something
Author
Owner

@liyasthomas commented on GitHub (Sep 19, 2021):

@GorvGoyl let me know how to reproduce the issue. Also have you enabled any interceptor like browser extension / proxy?

<!-- gh-comment-id:922459749 --> @liyasthomas commented on GitHub (Sep 19, 2021): @GorvGoyl let me know how to reproduce the issue. Also have you enabled any interceptor like browser extension / proxy?
Author
Owner

@GorvGoyl commented on GitHub (Sep 19, 2021):

Yes, I'm using browser extension.

image

To reproduce this issue, You could create a local nodejs server in VSCode (I'm using Firebase cloud functions) and make the rest api call (POST) to it from Microsoft Edge browser using https://hoppscotch.io/ with it's browser extension installed.

<!-- gh-comment-id:922460809 --> @GorvGoyl commented on GitHub (Sep 19, 2021): Yes, I'm using browser extension. ![image](https://user-images.githubusercontent.com/7106086/133926207-4992a3dd-1bdd-4227-8640-b71ffaeb8c22.png) To reproduce this issue, You could create a local nodejs server in VSCode (I'm using [Firebase cloud functions](https://firebase.google.com/docs/functions)) and make the rest api call (`POST`) to it from Microsoft Edge browser using https://hoppscotch.io/ with it's browser extension installed.
Author
Owner

@liyasthomas commented on GitHub (Sep 19, 2021):

Thanks for the detailed information. Will let you know once it's fixed. Thank you.

<!-- gh-comment-id:922461233 --> @liyasthomas commented on GitHub (Sep 19, 2021): Thanks for the detailed information. Will let you know once it's fixed. Thank you.
Author
Owner

@mandaputtra commented on GitHub (Oct 1, 2021):

I can confirm that for now, this bug is resolved. I don't see any double request when I test. Using Brave Browser (with latest Chromium). It should behave the same for Microsoft Edge/Chrome since it is just chromium based browser.

Screenshot from 2021-10-01 08-57-10

Screenshot from 2021-10-01 08-59-12

<!-- gh-comment-id:931833122 --> @mandaputtra commented on GitHub (Oct 1, 2021): I can confirm that for now, this bug is resolved. I don't see any double request when I test. Using Brave Browser (with latest Chromium). It should behave the same for Microsoft Edge/Chrome since it is just chromium based browser. ![Screenshot from 2021-10-01 08-57-10](https://user-images.githubusercontent.com/23342943/135553825-4c90a4ef-033d-485f-a8e1-ef8e4a384a22.png) ![Screenshot from 2021-10-01 08-59-12](https://user-images.githubusercontent.com/23342943/135553986-73712ed1-82d0-406c-8565-298ab2314d7a.png)
Author
Owner

@mandaputtra commented on GitHub (Oct 5, 2021):

This actually somewhat reproducible somewhat not. Could you open this one again @liyasthomas ? I can reproduce it on my windows machine but not on my linux one. Same browser ~ in the meantime I'll figure it out why it happen.

<!-- gh-comment-id:934188459 --> @mandaputtra commented on GitHub (Oct 5, 2021): This actually somewhat reproducible somewhat not. Could you open this one again @liyasthomas ? I can reproduce it on my windows machine but not on my linux one. Same browser ~ in the meantime I'll figure it out why it happen.
Author
Owner

@liyasthomas commented on GitHub (Oct 5, 2021):

Feel free to reopen if you can provide steps to reproduce the issue.

<!-- gh-comment-id:934194941 --> @liyasthomas commented on GitHub (Oct 5, 2021): Feel free to reopen if you can provide steps to reproduce the issue.
Author
Owner

@long2ice commented on GitHub (Oct 30, 2021):

Same issue here, use chrome PWA, but everything is fine after reinstall PWA

<!-- gh-comment-id:955167445 --> @long2ice commented on GitHub (Oct 30, 2021): Same issue here, use chrome PWA, but everything is fine after reinstall PWA
Author
Owner

@LaPoPvLe commented on GitHub (Mar 22, 2022):

same issue
in chrome, this is fine.
but pwa still send double request.like replay all request's header and content is same, not options method in cross domain.

<!-- gh-comment-id:1074767176 --> @LaPoPvLe commented on GitHub (Mar 22, 2022): same issue in chrome, this is fine. but pwa still send double request.like replay all request's header and content is same, not options method in cross domain.
Author
Owner

@levrik commented on GitHub (Feb 27, 2023):

Having the same issue. I might had installed Hoppscotch as PWA before already but I'm not sure if it was on this exact device. The interesting part is that if I disable using the extension, a single POST request still hits the locally running backend but the UI tells me that it was unable to reach the endpoint (which is not true).

image
<!-- gh-comment-id:1446548486 --> @levrik commented on GitHub (Feb 27, 2023): Having the same issue. I might had installed Hoppscotch as PWA before already but I'm not sure if it was on this exact device. The interesting part is that if I disable using the extension, a single `POST` request still hits the locally running backend but the UI tells me that it was unable to reach the endpoint (which is not true). <img width="557" alt="image" src="https://user-images.githubusercontent.com/9491603/221607865-c5f24e5c-f805-48ad-8616-a07dea68027d.png">
Author
Owner

@KrofDrakula commented on GitHub (Jan 25, 2024):

I just reproduced this bug when using Hoppscotch as a Chrome PWA with the browser extension used as proxy with no additional configuration.

Uninstalling the PWA and then reinstalling it looks like it resolved the issue for me so far.

<!-- gh-comment-id:1910109791 --> @KrofDrakula commented on GitHub (Jan 25, 2024): I just reproduced this bug when using Hoppscotch as a Chrome PWA with the browser extension used as proxy with no additional configuration. Uninstalling the PWA and then reinstalling it looks like it resolved the issue for me so far.
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#557
No description provided.