Working on difficult, unstable projects can be demotivating. When builds break unexpectedly and the codebase seems to reveal new, unexpected bugs today where yesterday there were none it can be challenging to remain positive. It is however, during times like these that we can learn from our mistakes and learn new skills. Instead of grumbling and complaining, it serves a good opportunity to ask why these things are happening and to think through what you are seeing and ask why?
Once you start digging into these questions, you will soon find there is much to learn and dig into and instead of getting demotivated, you can start to see motivation in starting to discover what is not understood.