I have some batch code that creates ContentNotes in Apex. It was working perfectly well until all of a sudden last night it stopped working without any code changes whatsoever. It is now throwing the dreaded "System.UnexpectedException: Note can't be saved" error.
I stripped it down to the following test case, which fails in the sandbox in which it had been previously working, but passes in another?!?!
ContentNote n = new ContentNote(); n.Title = 'test'; n.Content = Blob.valueOf('test'); insert n;
I will also file a case, but does anything jump out to anyone? Has anyone encountered a sudden appearance of this error before? Thanks!