Getting Started - Problem when adding the Backend (Metadata Related)

Hello, while trying to follow the Getting Started guide, it seems that Edge couldn’t connect to Backend normally (The edge service can connect with UI alone normally). I get these errors on the console of Edge and Backend.

Edge:

java.util.concurrent.ExecutionException: io.openems.common.exceptions.OpenemsError$OpenemsNamedException: No AppCenter Metadata provided.
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
	at io.openems.edge.core.appmanager.AppCenterBackendUtilImpl.handleRequest(AppCenterBackendUtilImpl.java:107)
	at io.openems.edge.core.appmanager.AppCenterBackendUtilImpl.getInstalledApps(AppCenterBackendUtilImpl.java:87)
	at io.openems.edge.core.appmanager.AppSynchronizeWorker.syncAppsWithBackend(AppSynchronizeWorker.java:56)
	at io.openems.edge.core.appmanager.AppSynchronizeWorker.forever(AppSynchronizeWorker.java:44)
	at io.openems.common.worker.AbstractWorker$1.run(AbstractWorker.java:156)
Caused by: io.openems.common.exceptions.OpenemsError$OpenemsNamedException: No AppCenter Metadata provided.
	at io.openems.common.websocket.WsData.handleJsonrpcResponse(WsData.java:131)
	at io.openems.common.websocket.OnResponseHandler.run(OnResponseHandler.java:23)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

Backend:

WARN  [mon.websocket.OnRequestHandler] [Edge.Websocket] JSON-RPC Error "No AppCenter Metadata provided." of type NullPointerException for Request {"method":"appCenter","params":{"payload":{"method":"getInstalledApps","params":{}}}}

About UI, in the console of the browser, I can see logs that a request is happening to authenticate with password but the response returns no edges.

{token: 'aafbca37-cc49-48d3-8bc0-732c80e07c01', user: {…}, edges: Array(0)}

Thank you.

WARN [mon.websocket.OnRequestHandler] [Edge.Websocket] JSON-RPC Error “No AppCenter Metadata provided.” of type NullPointerException for Request {“method”:“appCenter”,“params”:{“payload”:{“method”:“getInstalledApps”,“params”:{}}}}

I can currently only tell you that this error has nothing to do with the backend. What backend are you using? How is it set up?

I’m not saying it’s backend’s fault.

For the set up I followed the instructions of Getting Started guide. First created the Edge service, then the local UI and it worked normally. After that, I added the Backend service, based on the guide again, and started the local UI with the proper command to connect to the backend service.

As for the error No Appcenter Metadata provided, it happens when adding the backend in both services Edge & Backend, also the backend needs to set Metadata.Dummy when configuring it.

You need to connect an OpenEMS edge instance to the OpenEMS Backend.
You need to configure the backend appropriately (it needs a dependancy between a User which logs in to the OpenEMS UI and an edge). Most easy way to do so, is to activate the Metadata.Dummy bundle within your Backend. Other Metadata implementations (e.g. Metadata.Odoo) give you more freedom to manage the User ↔ Edge dependancies.

You need to configure the backend appropriately (it needs a dependancy between a User which logs in to the OpenEMS UI and an edge). Most easy way to do so, is to activate the Metadata.Dummy bundle within your Backend.

And exactly that’s what I’m doing, following the steps of the Getting Started guide, connecting the Backend with the Edge and activating the Metadata.Dummy. :person_shrugging:

Thanks for bringing this up. Due to a recent change a UI filter had been wrongly applied. I fixed this just now in develop:

Regards,
Stefan