# MetaMask Message Signature: TypeError: Cannot read property 'toArray' of null

**URL:** <https://forum.openzeppelin.com/t/metamask-message-signature-typeerror-cannot-read-property-toarray-of-null/11470>\
**Category:** Support\
**Created:** [June 28, 2021, 9:28am UTC](https://forum.openzeppelin.com/t/metamask-message-signature-typeerror-cannot-read-property-toarray-of-null/11470 "2021-06-28T09:28:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DragonLord](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/dragonlord/32/2966_2.png) [@DragonLord](https://forum.openzeppelin.com/u/DragonLord)\
**Post date:** [June 28, 2021, 9:28am UTC](https://forum.openzeppelin.com/t/metamask-message-signature-typeerror-cannot-read-property-toarray-of-null/11470/1 "2021-06-28T09:28:54Z")

</div>

I'm trying to sign a message using `eth_signTypedData_v4`,

 ![eth-signedType 01](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/7/7ce0028e8d9b0a241167825eca6f2b5ef1198752.png)  
but I kept getting the error message above. Please has anyone experienced this issue before or is something wrong with the data I'm passing to `eth_signTypedData_v4`.  
 ![eth-signedType 02](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/7/79d60712c4e6f740c353fd0eedb4c370f4057878.png)

#### 🔢 Code to reproduce

```auto
createProposal = async ({ title, description, category }, { loading, web3, ethereum, user } = this.state) => {
    if(loading) return;
    try {
      const _data = JSON.stringify({
        types: {
            EIP712Domain: [
              { name: "name", type: "string" },
              { name: "version", type: "string" },
              { name: "chainId", type: "uint256" },
              { name: "verifyingContract", type: "address" },
              { name: "salt", type: "bytes32" },
          ],
            Dao: [{ name: "wallet", type: "address" }]
        },
        domain: {
            name: "SignTypedData v4 Test",
            version: "1",
            chainId: parseInt(web3.version.network, 10),
            verifyingContract: "0x1C56346CD2A2Bf3202F771f50d3D14a367B48070", // doesn't exist yet
            salt: "0xf2d857f4a3edcb9b78b4d503bfe733db1e3f6cdc2b7971ee739626c97e86a558" // doesn't exist yet
        },
        primaryType: "Dao",
        message: {
            title,
            description,
            category
        }
    });
      const _signature = web3.currentProvider.sendAsync({
        method: "eth_signTypedData_v4",
        params: [user, _data],
        from: user
      }, (err, res) => {
        if(err) return console.log("err", err);
        console.log(res);
      });
      return _signature;
    } catch (error) {
      console.log(error);
      return error;
    }
  }

```

---

<div class="post-metadata">

**Author:** ![frangio](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/frangio/32/15251_2.png) [@frangio](https://forum.openzeppelin.com/u/frangio)\
**Post date:** [June 29, 2021, 8:04pm UTC](https://forum.openzeppelin.com/t/metamask-message-signature-typeerror-cannot-read-property-toarray-of-null/11470/2 "2021-06-29T20:04:38Z")

</div>

The description of the `Dao` type only contains a field `wallet`, yet your `message` contains `title, description, category`. Type and message should match.
