OH 4.2.0 dependency issues

Hi there,

after moving to 4.2.0 i don’t seem to be able to install addons any more:

2024-01-16 15:30:57.714 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed to refresh bundles after processing config update
org.apache.felix.resolver.reason.ReasonException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-runtime-base; type=karaf.feature; version="[4.2.0.SNAPSHOT,4.2.0.SNAPSHOT]"; filter:="(&(osgi.identity=openhab-runtime-base)(type=karaf.feature)(version>=4.2.0.SNAPSHOT)(version<=4.2.0.SNAPSHOT))" [caused by: Unable to resolve openhab-runtime-base/4.2.0.SNAPSHOT: missing requirement [openhab-runtime-base/4.2.0.SNAPSHOT] osgi.identity; osgi.identity=openhab-core-base; type=karaf.feature [caused by: Unable to resolve openhab-core-base/4.2.0.SNAPSHOT: missing requirement [openhab-core-base/4.2.0.SNAPSHOT] osgi.identity; osgi.identity=org.openhab.core.automation; type=osgi.bundle; version="[4.2.0.202401160309,4.2.0.202401160309]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.core.automation/4.2.0.202401160309: missing requirement [org.openhab.core.automation/4.2.0.202401160309] osgi.wiring.package; filter:="(&(osgi.wiring.package=com.google.gson.reflect)(version>=2.10.0)(!(version>=3.0.0)))" [caused by: Unable to resolve com.google.gson/2.10.1.v20230109-0753: missing requirement [com.google.gson/2.10.1.v20230109-0753] osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.7))"]]]]
	at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341) ~[org.eclipse.osgi-3.18.0.jar:?]
	at org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:433) ~[org.eclipse.osgi-3.18.0.jar:?]
	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:420) ~[org.eclipse.osgi-3.18.0.jar:?]
	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:374) ~[org.eclipse.osgi-3.18.0.jar:?]
	at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:256) ~[?:?]
	at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:399) ~[?:?]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1069) ~[?:?]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:1004) ~[?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
	at java.lang.Thread.run(Thread.java:840) [?:?]

Can’t quite get the clue what is wrong. Did some searching but didn’t find anything really reflecting my issue.

Java version is:

openjdk version "17.0.9" 2023-10-17
OpenJDK Runtime Environment (build 17.0.9+9-Ubuntu-122.04)
OpenJDK Server VM (build 17.0.9+9-Ubuntu-122.04, mixed mode, sharing)

Any clue would be very welcome

Try:

  • Stop openhab
  • rm -rf userdata/cache/* userdata/tmp/*
  • start openhab

Tried, but with no luck, unfortunately

What’s your environment? Can you try reinstalling?

Reinstalling what? The whole openhab installation?

Yes, the whole openhab. As long as you don’t overwrite your config! Have backups!

But if you’re using openhabian, I didn’t mean the whole openhabian (as I’m unfamiliar with it). That’s why I asked “What’s your environment?”.

Hm, that would involve losing historical data, right? And what about the addons?

You could just extract openhab’s runtime folder, that shouldn’t overwrite any data.

First thing to try is clearing the cache. add-on and bundle issues like this are often caused by or fixable by something messed up in the cache.

OP claimed to have done it, but I wonder if she entered the command verbatim without being in the right directory… is there a fool proof set of instructions to clear cache?

The best way is to use openhab-cli clean-cache if openhab-cli is available. Otherwise see Clear the Cache. I think there are some brief instructions buried in the docs too but I don’t know where.

I did both and yes, i was in the right directory.

Am a bit hesitating to do a reinstall from scratch, though. But if that’s the only real way to do, i will do so.

Unfortunately this is a pretty base and fundamental problem. I don’t think there are any half measures that will work past clearing the cache.

If you run openhab-cli backup, you’ll get a backup of all the configs you’ve done with OH. After removing and reinstalling you can use openhab-cli restore to recover your configs.

Well, long story short: after doing the exact same commands again, restarting and finally even rebooting and waiting a really long time, the pending plugins now got installed. Sorry for bothering everyone, it’s just working now for no apparent reason.

Thanks for the help, is greatly appreciated.

1 Like

Could have been an intermittent networking issue on the server side. There may have been nothing on your side causing problems at all. These types of things crop up from time to time but usually they are rare.

Good luck on your home automation adventures! We’re here if you run into any more troubles or need help.

Downloads from the snapshot server is very slow