James 1:5-7; Luke 11:10 these scriptures seem to indicate that God freely gives to those who ask of Him
John 12:40; Joshua 11:20; Isaiah 63:17 these verses declare that God withholds His blessings from men
Sometimes people use the above verses "to show" a contradiction in the Bible, because as they claim God in one instance promises to freely give to those who ask of Him, and yet in another place clearly refuses to give blessings and withholds His blessings from people. Now, is there really such a contradiction, or is there a different answer for such claim?
This problem and apparent contradiction about God withholding and not freely giving arises from incorrect reading and from not paying close attention to what the verses actually say. When we read carefully, we note that none of the verses used to show a contradiction to God freely giving to those who ask of Him even mentions that those folks from whom blessings were withholden, ever even asked of God! Neither John 12:40 ("He hath blinded their eyes, and hardened their heart; that they should not see with their eyes, nor understand with their heart, and be converted, and I should heal them."), nor Joshua 11:20 ("For it was of the LORD to harden their hearts, that they should come against Israel in battle, that he might destroy them utterly, and that they might have no favour, but that he might destroy them, as the LORD commanded Moses."), nor Isaiah 63:17 ("O LORD, why hast thou made us to err from thy ways, and hardened our heart from thy fear? Return for thy servants' sake, the tribes of thine inheritance.") even speak of anyone asking of God!
These three verses speak of "hearts being hardened" by God, but that is an entirely different matter than withholding that which someone asked for. If someone's heart is hardened, as that person never turns to God to even ask of Him, and if God then does not provide blessing to such person, this is by no means a contradiction of the promises made in such verses as James 1:5-7 ("If any of you lack wisdom, let him ask of God, that giveth to all men liberally, and upbraideth not; and it shall be given him. 6 But let him ask in faith, nothing wavering. For he that wavereth is like a wave of the sea driven with the wind and tossed. 7 For let not that man think that he shall receive any thing of the Lord.") Actually, James 1:7 does give an explanation as to why someone who asks still may perhaps not receive what he is asking for the reason having nothing to do with God, but rather with man and his unbelief.
A closer look at those verses used to show a contradiction reveals quickly that such is not the case, rather we quickly see that those verses have not been carefully read and assumptions rather than what is written in the text are used to put forth the argument. There is no contradiction whatever in this regard in the Bible.