1. If either of you still has feelings for the other.
I know this seems obvious, but sadly it often isn’t. One of the most difficult factors of being friends with an ex is that rarely are breakups 100% mutual- usually one person wanted to end something, and the other didn’t. It seems reasonable that just because you didn’t work out as a couple, doesn’t mean you couldn’t work out as friends. But if either of you are harboring even the slightest amount of feelings for each other, it makes being friends 1000x more difficult.