Joshua’s leadership flaws

Joshua is ranked as an important leader in the history of Israel. He was a worthy successor of Moses. As a warrior and strategist, he was able to conquer a major part of the Promised Land. However, he did not complete the job. In fact, there were three critical flaws in his leadership.
1) Gibeonites: When the inhabitants of the land saw, Israelite under the leadership of Joshua were going to destroy them, they were scared. The Gibeonites sent a delegation feigning that they were from a far-off country and wanted to make a peace treaty. Joshua without taking counsel from the Lord made a treaty with them. (Joshua 9:14) Later it was found that they were from a nearby area and afraid of their lives, they deceived Joshua. Because of the peace treaty, Gibeonites were left to live among the Israelite.
2) Joshua dismissed the army: Joshua exhorted and rebuked the Israelites for not taking possession of the Promised Land. Then he orders the survey of the Land and makes documents allotting portions for each tribe. (Joshua 18:1-4) Reuben, Gad and a half-tribe of Manasseh had crossed over Jordan to fight alongside other tribes to take possession of the Promised Land. However, before the whole Promise Land was conquered, Joshua prematurely decided that God had given rest to his brethren and sent the fighting men back along with spoil. (Joshua 22: 1-9) On what basis Joshua took that decision is a surprise.
3) Joshua dismissed the assembly: After a long tenure, Joshua was sure that his time was over. He called the whole assembly and exhorted them to keep the Law. He also renewed the covenant. Everyone promised to keep the Law of Moses. Joshua declared that he and his family would follow the Lord. Then he sent them home. (Joshua 24:22-28) Many in the assembly would have expected Joshua to declare his successor. The whole nation on his death was left without a leader.
Joshua seems to be a loner unlike Moses, who had able lieutenants like Joshua, seventy elders…etc.
Do I consult the Lord to avoid mistakes and blunders?