# Reverted with reason string 'Governor: unknown proposal id

**URL:** <https://forum.openzeppelin.com/t/reverted-with-reason-string-governor-unknown-proposal-id/37465>\
**Category:** Contracts\
**Created:** [August 14, 2023, 8:52am UTC](https://forum.openzeppelin.com/t/reverted-with-reason-string-governor-unknown-proposal-id/37465 "2023-08-14T08:52:39Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![sagaratalatti](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/sagaratalatti/32/19174_2.png) [@sagaratalatti](https://forum.openzeppelin.com/u/sagaratalatti)\
**Post date:** [August 14, 2023, 8:52am UTC](https://forum.openzeppelin.com/t/reverted-with-reason-string-governor-unknown-proposal-id/37465/1 "2023-08-14T08:52:39Z")

</div>

I using Governor contract from Openzeppelin. I have created and voted on the proposal. The state of proposal is succeeded. When I am trying to queue the proposal I am getting error

> Reverted with reason string 'Governor: unknown proposal id

Here’s the queue data:

````const
    const box = await ethers.getContract("Box");
    const encodedFunctionCall = box.interface.encodeFunctionData(STORE_FUNCTION, args);
    const descriptionHash = ethers.hashMessage(PROPOSAL_DESCRIPTION);

    const governance = await ethers.getContract("GovernorContract");
    console.log("Queueing...");
    const queueTx = await governance.getFunction("queue")(
        [await box.getAddress()],
        [0],
        [encodedFunctionCall],
        descriptionHash
    ); ```

The constants are correct. I think there could be something wrong with the hashMessage for description but not sure.
````

---

<div class="post-metadata">

**Author:** ![barakman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/barakman/32/855_2.png) [@barakman](https://forum.openzeppelin.com/u/barakman)\
**Post date:** [August 14, 2023, 9:21am UTC](https://forum.openzeppelin.com/t/reverted-with-reason-string-governor-unknown-proposal-id/37465/2 "2023-08-14T09:21:56Z")

</div>

Please share a link to your contract (etherscan, github, etc).

---

<div class="post-metadata">

**Author:** ![sagaratalatti](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/sagaratalatti/32/19174_2.png) [@sagaratalatti](https://forum.openzeppelin.com/u/sagaratalatti)\
**Post date:** [August 14, 2023, 9:30am UTC](https://forum.openzeppelin.com/t/reverted-with-reason-string-governor-unknown-proposal-id/37465/3 "2023-08-14T09:30:29Z")

</div>

Governor Contract:

> **[GovernorContract | Address 0x1f8AEc0A9623d807706DF21341b2ca2594a17F3B |...](https://sepolia.etherscan.io/address/0x1f8AEc0A9623d807706DF21341b2ca2594a17F3B#code)**
>
> The Contract Address 0x1f8AEc0A9623d807706DF21341b2ca2594a17F3B page allows users to view the source code, transactions, balances, and analytics for the contract address. Users can also interact and make transactions to the contract directly on...

Here’s the link to GitHub:

> <https://github.com/sagaratalatti/DAO/blob/main/scripts/queue-n-execute.ts>

Note some of the ethersv6 methods haven’t been pushed to GitHub.

---

<div class="post-metadata">

**Author:** ![barakman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/barakman/32/855_2.png) [@barakman](https://forum.openzeppelin.com/u/barakman)\
**Post date:** [August 14, 2023, 9:41am UTC](https://forum.openzeppelin.com/t/reverted-with-reason-string-governor-unknown-proposal-id/37465/4 "2023-08-14T09:41:23Z")

</div>

> [@sagaratalatti](#):
>
> `STORE_FUNCTION, NEW_STORE_VALUE, PROPOSAL_DESCRIPTION`

Please share these values as well.

---

<div class="post-metadata">

**Author:** ![sagaratalatti](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/sagaratalatti/32/19174_2.png) [@sagaratalatti](https://forum.openzeppelin.com/u/sagaratalatti)\
**Post date:** [August 14, 2023, 12:17pm UTC](https://forum.openzeppelin.com/t/reverted-with-reason-string-governor-unknown-proposal-id/37465/5 "2023-08-14T12:17:12Z")

</div>

```auto
export const STORE_FUNCTION = "store";
export const NEW_STORE_VALUE = 77;
export const PROPOSAL_DESCRIPTION = "This proposal shall execute the box store function to save the uint256 passed through proposal";

```

---

<div class="post-metadata">

**Author:** ![barakman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/barakman/32/855_2.png) [@barakman](https://forum.openzeppelin.com/u/barakman)\
**Post date:** [August 14, 2023, 1:00pm UTC](https://forum.openzeppelin.com/t/reverted-with-reason-string-governor-unknown-proposal-id/37465/6 "2023-08-14T13:00:25Z")

</div>

> [@sagaratalatti](#):
>
> `Box`

Please share the address of this contract, and if it's not verified, then also the relevant source code (of function `store`).

---

<div class="post-metadata">

**Author:** ![sagaratalatti](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/sagaratalatti/32/19174_2.png) [@sagaratalatti](https://forum.openzeppelin.com/u/sagaratalatti)\
**Post date:** [August 14, 2023, 1:01pm UTC](https://forum.openzeppelin.com/t/reverted-with-reason-string-governor-unknown-proposal-id/37465/7 "2023-08-14T13:01:53Z")

</div>

> **[Box | Address 0xFF35DE2b1eb182Afa3205C9a3C283ef02135f8a6 | Etherscan](https://sepolia.etherscan.io/address/0xFF35DE2b1eb182Afa3205C9a3C283ef02135f8a6)**
>
> The Contract Address 0xFF35DE2b1eb182Afa3205C9a3C283ef02135f8a6 page allows users to view the source code, transactions, balances, and analytics for the contract address. Users can also interact and make transactions to the contract directly on...

---

<div class="post-metadata">

**Author:** ![sagaratalatti](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/sagaratalatti/32/19174_2.png) [@sagaratalatti](https://forum.openzeppelin.com/u/sagaratalatti)\
**Post date:** [August 14, 2023, 1:25pm UTC](https://forum.openzeppelin.com/t/reverted-with-reason-string-governor-unknown-proposal-id/37465/8 "2023-08-14T13:25:02Z")

</div>

I have updated the codebase on github:

> **[GitHub - sagaratalatti/DAO](https://github.com/sagaratalatti/DAO/tree/main)**
>
> main

---

<div class="post-metadata">

**Author:** ![barakman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/barakman/32/855_2.png) [@barakman](https://forum.openzeppelin.com/u/barakman)\
**Post date:** [August 14, 2023, 1:36pm UTC](https://forum.openzeppelin.com/t/reverted-with-reason-string-governor-unknown-proposal-id/37465/9 "2023-08-14T13:36:27Z")

</div>

I am also getting the error-message `unknown proposal id` (using web3.js instead of ethers.js).

When replacing the call to function `queue` with a call to function `hashProposal`, I get the proposal ID:

```auto
3305017473121473530677496787189256930579673951344400163483606192674066961933

```

I have fetched all `ProposalCreated` events emitted on your contract, then printed their proposal IDs:

```auto
78200510593864238487692413528044418147351996167436432816965808706752306636557
68324702618435287546566225058326033655813071979791565699133978362957942069179
23670505454445824923619623170717269597749117747358593403776194495705034041949
82605036490429841284270784935956661701664080931123134183195205190816283128987
23750871644678753158591412962538059476262346703489738639735527685928527317119

```

None of these IDs corresponds with the one that you are trying to process, hence the error-message.

---

<div class="post-metadata">

**Author:** ![sagaratalatti](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/sagaratalatti/32/19174_2.png) [@sagaratalatti](https://forum.openzeppelin.com/u/sagaratalatti)\
**Post date:** [August 14, 2023, 1:41pm UTC](https://forum.openzeppelin.com/t/reverted-with-reason-string-governor-unknown-proposal-id/37465/10 "2023-08-14T13:41:27Z")

</div>

Ok! Is it the problem with hashMessage ethers' method. Yes it worked after changing `const descriptionHash = ethers.hashMessage((PROPOSAL_DESCRIPTION));` to ` const descriptionHash = ethers.id((PROPOSAL_DESCRIPTION));`

 ![Screenshot 2023-08-14 at 7.16.01 PM](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/3X/c/8/c818ad997e1a31a4c9214f3a148adff66c876eb2.png)

---

<div class="post-metadata">

**Author:** ![barakman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/barakman/32/855_2.png) [@barakman](https://forum.openzeppelin.com/u/barakman)\
**Post date:** [August 14, 2023, 2:00pm UTC](https://forum.openzeppelin.com/t/reverted-with-reason-string-governor-unknown-proposal-id/37465/11 "2023-08-14T14:00:53Z")

</div>

Could be any of the parameters that you pass to function `queue` (or to function `hashProposal`).

I have printed all the rest of the relevant information in those events:

```auto
proposalId : 78200510593864238487692413528044418147351996167436432816965808706752306636557
targets : ['0xFF35DE2b1eb182Afa3205C9a3C283ef02135f8a6']
values : ['0']
calldatas : ['0x6057361d000000000000000000000000000000000000000000000000000000000000004d']
description: Proposal #1 in the governance contract

proposalId : 68324702618435287546566225058326033655813071979791565699133978362957942069179
targets : ['0xFF35DE2b1eb182Afa3205C9a3C283ef02135f8a6']
values : ['1']
calldatas : ['0x6057361d000000000000000000000000000000000000000000000000000000000000004d']
description: Proposal #1 in the governance contract

proposalId : 23670505454445824923619623170717269597749117747358593403776194495705034041949
targets : ['0xFF35DE2b1eb182Afa3205C9a3C283ef02135f8a6']
values : ['256']
calldatas : ['0x6057361d000000000000000000000000000000000000000000000000000000000000004d']
description: This is hilarious string is not going through

proposalId : 82605036490429841284270784935956661701664080931123134183195205190816283128987
targets : ['0xFF35DE2b1eb182Afa3205C9a3C283ef02135f8a6']
values : ['2409']
calldatas : ['0x6057361d000000000000000000000000000000000000000000000000000000000000004d']
description: This proposal shall execute the box store function to save the uint256 passed through proposal

proposalId : 23750871644678753158591412962538059476262346703489738639735527685928527317119
targets : ['0xFF35DE2b1eb182Afa3205C9a3C283ef02135f8a6']
values : ['1992']
calldatas : ['0x6057361d000000000000000000000000000000000000000000000000000000000000004d']
description: This proposal shall execute the box store function to save the uint256 passed through proposal

```

As you can see, there are actually **two** proposals baring this description, so it is **not** the problem.

However, you may notice that one of them has used:

```auto
values = ['2409']`

```

And the other one has used:

```auto
values = ['1992']`

```

When I try `2409`, I get the error-message `proposal not successful`.  
And when I try `1992`, the function call completes successfully.  
Trying it again, I get the error-message `proposal not successful`.  
Probably due to [this transaction](https://sepolia.etherscan.io/tx/0x8fd7d8ec78ead7d377f1e84311791387c6e2f11edd96e417d30646be8021f00f), which has just been executed.
