-
Notifications
You must be signed in to change notification settings - Fork 32
Troubleshooting
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.
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.
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.
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.
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.
The default physical catalog table is named shoppingingredients. This is intentional legacy compatibility. Public types still use Ingredient.
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.
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.
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.
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.
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.
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.
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.
KitchenPC is MIT licensed. Runnable applications live in KitchenPC/Samples.