Diagnostic codes¶
Every problem PDK reports has a stable code. A code never changes meaning between versions; new problems get new codes. A diagnostic is printed as:
<severity> <code> <JSON pointer> (<component path>) | <message> | hint: <hint>
where the severity is E (error), W (warning) or I (information). The same code can be reported with
different severities when PDK is more or less certain (for example B010 is an error for and/or/not
and a warning for an expression the offline parser does not understand). pdk catalog --topic codes prints this
list from the installed version.
Structure (S)¶
Produced by the validator for the shape of the view.json and its components.
Code |
Name |
Meaning |
|---|---|---|
|
invalid-json |
The file is not valid JSON, or cannot be read. |
|
unknown-view-key |
A top-level key that a view does not have (valid: |
|
missing-root |
The view has no |
|
malformed-member |
A view member that must be an object is not (for example |
|
unknown-component-key |
A component key that does not exist (valid: |
|
missing-type |
A component without |
|
unknown-component-type |
A component type that this Perspective version does not have. |
|
children-on-leaf |
|
|
missing-name |
A component without |
|
root-name |
The root component is not named |
|
duplicate-name |
Two siblings share a name, so paths to them are ambiguous. |
|
deprecated-component |
The component type is deprecated in this version. |
Props, meta and position (P)¶
Produced by the validator against the component schemas of the installed Perspective.
Code |
Name |
Meaning |
|---|---|---|
|
unknown-prop |
A prop the component does not declare, usually a typo; the hint suggests the closest one. |
|
wrong-type |
A prop value of the wrong type (for example a number where a string is expected). |
|
invalid-enum |
A value outside the allowed set. |
|
missing-required |
A required prop is missing. |
|
schema-violation |
Any other violation of the prop’s schema (range, pattern, item shape). |
|
unknown-style-key |
A style key that is not a CSS property in camelCase (for example |
|
unknown-meta-key |
A key in |
|
invalid-name |
A component name with characters that break paths. Names use letters, digits, spaces, |
|
unknown-position-key |
A |
Bindings and propConfig (B)¶
Code |
Name |
Meaning |
|---|---|---|
|
unknown-binding-target |
A |
|
unknown-propconfig-key |
A key in a |
|
unknown-binding-type |
A binding type that does not exist (the expression binding is |
|
invalid-binding-config |
Missing or unknown keys in a binding’s |
|
unknown-transform-type |
A transform type that does not exist. |
|
invalid-transform |
Missing or unknown keys in a transform. |
|
invalid-param-direction |
A |
|
invalid-onchange |
A malformed |
|
invalid-propconfig-value |
A |
|
expression-syntax |
An expression that does not parse: |
|
unknown-expression-function |
An expression calls a function the gateway does not register (with “did you mean”). Checked when the
bundle has the gateway’s function list ( |
Events and scripts (E)¶
Code |
Name |
Meaning |
|---|---|---|
|
unknown-event-group |
An event group other than |
|
unknown-event |
An event the component does not fire. |
|
unknown-action-type |
An action type that does not exist. |
|
wrong-action-scope |
An action with the wrong scope: |
|
invalid-action-config |
Missing or unknown keys in an action’s |
|
unknown-scripts-key |
An unknown key in a component’s |
|
script-not-indented |
A script body line without a leading tab. Ignition wraps every body in a function, so it would fail to parse at runtime. Only lines that start a Python statement count: lines inside a triple-quoted string or open brackets, after a backslash continuation, or holding only a comment may start at column 0. |
|
unknown-system-function |
A script uses a |
|
script-syntax |
A script that the gateway’s Jython 2.7 does not compile, with the line of the body. Checked by
|
|
unknown-extension-function |
An entry of |
References (R)¶
R010 to R016 need a project (--project, or a view inside a project tree).
Code |
Name |
Meaning |
|---|---|---|
|
undeclared-view-param |
A reference to |
|
undeclared-custom |
A reference to a |
|
unknown-prop-ref |
A reference to a section or property that its target does not have (a view has |
|
unresolved-component-path |
A component path ( |
|
incomplete-ref |
A reference that stops at a component without naming a property. |
|
unknown-session-prop |
A |
|
unknown-ref-root |
A reference whose first segment is not a known root (such as |
|
view-not-found |
An embedded view, repeater, popup or navigation target that the project does not have. |
|
param-undefined |
A parameter passed to a view that does not declare it (Perspective would ignore it silently). |
|
param-direction-mismatch |
A parameter passed to a view that declares it output-only, so passing it has no effect. |
|
required-param-missing |
The target view declares a parameter without a default, and it is not passed. |
|
param-type-mismatch |
A parameter value whose type differs from the type of the target’s default. |
|
style-class-not-found |
A style class that the project does not define. |
|
named-query-not-found |
A query binding whose named query ( |
Design lint (HMI)¶
Information-level advice. HMI002, HMI003, HMI004, HMI006, HMI007 and HMI008 apply only with
--profile hmi (the hmi-* design-token classes).
Code |
Name |
Meaning |
|---|---|---|
|
inconsistent-button-sizing |
Buttons in the same group with different sizing ( |
|
missing-command-variant |
A button without a command variant class (primary, secondary, destructive). |
|
multiple-primary-actions |
More than one primary action in a group. |
|
missing-group-spacing |
A group of several children without a spacing class or gap. |
|
redundant-layout-wrapper |
A flex container that only wraps one flex child with the same direction. |
|
missing-typography |
A label without a typography class. |
|
mixed-control-heights |
A button group that mixes control-height classes. |
|
missing-control-height |
A button without a control-height class. |
|
empty-layout-group |
A container without children. |
|
unsized-data-component |
A table, chart or tree in a flex container without |
|
alarm-onselect-not-row-selection |
|
Gateway (G)¶
Produced by the gateway client when a call to the PDK module fails.
Code |
Name |
Meaning |
|---|---|---|
|
gateway-unreachable |
Nothing answers at the gateway URL. |
|
module-not-running |
The gateway answers but the PDK module is not installed or not running. |
|
token-rejected |
The token is missing or outdated (it changes on every gateway start). |
|
forbidden |
The request was not loopback or carried proxy headers. |
|
write-disabled |
The gateway runs without |
|
outside-sandbox |
A write outside the sandbox, or to the target project outside what it accepts. |
|
not-found |
The project, resource, page, session or tag does not exist. |
|
conflict |
The resource changed since it was read (signature mismatch). See Working with the gateway. |
|
bad-request |
The request was malformed (path, signature, files). |
|
gateway-error |
An unexpected error inside the module; see the gateway log. |
|
runtime-unavailable |
Perspective’s session API is not available on this version; the eyes fall back to the DOM. |
|
session-busy |
The session or the tag provider is busy; retry. |
|
outside-tag-folder |
A tag write outside |
Eyes (V, Q, L, C, X)¶
Produced by pdk inspect on a running view. See Inspecting running views for details.
Code |
Name |
Meaning |
|---|---|---|
|
text-clipped |
Text cut off or ended with an ellipsis. |
|
component-overflow |
A component extends outside a parent that clips it. |
|
viewport-overflow |
A component extends outside the browser window. |
|
collapsed-component |
A component with content shrunk to zero size. |
|
not-mounted |
A component of the |
|
embedded-view-failed |
An embedded view or repeater instance that did not load. |
|
repeater-instances-overflow |
A flex repeater whose instances are bigger than it along the axis the instance count does not explain (the cross axis without wrap, the main axis with it), so each instance scrolls inside a strip of it. |
|
low-contrast |
Text whose color is too close to what is behind it: below 4.5:1, or 3:1 for large text (24px, or 18.66px bold), as WCAG AA asks. Only text components (labels, buttons, links, markdown, checkboxes, toggles, radio groups) whose colors the view chose (a style color, background or class, on it or an ancestor) are judged: the theme’s defaults and text drawn inside charts or tables are not. Disabled controls are exempt; text over a background image is not judged. |
|
unrequested-scroll |
A container that scrolls (its content overflows along an axis with |
|
bad-quality |
A binding with a Bad quality, such as |
|
error-quality |
A binding whose evaluation failed ( |
|
uncertain-quality |
A binding without a good value yet. |
|
script-error-logged |
A script error the gateway logged for the component. |
|
browser-error |
An error in the browser console. |
|
eyes-degraded |
Part of the inspection was unavailable; the report is partial. |
|
page-out-of-sync |
The page does not render this |
Expectations and actions (A)¶
Code |
Name |
Meaning |
|---|---|---|
|
expectation-failed |
An expectation is not met; the message includes the measured value. |
|
malformed-expectation |
An expectation that cannot be read. |
|
expectation-unknown-component |
An expectation that names a component the view does not have. |
|
action-failed |
An action that could not be done (disabled control, missing row, tag write refused); the sequence stops. |
|
malformed-action |
An action that cannot be read. |