Skip to content

[auto] TypeError: undefined is not a function — Object.complete/execute (.jsc runtime) #1

Description

@thbragamx

Auto-detected — QA Auto-Healing 07/05/2026

Padrão: TypeError: undefined is not a function
Frequência: 18x total | 6x nas últimas 4h — threshold atingido
Severidade: 🔴 CRÍTICA — UNHANDLED REJECTION em produção

Stack Trace Recorrente

TypeError: undefined is not a function
    at Object.complete (evalmachine.<anonymous>:1:1994)
    at Object.execute (evalmachine.<anonymous>:1:10293)
    at async Object.executeTool (evalmachine.<anonymous>:1:5386)
    at async _executeToolWithDelegate (evalmachine.<anonymous>:1:44107)
    at async GeminiLiveSession.<anonymous> (evalmachine.<anonymous>:1:33476)

Análise de Causa Raiz

  • Código compilado .jsc via bytenode — stack aponta evalmachine
  • Erro dispara após GeminiLiveSession WS fechar (code 1000/1008) ou ORCHESTRATOR_MAX_LOOPS
  • O executor de tool tenta invocar complete() em objeto de sessão já destruído
  • Padrão consistente: sempre precedido por [gemini-live] WS closed

Hipótese de Fix

// Adicionar guard antes de invocar complete()
if (this.session && typeof this.session.complete === 'function') {
  await this.session.complete(result);
} else {
  logger.warn('[executor] session already closed — skipping complete()');
}

Impacto

Agentes: dev, qa, zara, data, flux — usuário não recebe resposta final da chain

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions