Base solution for your next web application
Open Closed

Null exception on register page #9388


User avatar
0
mahendra created

Hi support,

We have customized the register page by adding some new fields. To do this we have used the wizard instead of doing manual changes in the register page. After compilation, if we test the "Register" button, code is working fine on localhost i.e. on the development machine but getting below mentioned error if we deploy the solution at public URL. For your reference, our public hosted URL is below on which we are getting error: http://oewebuidevwin.westus.cloudapp.azure.com:91/

Following exception is coming in the browser console.

Exception and Product info:

ERROR Error: Uncaught (in promise): NullInjectorError: StaticInjectorError[n -> n]: StaticInjectorError(Platform: core)[n -> n]: NullInjectorError: No provider for n! NullInjectorError: StaticInjectorError[n -> n]: StaticInjectorError(Platform: core)[n -> n]: NullInjectorError: No provider for n! at e.get (main.27a131212635f0042b00.js:1) at main.27a131212635f0042b00.js:1 at e (main.27a131212635f0042b00.js:1) at e.get (main.27a131212635f0042b00.js:1) at main.27a131212635f0042b00.js:1 at e (main.27a131212635f0042b00.js:1) at e.get (main.27a131212635f0042b00.js:1) at Sf (main.27a131212635f0042b00.js:1) at e.get (main.27a131212635f0042b00.js:1) at Sf (main.27a131212635f0042b00.js:1) at j (polyfills.b9d3a8e21533e34a7a7b.js:1) at j (polyfills.b9d3a8e21533e34a7a7b.js:1) at polyfills.b9d3a8e21533e34a7a7b.js:1 at t.invokeTask (polyfills.b9d3a8e21533e34a7a7b.js:1) at Object.onInvokeTask (main.27a131212635f0042b00.js:1) at t.invokeTask (polyfills.b9d3a8e21533e34a7a7b.js:1) at e.runTask (polyfills.b9d3a8e21533e34a7a7b.js:1) at b (polyfills.b9d3a8e21533e34a7a7b.js:1) at e.invokeTask [as invoke] (polyfills.b9d3a8e21533e34a7a7b.js:1) at b (polyfills.b9d3a8e21533e34a7a7b.js:1)

Product version-8.2.0 Product type (Angular or MVC)-Angular Product framework type (.net framework or .net core)-.net core

Regards, Mahendra


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @mahendra,

    The error message is not helpful since published code is minified. Probably you need to add a service to providers of app.module. If you can't find the reason, please share your final register.component.ts.