Our Refrigerator ice dispenser flap has been opening and closing continuously for an hour. Nothing stops it. Opening or closing doors, turning off power, cleaning the flap, etc.
disconnect wire harness at the top of the door making sure the door flap is in the closed position
remove the ice dispenser from the door
see video on you tube
replace ice dispenser module appropriate for your specific refrigerator model