When the Messenger of Allah ﷺ was on his deathbed, there were some men in the house, among them Umar bin Khattab. The Prophet ﷺ said, "Come, let me write for you a document after which you will never go astray."Umar said, "The Messenger of Allah ﷺ is overcome with pain, and you have the Quran. The Book of Allah is sufficient for us."The people of the house disagreed and began to argue. Some of them said, "Bring writing materials so the Messenger of Allah ﷺ may write for you a document after which you will never go astray," while others said what Umar had said. When their idle talk and disagreement before the Messenger of Allah ﷺ grew excessive, the Messenger of Allah ﷺ said, "Get up and leave."Ubaydullah said that Ibn Abbas used to say, "The real calamity, the greatest calamity, was what came between the Messenger of Allah ﷺ and his writing that document for them, namely their disagreement and clamor."
لما حضر رسول الله ﷺ وفي البيت رجال فيهم عمر بن الخطاب، فقال النبي ﷺ: هلم أكتب لكم كتابا لا تضلون بعده فقال عمر: إن رسول الله ﷺ قد غلب عليه الوجع، وعندكم القرآن، حسبنا كتاب الله. فاختلف أهل البيت، فاختصموا، فمنهم من يقول: قربوا يكتب لكم رسول الله ﷺ كتابا لن تضلوا بعده، ومنهم من يقول ما قال عمر، فلما أكثروا اللغو والاختلاف عند رسول الله ﷺ، قال رسول الله ﷺ: قوموا. قال عبيد الله: فكان ابن عباس يقول: إن الرزية كل الرزية ما حال بين رسول الله ﷺ وبين أن يكتب لهم ذلك الكتاب من اختلافهم ولغطهم.
Bukhari narrated it in the Book of Military Expeditions (4432), and Muslim in the Book of Wills (1637:22), both of them through the route of Abdul-Razzaq, who said, Mamar told us, from Zuhri, from Ubaydullah bin Abdullah bin Utba, from Ibn Abbas, who said... and he mentioned it.