[PR #2921] [MERGED] fix: response time for requests via extension has incorrect value #4141

Closed
opened 2026-03-17 01:42:21 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/2921
Author: @aitchnyu
Created: 2/13/2023
Status: Merged
Merged: 2/17/2023
Merged by: @AndrewBastin

Base: mainHead: timing-bug


📝 Commits (2)

  • 72eced1 fix: response time was showing an impossible high value
  • 347188f chore: remove extra vue shim definition in shims.d.ts

📊 Changes

3 files changed (+10 additions, -11 deletions)

View changed files

📝 packages/hoppscotch-common/src/components/http/Request.vue (+7 -0)
📝 packages/hoppscotch-common/src/helpers/strategies/ExtensionStrategy.ts (+1 -1)
📝 packages/hoppscotch-common/src/shims.d.ts (+2 -10)

📄 Description

Closes #2897

Description

The reported bug was in the extension. If one request had failed to return a response, second request shows a huge response time and threw an error. We guessed some object whose reference was shared between requests. Calling the cancelRequest() on the extension fixed the response time problem and the error.

Fixed the typing interface for window.__POSTWOMAN_EXTENSION_HOOK__ with correct method name . Exported the window typing, seems it wasn't previously doing anything.

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

Additional Information


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/2921 **Author:** [@aitchnyu](https://github.com/aitchnyu) **Created:** 2/13/2023 **Status:** ✅ Merged **Merged:** 2/17/2023 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `main` ← **Head:** `timing-bug` --- ### 📝 Commits (2) - [`72eced1`](https://github.com/hoppscotch/hoppscotch/commit/72eced12882a6f14ada2c45a20e73ad8beb55a43) fix: response time was showing an impossible high value - [`347188f`](https://github.com/hoppscotch/hoppscotch/commit/347188f34e6d47d465437ebf5fe51d94423d6bd6) chore: remove extra vue shim definition in shims.d.ts ### 📊 Changes **3 files changed** (+10 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/src/components/http/Request.vue` (+7 -0) 📝 `packages/hoppscotch-common/src/helpers/strategies/ExtensionStrategy.ts` (+1 -1) 📝 `packages/hoppscotch-common/src/shims.d.ts` (+2 -10) </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> <!-- If this pull request closes an issue, please mention the issue number below --> Closes #2897 ### Description <!-- Add a brief description of the pull request --> The reported bug was in the extension. If one request had failed to return a response, second request shows a huge response time and threw an error. We guessed some object whose reference was shared between requests. Calling the `cancelRequest()` on the extension fixed the response time problem and the error. Fixed the typing interface for `window.__POSTWOMAN_EXTENSION_HOOK__` with correct [method name](https://github.com/hoppscotch/hoppscotch-extension/blob/main/src/index.ts#L265) . Exported the `window` typing, seems it wasn't previously doing anything. <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Checks <!-- Make sure your pull request passes the CI checks and do check the following fields as needed - --> - [x] My pull request adheres to the code style of this project - [ ] My code requires changes to the documentation - [ ] I have updated the documentation as required - [x] All the tests have passed ### Additional Information <!-- Any additional information like breaking changes, dependencies added, screenshots, comparisons between new and old behaviour, etc. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 01:42:21 +03:00
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#4141
No description provided.