Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Bug] gRPC Connection Refused when executing Workflows in tests

Abierto
#361 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
38/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
node.js, typescript
Área
testing

Línea de trabajo

Comienza con las pruebas de ejemplo en activities-examples/src/mocha y ejecuta npm install seguido de npm test. Investiga por qué TestWorkflowEnvironment no puede establecer su conexión gRPC en la configuración indicada. Se considera completado cuando las pruebas de ejemplo se ejecutan correctamente sin errores Connection Refused.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug
What are you really trying to do?

I am trying to test executing my Temporal workflows with the @temporalio/testing package.

Describe the bug

Whenever I try to execute a workflow with the testing library (TestWorkflowEnvironment), I see a gRPC error saying that the connection was refused.

I believe this issue surfaced today, as my tests were working up until yesterday, and no changes were made on my end.

Minimal Reproduction

You can reproduce the issue with this repo's example tests in activities-examples/src/mocha.

Steps:

  • Fresh clone of this repo
  • cd activities-examples
  • npm install
  • npm test

Tests error with gRPC Connection Refused

$ git clone https://github.com/temporalio/samples-typescript
$ cd samples-typescript/activities-examples
$ npm install
$ npm test


> [email protected] test
> mocha --require ts-node/register --require source-map-support/register src/mocha/*.test.ts



  example workflow
2024-04-29T21:38:36.476892Z  WARN temporal_client::retry: gRPC call poll_activity_task_queue retried 6 times error=Status { code: Unavailable, message: "error trying to connect: tcp connect error: Connection refused (os error 61)", source: Some(tonic::transport::Error(Transport, hyper::Error(Connect, ConnectError("tcp connect error", Os { code: 61, kind: ConnectionRefused, message: "Connection refused" })))) }
2024-04-29T21:38:36.759551Z  WARN temporal_client::retry: gRPC call poll_activity_task_queue retried 6 times error=Status { code: Unavailable, message: "error trying to connect: tcp connect error: Connection refused (os error 61)", source: Some(tonic::transport::Error(Transport, hyper::Error(Connect, ConnectError("tcp connect error", Os { code: 61, kind: ConnectionRefused, message: "Connection refused" })))) }
...

  0 passing (59s)
  4 failing
Environment/Versions
  • OS and processor: M1 Mac
  • Temporal Version:
$ node --version
v18.18.2
$ npm --version
9.8.1
$ npm list @temporalio/client
[email protected] /Users/markan/samples-typescript/activities-examples
├── @temporalio/[email protected]
├─┬ @temporalio/[email protected]
│ └── @temporalio/[email protected] deduped
└─┬ @temporalio/[email protected]
  └── @temporalio/[email protected] deduped
  • Are you using Docker or Kubernetes or building Temporal from source? N/A, I'm just trying to run the example test from this repo
Additional context
Lenguaje dominante
TypeScript
Estrellas
469
Forks
150
Merge medio
2 d 16 h
PR fusionados (30 d)
3

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de temporalio/samples-typescript

Todos los issues de temporalio/samples-typescript

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.