langgenius/dify · error · Error

E2E teardown errors: ${cleanupErrors.join('\n')}

Error message

E2E teardown errors:
${cleanupErrors.join('\n')}

What it means

Error "E2E teardown errors: ${cleanupErrors.join('\n')}" thrown in langgenius/dify.

Source

Thrown at e2e/scripts/run-cucumber.ts:101

  let difyAgentProcess: ManagedProcess | undefined
  let middlewareStarted = false
  let shellctlProcess: ManagedProcess | undefined

  let cleanupPromise: Promise<void> | undefined
  const cleanup = async () => {
    if (!cleanupPromise) {
      cleanupPromise = (async () => {
        const cleanupErrors = await runCleanupTasks([
          { label: 'Stop web server', run: stopWebServer },
          { label: 'Stop celery worker', run: () => stopManagedProcess(celeryProcess) },
          { label: 'Stop API server', run: () => stopManagedProcess(apiProcess) },
          { label: 'Stop agent backend', run: () => stopManagedProcess(difyAgentProcess) },
          { label: 'Stop shellctl sandbox', run: () => stopManagedProcess(shellctlProcess) },
          ...(middlewareStarted ? [{ label: 'Stop middleware', run: stopMiddleware }] : []),
        ])

        if (cleanupErrors.length > 0)
          throw new Error(`E2E teardown errors:\n${cleanupErrors.join('\n')}`)
      })()
    }

    await cleanupPromise
  }

  const onTerminate = () => {
    void cleanup()
      .catch((error) => {
        console.error(error instanceof Error ? error.message : String(error))
      })
      .finally(() => {
        process.exit(1)
      })
  }

  process.once('SIGINT', onTerminate)
  process.once('SIGTERM', onTerminate)

View on GitHub (pinned to ef8544b173)

When it happens

Trigger: Thrown at e2e/scripts/run-cucumber.ts:101 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of langgenius/dify@ef8544b173 (2026-08-12). Data as JSON: /api/errors/a16fc68a4d7f06e7. Report an issue: GitHub.