Open Closed

Issue with Dependency Injection Error After Upgrading to ABP 8.3.2 #8163


User avatar
0
mert.kir created
  • ABP Framework version: v8.3.2
  • UI Type: Angular
  • Database System: EF Core (SQL Server, PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:

After upgrading from ABP 8.2.3 to 8.3.2, I encountered a runtime error related to dependency injection. The error appears when launching the application and states:

RuntimeError: NG0203: inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`.
The error seems to originate from services like ToasterService and LinkLoginHandler. Prior to the upgrade, the application was working without this issue. I've attached a screenshot of the console output for reference.

Steps to Reproduce:

  1. Upgrade from ABP 8.2.3 to 8.3.2.
  2. Start the Angular application.
  3. Observe the console logs for the injection-related errors.

Expected Behavior: The application should run without dependency injection errors after the upgrade.

Actual Behavior: The application fails to properly inject services, leading to runtime errors and a disrupted user experience.

Note: We are using the Lepton theme in our Angular project Also, could you provide guidance on how to specify the Lepton theme when creating a new project using the ABP CLI? The current documentation only mentions creating projects with the --theme parameter for Basic or Lepton-X themes. However, we are specifically using the Lepton theme. How should the command be structured to use Lepton as the theme?


No answer yet!
Made with ❤️ on ABP v9.1.0-preview. Updated on November 18, 2024, 05:54