Our Gemara on Amud Aleph discusses what seems to be a prophecy about the return to Jerusalem in the time of Ezra, which was not fulfilled:
וְאוֹמֵר תִּפֹּל עֲלֵיהֶם אֵימָתָה וָפַחַד עַד יַעֲבֹר עַמְּךָ ה׳ זוֹ בִּיאָה רִאשׁוֹנָה עַד יַעֲבֹר עַם זוּ קָנִיתָ זוֹ בִּיאָה שְׁנִיָּה
And similarly, the verse says: “Terror and dread falls upon them; by the greatness of Your arm they are as still as a stone; till Your people pass over, Lord” (Exodus 15:16). This alludes to the first arrival of the Jewish people in Eretz Yisrael, during the period of Joshua. The verse continues: “Till the people that You have gotten pass over” (Exodus 15:16). This alludes to the second arrival, when the Jews returned to Eretz Yisrael from Babylonia after the destruction of the First Temple.
אֱמוֹר מֵעַתָּה רְאוּיִין הָיוּ יִשְׂרָאֵל לַעֲשׂוֹת לָהֶם נֵס בְּבִיאָה שְׁנִיָּה כְּבִיאָה רִאשׁוֹנָה אֶלָּא שֶׁגָּרַם הַחֵטְא
Accordingly, say from now that the Jewish people were worthy of having a miracle performed for them during the second arrival, just like they were worthy of having miracles performed for them during the first arrival, but their sin caused them to enter Eretz Yisrael through a natural process, with the permission of the kings of other nations.
This is a theological problem because we are taught that a prophecy that warns of doom which can be reversed via prayer and repentance, a prophecy over a positive outcome is not reversed even if the recipient is no longer deserving (see Berachos 7a). Maharal (Gevuros Hashem 7) explains that there is a difference between a “havtacha” (assurance) and a prophecy. At times, God offers Tzaddikim a havtacha for a positive outcome, but this is based on their current situation and status. It is a provisional statement, such as, “If you continue on this path, I will support you and protect you.” It is like a doctor saying, “You really lowered your cholesterol and blood pressure, keep it up and you will stay healthy.” Such information is important as it lets you know what behaviors to maintain in order to succeed. This is what God’s Havtachos to Tzaddikim are about; encouragement and direction — but not prophetic prediction. A prophecy is an expression of God’s direct will, and since He can will anything it will occur in an absolute sense. Even so, a negative prophecy is always contingent because harm and evil are never the direct will of God, merely a result of an absence of His presence and providence.