# MinimalForwarder: signature does not match request

**URL:** <https://forum.openzeppelin.com/t/minimalforwarder-signature-does-not-match-request/32944>\
**Category:** Defender\
**Created:** [November 4, 2022, 4:36pm UTC](https://forum.openzeppelin.com/t/minimalforwarder-signature-does-not-match-request/32944 "2022-11-04T16:36:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ibrahim96](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/ibrahim96/32/16264_2.png) [@Ibrahim96](https://forum.openzeppelin.com/u/Ibrahim96)\
**Post date:** [November 4, 2022, 4:36pm UTC](https://forum.openzeppelin.com/t/minimalforwarder-signature-does-not-match-request/32944/1 "2022-11-04T16:36:46Z")

</div>

I've skimmed through other similar topics but couldn't figure out a solution.

> [@Invalid request in MinimalForwarder](https://forum.openzeppelin.com/t/invalid-request-in-minimalforwarder/22305):
>
> I am having exact issues as this post: After following the metatransactions workshop and having xDAI network successfully submit a transaction, I tried using mumbai testnet as the network instead. I ended up getting the same error as the post above: "the autotask fails verification on the forwarder." computer Environment :memo:Details I am aware of the solution that was given in the post above, and although its been resolved in [https://github.com/OpenZeppelin/openzeppelin-contracts/blob…](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/1b27c13096d6e4389d62e7b0766a1db53fbb3f1b/contracts/metatx/MinimalForwarder.sol)

> [@MinimalForwarder: Invalid request](https://forum.openzeppelin.com/t/minimalforwarder-invalid-request/19520/13):
>
> I followed your advice , clean cloned the repo , made a new relay on xdai...etc. , ran yarn sign, followed by yarn relay and got the following error Error: call revert exception (method="verify((address,address,uint256,uint256,uint256,bytes),bytes)", errorSignature=null, errorArgs=[null], reason=null, code=CALL\_EXCEPTION, version=abi/5.0.12) at Logger.makeError (workshops\workshops\01-defender-meta-txs\node\_modules\@ethersproject\logger\lib\index.js:179:21) at Logger.throwError (worksho…

> [@Meta transactions - can't solve invalid signature](https://forum.openzeppelin.com/t/meta-transactions-cant-solve-invalid-signature/16392):
>
> I'm following this workshop in an attempt to implement meta transactions - [https://blog.openzeppelin.com/gasless-metatransactions-with-openzeppelin-defender/](https://blog.openzeppelin.com/gasless-metatransactions-with-openzeppelin-defender/) I am able to sign and submit the tx from my dapp to the autotask webhook URL. But the autotask fails verification on the forwarder. If I skip the check, the transaction is submitted to the forwarder contract and fails with an invalid signature error: Fail with error 'MinimalForwarder: signature does not match request' computer Environm…

I'm getting the **error 'MinimalForwarder': signature does not match request**. This happens when I send my transaction without verifying signature.

It's worth noting that when I use

` // const signature = await signer._signTypedData(TypedData.domain, types, request);`

ethers.utils.verifyTypedData returns **correct address** , however the valid check(verify) returns false.

On the contrary if I use

```auto
const signature = await signer.provider.send('eth_signTypedData_v4',
                    [address, JSON.stringify(toSign)]);

```

ethers.utils.verifyTypedData returns wrong address and valid returns true.

Can someone point to me where I'm messing up?

```auto
                const EIP712DomainType = [
                    { name: 'name', type: 'string' },
                    { name: 'version', type: 'string' },
                    { name: 'chainId', type: 'uint256' },
                    { name: 'verifyingContract', type: 'address' }
                ]

                const ForwardRequestType = [
                    { name: 'from', type: 'address' },
                    { name: 'to', type: 'address' },
                    { name: 'value', type: 'uint256' },
                    { name: 'gas', type: 'uint256' },
                    { name: 'nonce', type: 'uint256' },
                    { name: 'data', type: 'bytes' }
                ]

                const types = { ForwardRequestType };
                const provider= new ethers.providers.Web3Provider(window.ethereum)
                // Forwarder Contract
                const forwarderContract = new ethers.Contract(forwarder, Forwarder.ForwarderAbi, 
                 provider);
                // gets nonce and chainID
                const nonce = await forwarderContract.getNonce(address).then(nonce => nonce.toString());
                const chainId = await forwarderContract.provider.getNetwork().then(n => n.chainId);

                // Encode meta-tx request
                const boxesInterface = new ethers.utils.Interface(PayFactory.abi);
                const data = boxesInterface.encodeFunctionData('RedeemPayment', [code]);

                const request = {
                    from: address, // current user address
                    to: contractAddress, 
                    value: 0,
                    gas: 1e6,
                    nonce,
                    data
                };

                const TypedData = {
                    domain: {
                        name: 'MinimalForwarder',
                        version: '0.0.1',
                        chainId: chainId,
                        verifyingContract: forwarder,
                    },
                    primaryType: 'ForwardRequest',
                    types: {
                        EIP712Domain: EIP712DomainType,
                        ForwardRequest: ForwardRequestType
                    },
                    message: {
                        request
                    }
                };
                const toSign = { ...TypedData, message: request };

                const signature = await signer._signTypedData(TypedData.domain, types, request);

                const valid = await forwarderContract.verify(request, signature);

                console.log("valid:", valid)

                let recovered = await ethers.utils.verifyTypedData(TypedData.domain, types, request, signature);

                console.log("recoveredAddress:", recovered)
                if (recovered == address) {
                    console.log('verified TypedData ');
                // Call server endpoint.            
  }
                else {
                    console.log("Wrong recovered Addy")
                }

```

---

<div class="post-metadata">

**Author:** ![Ibrahim96](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/ibrahim96/32/16264_2.png) [@Ibrahim96](https://forum.openzeppelin.com/u/Ibrahim96)\
**Post date:** [November 4, 2022, 7:00pm UTC](https://forum.openzeppelin.com/t/minimalforwarder-signature-does-not-match-request/32944/3 "2022-11-04T19:00:07Z")

</div>

UPDATE:

When I use:

```auto
const signature = await signer.provider.send('eth_signTypedData_v4',
                    [address, JSON.stringify(toSign)]);

```

The valid check(verify) method returns true and the recovered address incorrect. I tried sending the transaction and got this error instead:  
`Although one or more Error Occurred [**execution reverted**] Contract Execution Completed. `

Here is the tx on Mumbai.

> **[Polygon Transaction Hash (Txhash) Details | PolygonScan](https://mumbai.polygonscan.com/tx/0x5ce08b3deccfaad6d1b076ca81f19c47984a64956d935d0c10553f653df91024#internalhash)**
>
> Polygon (MATIC) detailed transaction info for txhash 0x5ce08b3deccfaad6d1b076ca81f19c47984a64956d935d0c10553f653df91024. The transaction status, block confirmation, gas fee, MATIC, and token transfer are shown.

---

<div class="post-metadata">

**Author:** ![Ibrahim96](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/ibrahim96/32/16264_2.png) [@Ibrahim96](https://forum.openzeppelin.com/u/Ibrahim96)\
**Post date:** [November 4, 2022, 9:35pm UTC](https://forum.openzeppelin.com/t/minimalforwarder-signature-does-not-match-request/32944/4 "2022-11-04T21:35:13Z")

</div>

Same error as here

> [@Although one or more Error Occurred \[execution reverted\] Contract Execution Completed](https://forum.openzeppelin.com/t/although-one-or-more-error-occurred-execution-reverted-contract-execution-completed/25442/4):
>
> Sure, the scenario is - After submitting the meta transaction, the transaction status shows "success", but it has a message like " Although one or more Error Occurred [execution reverted] Contract Execution Completed" When we do debug using geth trace, it shows a plain Static call / Call error.. It would be great if there is direction on how to debug the same?..Like specific error details Reference - [https://rinkeby.etherscan.io/tx/0xb79cb701ca183257677fdb0e6749235e185ba50064f43c0e724a788a97…](https://rinkeby.etherscan.io/tx/0xb79cb701ca183257677fdb0e6749235e185ba50064f43c0e724a788a97d817f2)

---

<div class="post-metadata">

**Author:** ![Ibrahim96](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/ibrahim96/32/16264_2.png) [@Ibrahim96](https://forum.openzeppelin.com/u/Ibrahim96)\
**Post date:** [November 6, 2022, 1:05pm UTC](https://forum.openzeppelin.com/t/minimalforwarder-signature-does-not-match-request/32944/5 "2022-11-06T13:05:33Z")

</div>

Update:

`Although one or more Error Occurred [execution reverted] Contract Execution Completed`

This error means the forwarder executed the call, however the target contract function that I was calling was reverting because I had a revert statement which was triggered accidentally ;).

---

<div class="post-metadata">

**Author:** ![ernestognw](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/ernestognw/32/18576_2.png) [@ernestognw](https://forum.openzeppelin.com/u/ernestognw)\
**Post date:** [November 7, 2022, 6:54pm UTC](https://forum.openzeppelin.com/t/minimalforwarder-signature-does-not-match-request/32944/6 "2022-11-07T18:54:52Z")

</div>

Hey @Ibrahim96,

Sorry for the late response, now I see you figured it out, but please let me know if you need any other support request around this.

Best!

---

<div class="post-metadata">

**Author:** ![matifalcone](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/matifalcone/32/16906_2.png) [@matifalcone](https://forum.openzeppelin.com/u/matifalcone)\
**Post date:** [December 5, 2023, 12:12am UTC](https://forum.openzeppelin.com/t/minimalforwarder-signature-does-not-match-request/32944/7 "2023-12-05T00:12:11Z")

</div>

Just to add some insights to this thread, when you see this message:

`Although one or more Error Occurred [execution reverted] Contract Execution Completed`

It means that the signature verification at the `Forwarder` level succeeded and the smart contract that you are trying to call is being executed. I suggest to go directly to that smart contract and call the function directly (without a meta-tx) to see exactly what is the problem with that contract.

Once you sort that error out, then the meta-tx via the `Forwarder` should work with no issues.
