Habmin2 stuck at Loading .. with new openhab2 manual snapshot installation

I’ve got a decent OH1 system working and I’ve decided to start contributing to oh2 since Chris Jackson is primarily contributing to OH2 (and he does cool stuff with zwave). I’d like to stick to a manual installation if possible since it allows me to compile on my dev machine and then test on a dedicated OH2 VM.

I’m having a really tough time getting habmin2 to come up. I can get every other openhab2 UI to load, but when I click on the habmin link from http://host:8080/start/index I only get a white page reading “loading.” This page never loads (even after waiting hours).

I have the 2.0 zwave binding installed and it appears in my "feature:list | grep Started"
I am using the offline openhab 2.0.0 Snapshot build #642 from cloudbees
I have followed these instructions (http://docs.openhab.org/tutorials/migration) almost line by line
My openhab.log w/ debug settings shows:

2016-12-17 10:00:38.468 [DEBUG] [org.openhab.ui.habmin ] - ServiceEvent REGISTERED - {javax.servlet.ServletContext}={osgi.web.symbolicname=org.openhab.ui.habmin, osgi.web.version=, osgi.web.contextpath=/, service.id=273, service.bundleid=196, service.scope=singleton} - org.openhab.ui.habmin
_2016-12-17 10:00:38.468 [DEBUG] [ce.jetty.internal.JettyServerWrapper] - ServletContext registered as service. _
2016-12-17 10:00:38.470 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2016-12-17 10:00:38.470 [DEBUG] [org.openhab.ui.habmin ] - BundleEvent STARTED - org.openhab.ui.habmin

Any help would appreciated.

I would suggest to install HABmin directly from the system - either by adding it to your list of addons, or manually installing through PaperUI. This will ensure you get the latest version as well…

However, I’m not sure that will solve this since it does say the bundle is started. I suspect there might be a problem in the client, so I’d suggest to run the debugger (Firebug, or Chrome etc - I think all browsers have this) and see if there’s an error listed in the console.

Hello. Just to provide some additional info here, I’m seeing the same thing under OH2 build #660 and HABmin installed manually or from the addons interface.

The javascript console is complaining that the HABmin module cannot be found. However, this is after it has loaded a pile of javascript and other resources. The OH2 console shows the HABmin module (spelled all lowercase, though) loaded.

HABmin is listed as started in the logs:
openhab.log:2016-12-21 20:25:49.253 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin

Javascript console errors:
Uncaught ReferenceError: Ext is not defined
at app.js:2

Uncaught Error: [$injector:modulerr] Failed to instantiate module HABmin due to:
Error: [$injector:nomod] Module ‘HABmin’ is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
at http://[redacted]:8080/habmin/lib/angular/angular.js:68:12

More details: Last night, I installed the newest build (664, I think), removed the system-installed HABmin2, and installed it into addons from the latest release downloaded from github. Reloaded OH2, and it works!


I just tried the same thing with the openhab offline build 670 and a newly compiled habmin jar placed in the addons folder. Same error you found above. I tried uninstalling habmin using karaf’s “feature:uninstall openhab-ui-habmin” and also using the paper ui interface. No dice. Everytime I go to http://localhost:8080/habmin/index.html I’m stuck at “loading.” Which distribution of openhab are you using (offline, online, from cloudbees or via a mvn build)? Did you uninstall the base habmin a different way?
Thanks for your help,

It’s worth noting that openhab only has a limited number of sessions available over http. If you are running multiple interfaces at the same time (eg PaperUI and HABmin, HABpanel…) then you might have problems (I see this here).
I’m not sure if this might be related, but I would try shutting down other sessions to see if it helps.

same issue if I only have paperUI loaded prior to adding habmin. Neither adding habmin jar to the addons folder or installing by karaf does the trick. Same error. I’m missing something

Uncaught ReferenceError: Ext is not defined
at app.js:65
(anonymous) @ app.js:65
angular.js:68 Uncaught Error: [$injector:modulerr] Failed to instantiate module HABmin due to:
Error: [$injector:nomod] Module ‘HABmin’ is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
at http://serverip:8080/habmin/lib/angular/angular.js:68:12

Of note, I’m running unbuntu 14.04 and java version 1.8.0_92

I was testing with a cloudbees build of OH2. I set it up with “expert” mode, which installs HABmin. I then went into the addons menu and uninstalled HABmin from there. I downloaded the jar file from the latest HABmin release and dropped that into the addons folder in OH2. I restarted OH2, and it worked. No other magic…


Ummm - what version of HABmin are you trying to run? This looks highly likely that it’s HABmin1 since HABmin2 doesn’t use Ext library. I suspect something somewhere is still picking up some OH1 files since this is definitely not HABmin2.

Thanks for your help. I just used the paper UI to install habmin and got the same error. Is the openhab2 base distro expecting version 1?
Also, I had tried to drop in a fresh jar of habmin from the repo but got the same error. git’s remote -v command is pointing to: https://github.com/openhab/org.openhab.ui.habmin.git


I’m not sure exactly what you mean, but nothing should be linked to V1. I don’t think there’s a problems with the distro as it works fine for everyone else - if the system was somehow downloading V1 it wouldn’t work for anyone.

Are you sure you don’t have a webapps folder or something being served up?

Maybe I’m wrong and it’s nothing to do with a V1 install somewhere, but the error you reported I’m pretty sure is associated with V1 as line 65 in app.js on v1 is Ext.Container.prototype.bufferResize = false; while in V2 it’s sharedDictionary: 'common',. V1 line 65 is the first line of executable code, while V2 line 65 is part of some variable definitions.

I would suggest to use the debugger in your browser to look at the files - see what app.js actually is. Take a look at what files the system is trying to download (in the network tab of the debugger).

I would also double check in Karaf exactly what bundles are running as Karaf can get confused sometimes - especially if you are using the addons folder (I would suggest to avoid putting anything in the addons folder for this reason).

Go figure. You’re right. I looked up the app.js code and found it was identical to the app.js at https://github.com/cdjackson/HABmin/blob/master/app/app.js (i.e. habmin v1)

What’s interesting is that I got this error by

  1. downloading the zipped distro from cloudbees (https://openhab.ci.cloudbees.com/job/openHAB-Distribution/)
  2. unzipping it to /opt/openhab2
  3. executing the start script
  4. pointing my browser to http://localhost:8080
  5. choosing expert
  6. Same error

Then I realized I’m an idiot and that chrome had cached app.js. Pressing ctrl + F5 forced a refresh and solved my issue


Cool - I’m glad you found the actual cause :slight_smile: . Often with this sort of thing it “just starts working” - I hate that as we’re always left wondering if there’s really a bug somewhere.