Proxyman
Proxyman copied to clipboard
[Scripting] Error when using built-in Promise
Description
Proxyman accidentally overrides the built-in Promise from the Scripting Tool -> Cause many unexpected error.
Steps to Reproduce
- 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;
}
- 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
Fixed: https://download.proxyman.io/beta/Proxyman_4.15.0_Update_Lodash_and_fix_Promise.dmg