Backend AppCenterHandler: return empty results when no AppCenter metadata service is present - #3866
Open
schlabsch wants to merge 2 commits into
Open
Backend AppCenterHandler: return empty results when no AppCenter metadata service is present#3866schlabsch wants to merge 2 commits into
schlabsch wants to merge 2 commits into
Conversation
Deployments without an AppCenter metadata service (e.g. file-based
metadata) currently get a hard JSON-RPC error ('No AppCenter Metadata
provided.') for every appCenter request that Edges and the UI send
routinely (getInstalledApps, getPossibleApps, ...). The 2026.x UI does
not tolerate this error and can crash when navigating away from pages
that issue these requests; backend logs fill with NPE warnings.
Answer with benign empty results instead: empty installedApps/bundles/
keys, isKeyApplicable=false, isAppFree=false — so clients degrade
gracefully when the optional AppCenter service is absent.
Sn0w3y
requested changes
Aug 4, 2026
| ) throws OpenemsNamedException { | ||
| Objects.requireNonNull(metadata, "No AppCenter Metadata provided."); | ||
| if (metadata == null) { | ||
| // OrbitEOS patch: no AppCenter metadata service in this deployment. |
Collaborator
There was a problem hiding this comment.
OrbitEOS Reference should be removed.
| ) throws OpenemsNamedException { | ||
| Objects.requireNonNull(metadata, "No AppCenter Metadata provided."); | ||
| if (metadata == null) { | ||
| // OrbitEOS patch: see handleUserRequest. |
Collaborator
There was a problem hiding this comment.
OrbitEOS should be removed.
Contributor
|
@michaelgrill: I'd like to have your opinion on this patch. Seems legit to me. |
schlabsch
added a commit
to schlabsch/openems
that referenced
this pull request
Aug 17, 2026
Addresses review feedback on OpenEMS#3866. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TGtVEQm5wxGwmpRKjr41Ly
schlabsch
added a commit
to schlabsch/openems
that referenced
this pull request
Aug 17, 2026
Addresses review feedback on OpenEMS#3866.
schlabsch
force-pushed
the
fix/appcenter-null-metadata
branch
from
August 17, 2026 03:49
c389754 to
c0376e0
Compare
schlabsch
added a commit
to schlabsch/openems
that referenced
this pull request
Aug 17, 2026
Addresses review feedback on OpenEMS#3866.
schlabsch
force-pushed
the
fix/appcenter-null-metadata
branch
from
August 17, 2026 03:55
c0376e0 to
4414a4c
Compare
Addresses review feedback on OpenEMS#3866.
schlabsch
force-pushed
the
fix/appcenter-null-metadata
branch
from
August 17, 2026 04:22
4414a4c to
77028ad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Deployments without an AppCenter metadata service — e.g.
Metadata.Filebased setups, which have no Odoo/AppCenter backend — receive a hard JSON-RPC error for everyappCenter/*request:Edges send
getInstalledAppsperiodically and the UI issues appCenter requests on edge pages, so backend logs fill withJSON-RPC Error "No AppCenter Metadata provided." of type NullPointerException, and the 2026.x UI can crash when navigating away from pages that triggered these requests (observed on 2026.8.0: UI breaks when returning from the edge app view on a file-metadata deployment).Fix
When the injected
AppCenterMetadataisnull,AppCenterHandlernow returns benign empty results instead of throwing:getInstalledApps→{ "installedApps": [] }getPossibleApps→{ "bundles": [] }getRegisteredKeys→{ "keys": [] }isKeyApplicable→{ "isKeyApplicable": false, "additionalInfo": {} }isAppFree→{ "isAppFree": false }Clients degrade gracefully: the UI shows an empty App Center, Edges get valid empty responses, logs stay clean. Verified on a live 2026.8.0 deployment (file metadata, 6 edges): the UI navigation crash disappears and the appCenter requests return the empty results above.
Related: #3865 (same deployment class — file-based metadata with the split backend / backend-edge topology).