During the process of linking our documentation SharePoint to our Microsoft TEAMS channel, we noted after reproducing the issue multiple times that, regardless of the indication on the TEAMS Known Issues (https://docs.microsoft.com/en-us/microsoftteams/known-issues), there is a pattern to all of our non-working previews ; the file path is always too long - probably more than 260 characters - in those specific cases and has to be reworked (renaming of file and/or parent(s) folder), which instantly solves the issue.
While it is obvious in our case that the file structure that SharePoint uses allows path names greater than the usual limit - our library was entirely built online -, it seems that TEAMS doesn't in the case of previewing, which causes an error. Please note that the file is still accessible and may also be opened directly through TEAMS. Only the previewing is affected.
Yep, in general I have seen that files in Teams behaves worst compared with the experience we have in SPO...for instance, in SPO we have a 400 path limit and as you say in Teams we are not still there...same happens with special characters support...SPO behaves better than Teams in this regard