Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

983
Visualizações
Error: PollingBlockTracker - encountered an error while attempting to update latest block: undefined

I'm trying to develop DApp on polygon blockchain. Basically I'm minting NFT but after few mints I get this error. It even happens when I don't mint NFT. Here is my code.

const Web3 = require("web3")
const fs = require("fs")
var HDWalletProvider = require("@truffle/hdwallet-provider");
var provider = new HDWalletProvider(SECRET_PHRASE, "https://rpc-mumbai.maticvigil.com")
const web3 = new Web3(provider)
const constractJSON = JSON.parse(fs.readFileSync(`${process.cwd()}/contracts/Collection.json`))
const abi = constractJSON["abi"]
const byteCode = constractJSON["byteCode"]["object"]





const mintNFT = async (contractAddress,tokenURI,to) => {

    const contract = await new web3.eth.Contract(abi, contractAddress)    

    const result = await contract.methods.claimItem(tokenURI,to).send({from: WALLET_ADDRESS,gasLimit:6000000},)  
}

module.exports = mintNFT

Here is the full Error.

mint_service_1  | /usr/src/app/node_modules/safe-event-emitter/index.js:74
mint_service_1  |       throw err
mint_service_1  |       ^
mint_service_1  |
mint_service_1  | Error: PollingBlockTracker - encountered an error while attempting to update latest block:
mint_service_1  | undefined
mint_service_1  |     at PollingBlockTracker._performSync (/usr/src/app/node_modules/eth-block-tracker/src/polling.js:51:24)
mint_service_1  |     at processTicksAndRejections (node:internal/process/task_queues:96:5)
mint_service_1  | Emitted 'error' event on Web3ProviderEngine instance at:
mint_service_1  |     at safeApply (/usr/src/app/node_modules/safe-event-emitter/index.js:70:5)
mint_service_1  |     at PollingBlockTracker.SafeEventEmitter.emit (/usr/src/app/node_modules/safe-event-emitter/index.js:56:5)
mint_service_1  |     at PollingBlockTracker._performSync (/usr/src/app/node_modules/eth-block-tracker/src/polling.js:53:16)
mint_service_1  |     at processTicksAndRejections (node:internal/process/task_queues:96:5)
about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I got the same issue. You can see the error log below

const newErr = new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\n${err.stack}`)
                       ^
    Error: PollingBlockTracker - encountered an error while attempting to update latest block:
    undefined
        at PollingBlockTracker._performSync (/Users/buuthongtran/Downloads/FlightSurety/node_modules/eth-block-tracker/src/polling.js:51:24)
        at processTicksAndRejections (internal/process/task_queues.js:95:5)
    npm ERR! Test failed.  See above for more details.

I found out I forgot to launch Ganache before running truffle test, so I tried launching Ganache and input the right mnemonic and port. The issue went away after that.

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda