Your two files probably have different number of time samples, different lists of signals (channels or sources) or different frequency bins.
To check the dimensions of the data matrix in a file: right-click on the file > File > View file contents, and check the dimensions of the TF field (or F for recordings, or ImageGridAmp for source results).