Moto G phone continuously shows dialogs saying "Unfortunately, SomeApp has stopped" My Motorola G phone continuously shows crash dialogs of the app. Multiple dialogs appear on top of each other and if I press ok, the dialog reappears immediately. Due to these dialogs, I cannot use the phone. I am not even able to turn on developer options as the dialogs are not letting me do anything.

I tried to format the phone by pressing power and volume down option. But when I press recovery or factory option, the phone reboots with the above issues.

I also tried fastboot commands to erase data but I didn't get success in formatting the phone.

How can I fix this issue?
Flashing the phone should solve the issue if it is not hardware related(damaged eMMC). The issue may occur when phone is infected by malwares. 

This guide on XDA Developers may help you out.