It would probably take a novel-length devotion to dig all the way into Joshua chapter 7, but I pray that this scratching of the surface of it encourages you to pull out your own shovel and jump in yourself.
The Israelites had just defeated Jericho under the leadership of Joshua. He was then in preparation to conquer the next location - Ai. Spies went and scoped out the area and let him know that it wouldn't take that many of them to defeat Ai, so he only sent about three thousand men. Those three thousand fled in battle and about 36 of them were struck down in the process. What happened!?
As Joshua and the elders of Israel cried out to the Lord - wondering if they should have just been content to settle on the other side of the Jordan and not crossed over at all - the Lord let them know something very powerful. And I love the way He started out His answer to Joshua:
“Get up! Why do you lie thus on your face?"
Get up! While it was right for Joshua to seek the Lord after the defeat, it was imperative that he face what needed to be done in solution to what was really going on that caused this defeat. There was sin in the camp.
I encourage you to read further into Achan's disobedience and the consequences thereof, but please hear this at this point now: your sin does not only affect you. Due to the disobedience of one man, Israel became in danger of their enemies. They became in danger of the Lord not going with them any further. And Achan's family had to pay the price along with him.
I am not insinuating that if you feel like you are fighting losing battles that it has to be because you are sinning. No, sometimes we are doing all that we know is right, and we still struggle. However, I challenge you to search your heart and to ask the Lord to do so to show you if there is sin hidden in your camp. It may be time for a little house cleaning.
Father, please search me and know me. I don't want anything building a wall of separation between me and You that would leave me open game for the enemy. Nor do I want my family to be in pain because of anything I would cling to with my flesh. In Jesus' Name. Amen.
Joshua 7, Hebrews 12:1-2