Occasionally I encounter this bug where I go to generate opposite actions for a dynamic action I've manipulated, then it fails to create action, and leaves me in a pickle because I can't undo/save my changes.
I've finally been able to recreate it, and isolate it to the most minimal steps I could. This occurs on 5.1, 18.2, and 19.1 (current apex.oracle.com)
Let's say I start with a Disable action for a P1_NEW item on the page.

First I'll change it to Hide

Then I duplicate it, setting the new action to Show

A logical step skipped here is me changing the relevant item to show, but this bug happens either way.
Even if I save at this point, I will still get the error.
Then I highlight them both, right click, then select Create Opposite Action

Nothing happens, instead, I see the following console error
Error in menu action. TypeError: Cannot read property 'id' of undefined
at H.ea (f4000\_p4500\_all.min.js?v=19.1.0.00.15:14)
at H.\_callComponentTypeCallback (f4000\_p4500\_all.min.js?v=19.1.0.00.15:12)
at new H (f4000\_p4500\_all.min.js?v=19.1.0.00.15:10)
at H.\_duplicate (f4000\_p4500\_all.min.js?v=19.1.0.00.15:12)
at H.duplicate (f4000\_p4500\_all.min.js?v=19.1.0.00.15:12)
at V (f4000\_p4500\_all.min.js?v=19.1.0.00.15:21)
at Array.action (f4000\_p4500\_all.min.js?v=19.1.0.00.15:21)
at e (f4000\_p4500\_all.min.js?v=19.1.0.00.15:21)
at Object.h.action (f4000\_p4500\_all.min.js?v=19.1.0.00.15:21)
at i (desktop\_all.min.js?v=19.1.0.00.15:47)

I can't undo

Nor can I save

So... what changes did I make since I last saved? gasp!
Clicking 'Go' to re-open the page is insufficient to avoid the problem
Error in menu action. Finish pending Transaction first!

I need to refresh the browser page.
And interestingly, as I try to get where I intended to be, after refreshing the entire page, it still returns the error.
If I right click, generate opposite action with the items individually, then save, it saves fine.
Desired outcome

If I delete the false actions, right click, generate opposite action, I will see the error again.
Edit:
Simplified even further, I just created a new dynamic action on an item, starting with a show/hide of two related fields, then tried to generate opposite action. Same problem.