Injector boot exception doesn't provide any information for debugging
See original GitHub issueBug Report
Current behavior
Recently attempted an update from 8.0.4 -> 8.0.6, and started receiving errors from this exception. https://github.com/nestjs/nest/blob/master/packages/core/injector/injector.ts#L108
It appears just after discovery module is loaded, and provides no information on why it is being thrown.
Error:
at Injector.loadInstance (..../node_modules/@nestjs/core/injector/injector.js:36:19)
at Injector.loadProvider (..../node_modules/@nestjs/core/injector/injector.js:69:20)
at Injector.resolveComponentHost (..../node_modules/@nestjs/core/injector/injector.js:156:24)
at Injector.resolveComponentInstance (..../node_modules/@nestjs/core/injector/injector.js:150:21)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at resolveParam (..../node_modules/@nestjs/core/injector/injector.js:103:38)
at async Promise.all (index 3)
at Injector.resolveConstructorParams (..../node_modules/@nestjs/core/injector/injector.js:118:27)
at Injector.loadInstance (..../node_modules/@nestjs/core/injector/injector.js:47:9)
at Injector.loadProvider (..../node_modules/@nestjs/core/injector/injector.js:69:9)
at Injector.lookupComponentInImports (..../node_modules/@nestjs/core/injector/injector.js:225:17)
at Injector.lookupComponentInParentModules (..../node_modules/@nestjs/core/injector/injector.js:191:33)
at Injector.resolveComponentInstance (..../node_modules/@nestjs/core/injector/injector.js:149:33)
at resolveParam (..../node_modules/@nestjs/core/injector/injector.js:103:38)
at async Promise.all (index 0)
at Injector.resolveConstructorParams (..../node_modules/@nestjs/core/injector/injector.js:118:27)
Expected behavior
Exceptions being thrown during boot time should provide some explanation as to why they are being thrown
Possible Solution
Add additional context to the message. Any additional secondary information around what that error is that might be of use before I jump in and attempt to find my breaking module would be appreciated.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Complete Guide to Exception Handling in Spring Boot
This article showcases various ways to handle exceptions in a Spring Boot Application.
Read more >Failed Autowired of BuildProperties Spring Boot 2.1.5 & eclipse
Just run a mvn clean package and then restart the spring boot application from either Eclipse/IntelliJ.
Read more >Exceptions - OSDev Wiki
Error code: The Debug exception does not set an error code. However, exception information is provided in the debug registers (CPU_Registers_x86 ...
Read more >Diagnose exceptions in web apps with Application Insights
Re-create the exception. Open the Application Insights Search telemetry window in Visual Studio. While debugging, select the Application ...
Read more >Top 10 Most Common Spring Framework Mistakes - Toptal
As Spring Boot's website states, Spring Boot takes an opinionated view on ... so this article will try to mimic that view and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ccontour there’s no additional context to this error because you should never really face it in the real-world application. If you figure to somehow track this issue down/create a mini repository that recreates this error, that would be very helpful!
@micalevisk Yes, I have a few that are set up as TRANSIENT. Thanks for the push in that direction, it seems that was the key to finding the breaking service.
The service I am using as my logger is set up as TRANSIENT, and is attempting to inject INQUIRER in order to gain additional context information for log messages. It’s getting pulled in all over the place, so that’s probably why things bombed so early in startup for for me.
Pulling the scope gets me past the boot error, but breaks the INQUIRER injection. Keeping the scope, and removing the injection does not resolve the error. I’m guessing this is an interaction between multiple services, so I’m continuing to poke around for it’s accomplice