ProxymanApp / ProxymanApp/Proxyman
[Scripting] Error when using built-in Promise
Open
@NghiaTranUIT is already working on this.
Since Dec 18, 2023.
✅ Done
bug
- Dominant language
- No language data
- Stars
- 7k
- Forks
- 237
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.