[BUG] sharedState from Scripting Tool is race-condition
Open
@NghiaTranUIT is already working on this.
Since Jul 29, 2025.
Assessment
This issue has not been assessed yet.
Description
✅ Done
bug
Description
sharedState from Scripting Tool is race-condition
Steps to Reproduce
- Use * for Matching URL
- Use this script
async function onRequest(context, url, request) {
sharedState.testCounter = sharedState.testCounter ?? 0;
sharedState.testCounter++;
console.log(`sharedState test counter ${new Date().toISOString()}:`, sharedState.testCounter);
return request;
}
Current Behavior
sharedState test counter 2025-07-27T18:57:00.169Z: 1
sharedState test counter 2025-07-27T18:57:00.728Z: 2
sharedState test counter 2025-07-27T18:57:00.741Z: 3
sharedState test counter 2025-07-27T18:57:00.752Z: 4
sharedState test counter 2025-07-27T18:57:00.766Z: 5
sharedState test counter 2025-07-27T18:57:00.776Z: 6
sharedState test counter 2025-07-27T18:57:00.790Z: 7
sharedState test counter 2025-07-27T18:57:00.808Z: 8
sharedState test counter 2025-07-27T18:57:00.815Z: 9
sharedState test counter 2025-07-27T18:57:00.840Z: 10
sharedState test counter 2025-07-27T18:57:00.844Z: 11 👈
sharedState test counter 2025-07-27T18:57:00.846Z: 11 👈
sharedState test counter 2025-07-27T18:57:00.848Z: 12 👈
sharedState test counter 2025-07-27T18:57:00.848Z: 12 👈
sharedState test counter 2025-07-27T18:57:00.848Z: 12 👈
sharedState test counter 2025-07-27T18:57:00.849Z: 12 👈
sharedState test counter 2025-07-27T18:57:00.849Z: 13 👈
sharedState test counter 2025-07-27T18:57:00.850Z: 12 👈
sharedState test counter 2025-07-27T18:57:00.854Z: 12 👈
sharedState test counter 2025-07-27T18:57:00.866Z: 13 👈
sharedState test counter 2025-07-27T18:57:00.871Z: 14
sharedState test counter 2025-07-27T18:57:00.873Z: 15 👈
sharedState test counter 2025-07-27T18:57:00.873Z: 15 👈
sharedState test counter 2025-07-27T18:57:00.932Z: 16
Expected Behavior
- Should not happen
Environment
- App version: Proxyman 5.23.0
- Dominant language
- No language data
- Stars
- 7k
- Forks
- 237
- PR merge metrics
- No merged PRs in 30d
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.
More from ProxymanApp/Proxyman
-
✅ Done enhancement
ProxymanApp/Proxyman#2772 · 1 comment · 1 assignee ·
-
✅ Done enhancement
ProxymanApp/Proxyman#2771 · 1 comment · 1 assignee ·
-
bug
ProxymanApp/Proxyman#2770 · 1 assignee ·
-
✅ Done bug
ProxymanApp/Proxyman#2769 · 2 comments · 1 assignee ·
-
✅ Done enhancement
ProxymanApp/Proxyman#2768 · 1 comment · 1 assignee ·