I have found a post back in 2017 with a similar error, but no real solution. This is something I have only experienced in the last couple of weeks across two different documents.
I noticed that all my text had disappeared from a frame and in some documents this frame is linked across multiple pages, so there is a lot of content that has been typeset that has suddenly disappeared without any sort of error coming up initially. I now get the 'Document contains an invalid frame' error. Saving the file back as an idml and then re-opening means the error has gone but I have still lost all my content and it has to be re-input. In some cases this can be hours of work.
Is this a known issue as it seams strange that I have never had this before in 15+ years and then suddenly had it happen twice in the last couple of weeks - I am running the latest version of InDesign. I am just concerned if this is happening on other documents that I am not aware of until I see the content has gone. Any help/info greatly appreciated. Thanks
It sounds like a corrupted file.
To see if anything is retrievable, trying saving as an IDML. File > Save As > InDesign CS4 (or Later) [IDML]. Try opening the IDML in InDesign to see if the lost material can be retrieved. Or you may have to a backup file, instead.
You could also send the file to Adobe to see if they can fix it for you and probably the bug. You can email a copy of the document at email@example.com. If the file is more than 10mb in size, upload it to a cloud service like dropbox and email the public access URL.
Note:- There is no specified timeframe within which you can expect a revert from Adobe guys