The chemical leavener had lost its activity
CommonBaking powder contains an acid and a base kept apart by a dry starch buffer. Moisture from the air lets them react slowly in the tub, so an old or badly closed container has already spent part of its capacity before it reaches the mixture. The result is an evenly dense, flat bake with no tunnels and no large holes — the gas simply never arrived. Bicarbonate of soda alone does not degrade this way, but it depends on an acid in the formula, so the equivalent failure there is a missing or weakened acid rather than a spent base.
What to change
Test the baking powder in hot water
Stir half a teaspoon of baking powder into a little HOT water. Vigorous immediate fizzing means it is active; a weak reaction means it has lost capacity. Use hot water rather than cold — a double-acting powder’s second acid is heat-activated, and cold water under-reports its activity. For bicarbonate of soda, test with a spoonful of vinegar instead, since it needs an acid rather than heat.
Any chemical leavener older than a few months, opened a while ago, or stored somewhere humid.
Trade-off: Two minutes, and a negligible amount of leavener.