What it tries to do is to remove the suffix from the version, but it wrongly assumes that we're using solc.js. In my case, the version is 0.5.17+commit.d19bba13.Linux.g++ and it was sending that verbatim to etherscan.
Dropping .Linux.g++ solved the issue and the verification went through succesfully:
When oz verify sends the post request to etherscan, it sends the compiler version as well. In oz source code there's this line:
https://github.com/OpenZeppelin/openzeppelin-sdk/blob/11352d7ee54cbbee8234f418cd0ffc0bac30e749/packages/cli/src/models/Verifier.ts#L87
What it tries to do is to remove the suffix from the version, but it wrongly assumes that we're using solc.js. In my case, the version is
0.5.17+commit.d19bba13.Linux.g++
and it was sending that verbatim to etherscan.Dropping
.Linux.g++
solved the issue and the verification went through succesfully:As a side note, oz verify shows up a false warning:
The verification went through despite the warning.