<human>:  Why did Napoleon lose at the Battle of San Sebastián?
<bot>: The French army was outnumbered by the combined forces of Spain and Portugal. The Spanish and Portuguese forces had a lot of advantages, such as a better supply line and better weather conditions. The French army had to retreat and ended up losing the battle.