[GH-ISSUE #5866] [bug]: Errors in post-request script persist #2305

Closed
opened 2026-03-16 23:54:36 +03:00 by kerem · 3 comments
Owner

Originally created by @waquner on GitHub (Feb 11, 2026).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5866

Originally assigned to: @jamesgeorge007 on GitHub.

Is there an existing issue for this?

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

Platform

Desktop App

Browser

Chrome

Operating System

Windows

Bug Description

What happened

When adding a post-request script which results in an error (e.g. foo();), after fixing the error or sometimes even after clearing the script, the test results pane says that there was an error. Sometimes closing an re-opening the request tab helps, most of the times only a restart of the app helps

Console error messages

message: "cannot convert to object" name: "TypeError" stack: "    at <anonymous> (eval.js:1945)\n" [[Prototype]]: 
Object

Steps to reproduce

  • Add new request
  • Leave the Echo URL as it is (https://echo.hoppscotch.io)
  • Add a post-request script with an intentional error (e.g. foo();)
  • Run request
  • --> Error
  • Clear post-request script or fix error
  • Run request again
  • --> Error persists

Deployment Type

Hoppscotch Cloud

Version

v2026.1.1

https://github.com/user-attachments/assets/82567b3f-d0f7-4c1e-b70b-417848d49afb

Originally created by @waquner on GitHub (Feb 11, 2026). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5866 Originally assigned to: @jamesgeorge007 on GitHub. ### Is there an existing issue for this? - [x] I have searched existing issues and this bug hasn't been reported yet ### Platform Desktop App ### Browser Chrome ### Operating System Windows ### Bug Description ## What happened When adding a post-request script which results in an error (e.g. `foo();`), after fixing the error or sometimes even after clearing the script, the test results pane says that there was an error. Sometimes closing an re-opening the request tab helps, most of the times only a restart of the app helps ## Console error messages ``` message: "cannot convert to object" name: "TypeError" stack: " at <anonymous> (eval.js:1945)\n" [[Prototype]]: Object ``` ## Steps to reproduce - Add new request - Leave the Echo URL as it is (`https://echo.hoppscotch.io`) - Add a post-request script with an intentional error (e.g. `foo();`) - Run request - --> Error - Clear post-request script or fix error - Run request again - --> Error persists ### Deployment Type Hoppscotch Cloud ### Version v2026.1.1 https://github.com/user-attachments/assets/82567b3f-d0f7-4c1e-b70b-417848d49afb
kerem 2026-03-16 23:54:36 +03:00
Author
Owner

@jamesgeorge007 commented on GitHub (Feb 11, 2026):

Thanks for reporting and for the reproduction steps. We'll be investigating. This could be related to #5810. Please try opting out of the Experimental scripting sandbox, as mentioned here.

<!-- gh-comment-id:3885501901 --> @jamesgeorge007 commented on GitHub (Feb 11, 2026): Thanks for reporting and for the reproduction steps. We'll be investigating. This could be related to #5810. Please try opting out of the Experimental scripting sandbox, as mentioned [here](https://github.com/hoppscotch/hoppscotch/issues/5810#issuecomment-3833328182).
Author
Owner

@jamesgeorge007 commented on GitHub (Feb 24, 2026):

Quick update: This has been addressed in #5874 and is scheduled for the upcoming major release.

<!-- gh-comment-id:3953777314 --> @jamesgeorge007 commented on GitHub (Feb 24, 2026): Quick update: This has been addressed in #5874 and is scheduled for the upcoming major release.
Author
Owner

@jamesgeorge007 commented on GitHub (Feb 26, 2026):

Closing since this is addressed in the v2026.2.0 release.

<!-- gh-comment-id:3965981346 --> @jamesgeorge007 commented on GitHub (Feb 26, 2026): Closing since this is addressed in the [v2026.2.0](https://github.com/hoppscotch/hoppscotch/releases/tag/2026.2.0) release.
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#2305
No description provided.