I ran into this error message myself today, but since it’s so cryptic/vague, I wanted to share my solution in case anyone else runs into this. The answer for me was very simple: Just go to Settings --> Advanced in Metamask and then Reset Account (see screenshot below).
The reason you need to do this is because Metamask keeps state internally about the blocknumber of whatever network it’s connected to. Since this was a local network, I had restarted it a couple times, and then Metamask gets confused because the blocknumber you’re trying to submit a transaction for is behind the ones it has in it’s internal state. Re-setting the history is fast/painless, and doesn’t change your balances, and then everything worked fine for me. So just throwing that out there in case anyone else sees this from Google!