Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix : client is undefined in startTracing() in service.ts #35408

Open
NawazTalha opened this issue Mar 6, 2025 · 0 comments · May be fixed by #35409
Open

fix : client is undefined in startTracing() in service.ts #35408

NawazTalha opened this issue Mar 6, 2025 · 0 comments · May be fixed by #35409

Comments

@NawazTalha
Copy link

In rocket.chat/_templates/service/new/service.ejs.t

the function startTracing() is called with a client variable, but client is not defined anywhere in the file. This causes a runtime error when the service starts.

Image

Steps to reproduce

  • find the file Rocket.chat/_templates/service/new/service.ejs.t

  • find this line startTracing({ service: '<%= name %>', db: client });

  • Notice that client is never declared in this file.

  • Try running the service—it will fail due to the missing client variable.

Expected behavior:

The function should use db instead of client because db is already defined from getConnection().

Actual behavior:

Error: ReferenceError: client is not defined

The service fails at runtime because client is never declared.

Additional Context:
This is a small fix that requires replacing client with db in startTracing(). I’d be happy to submit a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant