I get this error when only autoloading styles:
angular.js:12477 Error: [$injector:unpr] Unknown provider: NotifierProvider <- Notifier <- globalState <- timefilter
http://errors.angularjs.org/1.4.7/$injector/unpr?p0=NotifierProvider%20%3C-%20Notifier%20%3C-%20globalState%20%3C-%20timefilter
at angular.js:68
at angular.js:4289
at Object.getService [as get] (angular.js:4437)
at angular.js:4294
at getService (angular.js:4437)
at Object.invoke (angular.js:4469)
at instantiate (private.js:144)
at get (private.js:162)
at Private (private.js:182)
at new <anonymous> (global_state.js:10)
This only happens if I set up the router.
I've got a minimal example running with this error. Here is the main file, index.js:
module.exports = (kibana) => new kibana.Plugin({
id: 'my-app',
uiExports: {
app: {
title: 'My app',
main: 'plugins/my-app',
autoload: kibana.autoload.styles
}
}
});
and in public/index.js:
import chrome from 'ui/chrome';
import routes from 'ui/routes';
chrome
.setRootController(() => {
console.log('app is running');
});
routes
.when('/', {
template: '<div></div>',
controller: () => {
console.log('root')
}
})
.otherwise({ redirectTo: '/' });
Whenever I refresh this app I get the error. If I add more routes and add urls to jump between them, I get this error:
angular.js:12477 Error: Circular refrence to "StateProvider" found while resolving private deps: StateProvider
at instantiate (private.js:135)
at get (private.js:162)
at Private (private.js:182)
at new <anonymous> (global_state.js:10)
at invoke (angular.js:4478)
at Object.instantiate (angular.js:4486)
at Object.<anonymous> (angular.js:4346)
at Object.invoke (angular.js:4478)
at Object.enforcedReturnValue [as $get] (angular.js:4330)
at Object.invoke (angular.js:4478)
@spalger can you look at this?
@BigFunger didn't you have to work around this in your plugin?
Btw, if I disable Kibana and Elasticsearch, but _don't_ disable autoloading, I get the following error when running my plugin:
Error: Uncaught Error: [$injector:unpr] Unknown provider: kbnIndexProvider <- kbnIndex <- config
http://errors.angularjs.org/1.4.7/$injector/unpr?p0=kbnIndexProvider%20%3C-%20kbnIndex%20%3C-%20config (http://localhost:5601/bundles/commons.bundle.js:31998)
at window.onerror (notify.js:39)
If I disable autoloading I end up with #5349.
My config:
$ cat config/kibana.dev.yml
---
kibana.enabled: false
elasticsearch.enabled: false
optimize:
sourceMaps: '#cheap-module-source-map'
unsafeCache: true
lazyPrebuild: false
At some point this was fixed. Haven't seen this problem lately on master.
i face this issue with kibana 4.4.1
I'm seeing the config error in 4.5 using the kibana-plugin generator as well. I don't have the option to change kibana versions...
Most helpful comment
i face this issue with kibana 4.4.1