question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

StaticInjectorError(Platform: core)[l -> n]: NullInjectorError: No provider for n!

See original GitHub issue

Ionic version: [x] 4.10.3

I’m submitting a …

[x] bug report [ ] feature request

Current behavior: I am getting the following error when adding InAppBrowser. ERROR Error: Uncaught (in promise): Error: StaticInjectorError[l -> n]: StaticInjectorError(Platform: core)[l -> n]: NullInjectorError: No provider for n! Error: StaticInjectorError[l -> n]: StaticInjectorError(Platform: core)[l -> n]: NullInjectorError: No provider for n! at e.get (core.js.pre-build-optimizer.js:8895) at core.js.pre-build-optimizer.js:9140 at e (core.js.pre-build-optimizer.js:9084) at e.get (core.js.pre-build-optimizer.js:8981) at core.js.pre-build-optimizer.js:9140 at e (core.js.pre-build-optimizer.js:9084) at e.get (core.js.pre-build-optimizer.js:8981) at Ra (core.js.pre-build-optimizer.js:21217) at e.get (core.js.pre-build-optimizer.js:21906) at Ra (core.js.pre-build-optimizer.js:21217) at P (zone.js.pre-build-optimizer.js:831) at P (zone.js.pre-build-optimizer.js:788) at zone.js.pre-build-optimizer.js:892 at e.invokeTask (zone.js.pre-build-optimizer.js:423) at Object.onInvokeTask (core.js.pre-build-optimizer.js:17289) at e.invokeTask (zone.js.pre-build-optimizer.js:422) at t.runTask (zone.js.pre-build-optimizer.js:195) at g (zone.js.pre-build-optimizer.js:601) at t.invokeTask [as invoke] (zone.js.pre-build-optimizer.js:502) at m (zone.js.pre-build-optimizer.js:1744)

It is working fine natively on my phone but not in any browser in PRODUCTION. I also could add the InAppBrowser to the providers in AppModule since it is says the following: TS2322: Type 'InAppBrowserOriginal' is not assignable to type 'Provider'.   Type 'InAppBrowserOriginal' is not assignable to type 'FactoryProvider'.     Property 'provide' is missing in type 'InAppBrowserOriginal'.

Due to the this, the page where InAppModule is injected doesn’t even load in browsers.

FYI: I am just following the latest ionic documentation for InAppBrowser.

Steps to reproduce: I am just following the latest ionic documentation for InAppBrowser. https://ionicframework.com/docs/native/in-app-browser

Ionic info:

Ionic:

   ionic (Ionic CLI)             : 4.10.3 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.0.2
   @angular-devkit/build-angular : 0.12.4
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.2.4
   @ionic/angular-toolkit        : 1.4.0

Cordova:

   cordova (Cordova CLI) : not installed
   Cordova Platforms     : not available
   Cordova Plugins       : not available

System:

   Android SDK Tools : 26.1.1 (/opt/android_sdk)
   NodeJS            : v11.10.0 (/usr/local/bin/node)
   npm               : 6.8.0
   OS                : macOS Mojave
   Xcode             : Xcode 10.1 Build version 10B61

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
imscreedcommented, Mar 4, 2019

Fixed it.

0reactions
ionitron-bot[bot]commented, Apr 5, 2019

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 5 NullInjectorError: No provider for n - Stack Overflow
When I'm starting my website with ng serve everything works fine, but every try to launch a production getting an error NullInjectorError: No...
Read more >
[Debugging] NullInjectorError: No provider for {Class}!
In this video, you'll learn what the error " NullInjectorError : No provider for {Class}!" means, how to debug it, and prevent it...
Read more >
Staticinjectorerror(platform core) e nullinjectorerror no ...
Ionic app was working perfectly well locally, when I deployed to firebase it keeps showing a white screen. I inspect the page and...
Read more >
Fixing NullInjectorError: No provider for HttpClient - Upmostly
This is such a simple error but one that catches me out on every single new project it seems. The full error is...
Read more >
Angular 7 StaticInjectorError NullInjectorError: No provider for ...
StaticInjectorError (Platform: core)[NavigationService -> Router]: NullInjectorError: No provider for Router! Note that NavigationService is dependent of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found