This error can occur in case only the full database backup has been restored on the mirror. To resolve this issue, restore the full database backup followed by transaction log backup with no recovery. Since IDW15, it is nor enough to just restore the full database backup. It is mandatory to backup and restore the transaction log before setting up mirroring. This was enforced to make sure that there is no break in the log chain on the mirror side.