The basic idea of Firefox OS was actually great, they just didn't quite get the market right. Kai OS is a very successful fork which runs on feature phones.
It was clear from the start that Mozilla did not have enough to move the needle in the mobile market all by itself. FFOS was a massive waste of time, effort, and money, that even resulted in a loss of prestige for the brand. It sucked the air out of more relevant priorities, diverted (and eventually often lost) their best talent, and wasted time and focus at a critical juncture.