Rabbi Yaakov bar Idi posed a contradiction: it is written, "And behold, I am with you and will keep you" (Genesis 28:15), and it is written, "And Jacob was afraid." He said: perhaps sin would cause it. This is also taught in a baraita: "until Your people pass over, O LORD" (Exodus 15:16), this is the first entry; "until the people pass over whom You have acquired" (Exodus 15:16), this is the second entry. Say from now on that Israel were fit to have a miracle performed for them in the days of Ezra, just as was done for them in the days of Joshua, but that sin caused it to be otherwise.
Lest Sin Cause It and Why No Miracle Came in the Days of Ezra
Yalkut Shimoni on Torah 131:2
רַבִּי יַעֲקֹב בַּר אִידִי רָמִי, כְּתִיב (בראשית כח, טו) "וְהִנֵּה אָנֹכִי עִמָּךְ וּשְׁמַרְתִּיךָ", וּכְתִיב וַיִּירָא יַעֲקֹב, אָמַר שֶׁמָא יִגְרֹם הַחֵטְא. תַּנְיָא נַמִי הָכִי, (שמות טו, טז) "עַד יַעֲבֹר עַמְּךָ ה'", זוֹ בִּיאָה רִאשׁוֹנָה "עַד יַעֲבֹר עַם זוּ קָנִיתָ", זוֹ בִּיאָה שְׁנִיָה אֱמֹר מֵעַתָּה, רְאוּיִין הָיוּ יִשְׂרָאֵל לַעֲשׂוֹת לָהֶן נֵס בִּימֵי עֶזְרָא כְּדֶרֶךְ שֶׁנַּעֲשָׂה לָהֶן בִּימֵי יְהוֹשֻע, אֶלָּא שֶׁגָּרַם הַחֵטְא.