[Machine] Muhammad ﷺ was not promised anything by Allah except that He knew it would happen, even until he died. And indeed, the messengers continued to face difficulties until they thought that the believers with them had indeed rejected them. Ibn Abi Mulaykah said in the narration of 'Urwah, and Aisha used to recite it (they thought they had been lied to) with emphasis.
مَا وَعَدَ اللهُ مُحَمَّدًا ﷺ مِنْ شَيْءٍ إِلَّا وَقَدْ عَلِمَ أَنَّهُ سَيَكُونُ حَتَّى مَاتَ وَإِنَّهُ لَمْ تَزَلِ الْبَلَايَا بِالرُّسُلِ حَتَّى ظَنُّوا أَنَّ مَنْ مَعَهُمْ مِنَ الْمُؤْمِنِينَ قَدْ كَذَبُوهُمْ قَالَ ابْنُ أَبِي مُلَيْكَةَ فِي حَدِيثِ عُرْوَةَ وَكَانَتْ عَائِشَةُ تَقْرَؤُهَا (ظَنُّوا أَنَّهُمْ قَدْ كُذِّبُوا) مُثَقَّلَةً