[Solved] revert on `evm_increaseTime` when running test on mainnet fork

cgeyser Asks: revert on `evm_increaseTime` when running test on mainnet fork
I am trying to run the test on mainnet fork using hardhat-deploy example template, particularly the for-test branch example.

GitHub – wighawag/template-ethereum-contracts at examples/fork-test

After providing the .env variables. I ran yarn fork:test mainnet

But I kept getting stuck at this particular error on the aToken_Dai test. I thought maybe the ABI was outdated and tried updating it from the mainnet contract but still doesn’t work. Test kept getting reverted when running evm_increaseTime. Am I missing anything that needs to pass the test?

aave.test.ts

Code:
   ...
    await network.provider.request({
      method: 'evm_increaseTime',
      params: [3600 * 24 * 365],
    });
   ...

Code:
$ node ./_scripts.js fork:test mainnet


  GreetingsRegistry
Nothing to compile
No need to generate any newer typings.
    ✔ setMessage works (7855ms)

  SimpleERC20
    ✔ transfer fails
    ✔ transfer succeed

  aToken_Dai
    1) aToken_Dai works


  3 passing (43s)
  1 failing

  1) aToken_Dai
       aToken_Dai works:
     Error: VM Exception while processing transaction: revert SafeERC20: low-level call failed
    at <UnrecognizedContract>.<unknown> (0x7d2768de32b0b80b7a3454c06bdac94a69ddc7a9)
    at <UnrecognizedContract>.<unknown> (0x7d2768de32b0b80b7a3454c06bdac94a69ddc7a9)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at HardhatNode._mineBlockWithPendingTxs (node_modules/hardhat/src/internal/hardhat-network/provider/node.ts:1154:23)
    at HardhatNode.mineBlock (node_modules/hardhat/src/internal/hardhat-network/provider/node.ts:377:16)
    at EthModule._sendTransactionAndReturnHash (node_modules/hardhat/src/internal/hardhat-network/provider/modules/eth.ts:1377:18)
    at HardhatNetworkProvider.request (node_modules/hardhat/src/internal/hardhat-network/provider/provider.ts:101:18)
    at EthersProviderWrapper.send (node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20)

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.