[GH-ISSUE #738] Duplicating rules leads to data loss #736

Closed
opened 2026-03-03 19:21:25 +03:00 by kerem · 7 comments
Owner

Originally created by @mprice-banno on GitHub (Dec 22, 2020).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/738

Originally assigned to: @NghiaTranUIT on GitHub.

Proxyman version? (Ex. Proxyman 1.4.3)

2.15.0 (21500)

macOS Version? (Ex. mac 10.14)

Multiple, 10.15.6 and 10.13.6

Steps to reproduce

It look me a little while to figure out what was happening here, I have 50+ rules, and most of them were created as duplicates of other scripts and then edited. I would come back later and find the script would be incorrect. This was happening a lot.

It's easy to reproduce from a fresh install.

  • Fresh install of app
  • Open Scripting window
  • Add new rule, name it Rule 1, use /url1 for the URL and add //rule 1 at the top of the script.
  • Save the rule.
  • Duplicate Rule 1 (The focus moves from Rule 1 to the duplicated Rule 1 copy)
  • Edit the duplicate, change name to Rule 2, use /url2 for the URL and add //rule 2 at the top of the script.
  • Save Rule 2
  • Select/highlight Rule 1 from the list
  • Duplicate Rule 1 again

At this point the focus has moved from Rule 1 to Rule 2, but the contents of Rule 2's script, are now the same as Rule1's, or possible Rule 1 copy (the second duplication). If you switch back and forth the Rule 2 Name and URL are correct, but the script contents are wrong.

I have confirmed that the on-disk contents of the rule 2 script have been replaced with rule 1's.

This might be hard to follow, so here's a video.

ProxyManRuleCorruption

Expected behavior

  • When a rule is duplicated the focus bar should always switch to the newly duplicated rule.
  • Existing rules should not change.

Screenshots (optional)

Originally created by @mprice-banno on GitHub (Dec 22, 2020). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/738 Originally assigned to: @NghiaTranUIT on GitHub. ### Proxyman version? (Ex. Proxyman 1.4.3) 2.15.0 (21500) ### macOS Version? (Ex. mac 10.14) Multiple, 10.15.6 and 10.13.6 ### Steps to reproduce It look me a little while to figure out what was happening here, I have 50+ rules, and most of them were created as duplicates of other scripts and then edited. I would come back later and find the script would be incorrect. This was happening a lot. It's easy to reproduce from a fresh install. - Fresh install of app - Open Scripting window - Add new rule, name it Rule 1, use `/url1` for the URL and add `//rule 1` at the top of the script. - Save the rule. - Duplicate Rule 1 (The focus moves from Rule 1 to the duplicated Rule 1 copy) - Edit the duplicate, change name to Rule 2, use `/url2` for the URL and add `//rule 2` at the top of the script. - Save Rule 2 - Select/highlight Rule 1 from the list - Duplicate Rule 1 again At this point the focus has moved from Rule 1 to Rule 2, but the contents of Rule 2's script, are now the same as Rule1's, or possible Rule 1 copy (the second duplication). If you switch back and forth the Rule 2 Name and URL are correct, but the script contents are wrong. I have confirmed that the on-disk contents of the rule 2 script have been replaced with rule 1's. This might be hard to follow, so here's a video. ![ProxyManRuleCorruption](https://user-images.githubusercontent.com/58708906/102908093-d1425580-442b-11eb-86e7-0041212d6b04.gif) ### Expected behavior - When a rule is duplicated the focus bar should always switch to the newly duplicated rule. - Existing rules should not change. ### Screenshots (optional)
kerem 2026-03-03 19:21:25 +03:00
Author
Owner

@mprice-banno commented on GitHub (Dec 22, 2020):

There is a similar related issue with any of the tools that allow the duplication of a rule, breakpoints, block and allow lists etc.
When you duplicate a rule the focus moves to the rule above, not to the new duplicated rule. No data loss with these rules as far as I can tell.

<!-- gh-comment-id:749645758 --> @mprice-banno commented on GitHub (Dec 22, 2020): There is a similar related issue with any of the tools that allow the duplication of a rule, breakpoints, block and allow lists etc. When you duplicate a rule the focus moves to the rule above, not to the new duplicated rule. No data loss with these rules as far as I can tell.
Author
Owner

@NghiaTranUIT commented on GitHub (Dec 23, 2020):

Thanks for the detailed bug report. I'm fixing it now 👍 Will send you a BETA build asap

<!-- gh-comment-id:749891025 --> @NghiaTranUIT commented on GitHub (Dec 23, 2020): Thanks for the detailed bug report. I'm fixing it now 👍 Will send you a BETA build asap
Author
Owner

@mprice-banno commented on GitHub (Dec 23, 2020):

Thanks Nghia!

<!-- gh-comment-id:749967783 --> @mprice-banno commented on GitHub (Dec 23, 2020): Thanks Nghia!
Author
Owner

@NghiaTranUIT commented on GitHub (Dec 24, 2020):

Hey @mprice-banno, this BETA build will fix the bug: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.15.1_Fix_Duplicate_Scripts_Lost_Data.dmg

Please let me know if it works for you 👍

<!-- gh-comment-id:750730549 --> @NghiaTranUIT commented on GitHub (Dec 24, 2020): Hey @mprice-banno, this BETA build will fix the bug: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.15.1_Fix_Duplicate_Scripts_Lost_Data.dmg Please let me know if it works for you 👍
Author
Owner

@mprice-banno commented on GitHub (Dec 24, 2020):

Thanks @NghiaTranUIT so far so good! I'll keep testing with it today.

<!-- gh-comment-id:750928514 --> @mprice-banno commented on GitHub (Dec 24, 2020): Thanks @NghiaTranUIT so far so good! I'll keep testing with it today.
Author
Owner

@mprice-banno commented on GitHub (Jan 5, 2021):

No more issues that I've run into since the fix. Thanks @NghiaTranUIT

<!-- gh-comment-id:754928134 --> @mprice-banno commented on GitHub (Jan 5, 2021): No more issues that I've run into since the fix. Thanks @NghiaTranUIT
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 6, 2021):

Just a friendly reminder that the latest build 2.15.2 has already included this fix 🙌

<!-- gh-comment-id:755017108 --> @NghiaTranUIT commented on GitHub (Jan 6, 2021): Just a friendly reminder that the latest build 2.15.2 has already included this fix 🙌
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#736
No description provided.