[GH-ISSUE #1887] [Scripting] Error when using built-in Promise #1879

Open
opened 2026-03-03 19:55:08 +03:00 by kerem · 1 comment
Owner

Originally created by @NghiaTranUIT on GitHub (Dec 18, 2023).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1887

Originally assigned to: @NghiaTranUIT on GitHub.

Description

Proxyman accidentally overrides the built-in Promise from the Scripting Tool -> Cause many unexpected error.

Steps to Reproduce

  1. Create a script
async function testPromise() {
  return Promise.resolve("It's completed")
}

async function onRequest(context, url, request) {
  const result = await testPromise()
  console.log(result)

  // Done
  return request;
}
  1. Make a request that executes the script

Current Behavior

  • Promise.resolve doesn't exist with error: "Promise.resolve is not a function"

Expected Behavior

  • Should work

Environment

  • App version: 4.15.0
Originally created by @NghiaTranUIT on GitHub (Dec 18, 2023). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1887 Originally assigned to: @NghiaTranUIT on GitHub. ## Description Proxyman accidentally overrides the built-in Promise from the Scripting Tool -> Cause many unexpected error. ## Steps to Reproduce 1. Create a script ```js async function testPromise() { return Promise.resolve("It's completed") } async function onRequest(context, url, request) { const result = await testPromise() console.log(result) // Done return request; } ``` 2. Make a request that executes the script ## Current Behavior - Promise.resolve doesn't exist with error: "Promise.resolve is not a function" ## Expected Behavior - Should work ## Environment - App version: 4.15.0
Author
Owner

@NghiaTranUIT commented on GitHub (Dec 18, 2023):

Fixed: https://download.proxyman.io/beta/Proxyman_4.15.0_Update_Lodash_and_fix_Promise.dmg

<!-- gh-comment-id:1859511179 --> @NghiaTranUIT commented on GitHub (Dec 18, 2023): Fixed: https://download.proxyman.io/beta/Proxyman_4.15.0_Update_Lodash_and_fix_Promise.dmg
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/Proxyman#1879
No description provided.