Skip to content
Mike Christensen edited this page Aug 28, 2026 · 1 revision

Troubleshooting

KPCData.xml was not found

StaticContext.DataDirectory names a directory, not a file. The directory must contain KPCData.xml; a context configured with .CompressedStore looks for KPCData.gz instead. Copy the file to the build output and construct the path from AppContext.BaseDirectory so it does not depend on the shell's current directory.

ContextCapabilityNotEnabledException

The call needs an in-memory feature omitted from the DB profile. Inspect exception.Capability and enable that flag during context construction. Do not catch the exception and return empty data; that hides a configuration error. See capability profiles.

NoConfiguredSearchProvidersException

Add .SearchProvider(NHSearch.Instance) to DatabaseAdapter.Configure, or register your own ISearchProvider. Schema initialization/import does not require a search provider, but recipe search does.

Ingredient text does not parse

Inspect Result.Status. Common causes are a missing ingredient synonym, unknown custom unit, missing default form for the unit type, or incompatible form. Preserve the raw item and use NLP tracing to find the decision point. The sample snapshot is deliberately incomplete.

IncompatibleAmountException or quantities will not aggregate

KitchenPC will not guess between incompatible unit types. Verify that both usages resolve to the same ingredient, their forms have correct conversion metadata, and a weight/volume/unit pairing exists. Present separate rows when a safe conversion is unavailable.

Database table ingredients is missing

The default physical catalog table is named shoppingingredients. This is intentional legacy compatibility. Public types still use Ingredient.

Database schema is missing

Run the Database Initializer against a dedicated empty database. The adapter creates tables, not the database itself. Verify the connection's database name and role privileges.

Existing data disappeared after initialization

DBContext.InitializeStore() recreates the KitchenPC schema. It is destructive and is not a migration command. Restore from backup if available, remove it from normal startup, and use it only for disposable/new databases.

Search returns no rows

Check that recipes were imported, NHSearch or another provider is configured, the offset is valid, and classifications needed by filters exist. Retry with an empty RecipeQuery before adding filters one at a time. RecipeQuery.PageSize is 100.

User list/menu/queue data appears under the wrong user

Log context.Identity at the application boundary without sensitive data. In ASP.NET Core, authenticated mapping expects a GUID in ClaimTypes.Sid and an alias in ClaimTypes.Name; otherwise the scope is anonymous. Never share a mutable per-request identity callback accidentally across concurrent requests.

Recipe method displays HTML tags

Method data may contain HTML. Render as text when markup is not needed. If HTML presentation is desired, sanitize server-side with a conservative allow-list before sending it as trusted content. Never solve this with a blanket frontend innerHTML assignment.

Startup is slow or memory is high

The default profile loads all optional indexes. Select only required capabilities and measure with your data. Recipe modeling cost grows with recipe and rating graph size.

Reporting a bug

Include package versions, runtime/OS, context type and capabilities, a minimal input, result/exception type, sanitized logs, and whether the issue reproduces with the sample dataset. File issues in KitchenPC/core.

Clone this wiki locally