Address.sol functionCallWithValue don't understand what is wrong?


I am getting following error:

Error Message: execution reverted

revert(add(32, returndata), returndata_size)

Which comes from Address.sol 

    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) ={value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);

Any idea what the issue could be?

It could be anything. Address.functionCallWithValue isn't originating the error, it's just forwarding it. Either there is no explanatory revert reason in the original contract, or your environment isn't recognizing the revert reason that gets forwarded by the library.

What environment are you running this in? Hardhat? Truffle? Remix?