# Issue with Autotask And Relayer

**URL:** <https://forum.openzeppelin.com/t/issue-with-autotask-and-relayer/24394>\
**Category:** Defender\
**Tags:** defender\
**Created:** [February 10, 2022, 6:16am UTC](https://forum.openzeppelin.com/t/issue-with-autotask-and-relayer/24394 "2022-02-10T06:16:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/elon/32/13083_2.png) [@elon](https://forum.openzeppelin.com/u/elon)\
**Post date:** [February 10, 2022, 6:16am UTC](https://forum.openzeppelin.com/t/issue-with-autotask-and-relayer/24394/1 "2022-02-10T06:16:41Z")

</div>

Getting unpredictable gas error on Autotask task.

Error:  
`cannot estimate gas; transaction may fail or may require manual gas limit (error={"reason":"cannot estimate gas; transaction may fail or may require manual gas limit","code":"UNPREDICTABLE_GAS_LIMIT","error":`

#### 🔢 Code to reproduce

````auto
  const provider = new DefenderRelayProvider(event);
  const signer = new DefenderRelaySigner(event, provider, { speed: 'fast' });
  // Use provider and signer for querying or sending txs from ethers, for example...
  const contract = new ethers.Contract(ADDRESS, ABI, signer);
  await contract.genesisLockRound();
}```
<!-- The community will be able to better help if you provide a minimal example that reproduces your issue. Place code inside backticks. -->

````

```auto

#### 💻 Environment

<!-- Tell us what you're using including versions: Truffle, Hardhat, Remix, etc. -->
Web Environment
```

---

<div class="post-metadata">

**Author:** ![dylkil](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/dylkil/32/14336_2.png) [@dylkil](https://forum.openzeppelin.com/u/dylkil)\
**Post date:** [February 10, 2022, 11:40am UTC](https://forum.openzeppelin.com/t/issue-with-autotask-and-relayer/24394/2 "2022-02-10T11:40:25Z")

</div>

Hi @elon, this error usually indicates that something within the call may cause your transaction to fail. I dont have access to your contract so I cannot say for sure what thay may be, but double check that there are no revert statements or modifiers on the contract which would prevent it from succeeding.

---

<div class="post-metadata">

**Author:** ![elon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/elon/32/13083_2.png) [@elon](https://forum.openzeppelin.com/u/elon)\
**Post date:** [February 10, 2022, 6:18pm UTC](https://forum.openzeppelin.com/t/issue-with-autotask-and-relayer/24394/3 "2022-02-10T18:18:27Z")

</div>

Great, I will check this out, thank you for the response

---

<div class="post-metadata">

**Author:** ![elon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/elon/32/13083_2.png) [@elon](https://forum.openzeppelin.com/u/elon)\
**Post date:** [February 13, 2022, 8:30am UTC](https://forum.openzeppelin.com/t/issue-with-autotask-and-relayer/24394/4 "2022-02-13T08:30:27Z")

</div>

Resolved and this was the exact issue, I was triggering a function outside of a buffer time and needed to increase the time to handle the time it takes to spin up each time the function runs.
