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

enableShutdownHooks error #335

Open
hkjeffchan opened this issue Aug 9, 2022 · 8 comments
Open

enableShutdownHooks error #335

hkjeffchan opened this issue Aug 9, 2022 · 8 comments
Labels
help wanted Extra attention is needed

Comments

@hkjeffchan
Copy link

"@liaoliaots/nestjs-redis": "^9.0.1",
nestjs 9.0.8

if app.enableShutdownHooks() is called, the following error will be thrown

[Nest] 32992 - 10/08/2022, 02:40:50 ERROR [NestApplicationContext] Error happened during shutdown
Error: Nest could not find Symbol() element (this provider does not exist in the current context)
at InstanceLinksHost.get (/xxx/node_modules/@nestjs/core/injector/instance-links-host.js:21:19)
at ModuleRef.find (/xxx/node_modules/@nestjs/core/injector/module-ref.js:39:55)
at ModuleRef.get (/xxx/node_modules/@nestjs/core/injector/module.js:351:28)
at RedisModule.onApplicationShutdown (/xxx/node_modules/@liaoliaots/nestjs-redis/dist/redis/redis.module.js:68:48)
at callAppShutdownHook (/xxx/node_modules/@nestjs/core/hooks/on-app-shutdown.hook.js:51:35)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at NestApplication.callShutdownHook (/xxx/node_modules/@nestjs/core/nest-application-context.js:208:13)
at process.cleanup (/xxx/node_modules/@nestjs/core/nest-application-context.js:146:17)

@liaoliaots liaoliaots added the help wanted Extra attention is needed label Aug 11, 2022
@quyennt21
Copy link

Maybe fix error:

  • Start Microservices after start http
  • remove enableShutdownHooks

@tngan
Copy link

tngan commented Oct 7, 2022

@hkjeffchan Have you resolved this issue?

@hkjeffchan
Copy link
Author

@hkjeffchan Have you resolved this issue?

no, I just disabled that

@nick4fake
Copy link

Any news? This literally makes the method useless

@nick4fake
Copy link

And shouldn't be onApplicationShutdown replaced with onModuleDestroy?

@nick4fake
Copy link

This change introduces it:
#320

@DecathectZero
Copy link

I have a fix here: #536

@mamun-prospect
Copy link

any new version for that change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

7 participants