Symptoms

Following error is reported in the event log for O365 One drive restore


SharePoint Online: failed to restore the list item (Test file) with error : (*RecordError:: Exception message: Object reference not set to an instance of an object.


(*RecordError:: Exception message: Buffer cannot be null.

Parameter name: buffer

*Exception

System.ArgumentNullException: Buffer cannot be null.

Parameter name: buffer

Cause


File has no data and is of zero byte

Workaround

O365 doen't allow to upload or create empty file with zero bytes. Those files can be restored locally but not on one drive.

Write some data on file to restore it on original location.