Was the previous cycle interrupted or were items loaded in the dishwasher blocking the dispenser from opening?
If the previous cycle did not complete, the detergent can become caked in the dispenser cup if it is left sitting in the dishwasher.
Items blocking the detergent dispenser will keep it from opening. Make sure water action can reach the dispenser. Do not load large items in front of the dispenser.