Reproduction
SolidJS app using any Ark UI component (e.g. @ark-ui/solid's DatePicker, Popover — all use Zag.js under the hood) with @solid-devtools/overlay attached throws at runtime as soon as the component mounts:
Uncaught TypeError: Cannot redefine property: data-scope
at observed_props_observe_prop (inspector.ts:142)
Root cause
Zag.js sets data-scope, data-part, and similar data-* attributes on the props object via Object.defineProperty with configurable: false (intentional — they're identity markers Zag relies on).
observed_props_observe_prop in packages/debugger/src/inspector/inspector.ts unconditionally calls Object.defineProperty(observed.props, key, { get, enumerable: true }) to monkey-patch a tracking getter. Redefining a non-configurable own property is a JavaScript TypeError — the debugger crashes the host app.
Suggested fix
Skip tracking when the existing descriptor is non-configurable (and wrap in try/catch as a belt-and-braces guard):
let existing = Object.getOwnPropertyDescriptor(observed.props, key)
if (existing && existing.configurable === false) return o
try {
Object.defineProperty(observed.props, key, {
get() { /* ...existing tracking getter... */ },
enumerable: true,
configurable: true, // <- also add, current code omits it
})
} catch {
// non-configurable prop — skip tracking
}
Losing tracking on a handful of data-* marker props has no practical downside; crashing the app does.
Environment
@solid-devtools/overlay 0.33.5
@ark-ui/solid (latest, via Zag.js)
solid-js 1.9.x
- Chromium (Tauri 2 webview) and standalone Chrome — both affected
Reproduction
SolidJS app using any Ark UI component (e.g.
@ark-ui/solid's DatePicker, Popover — all use Zag.js under the hood) with@solid-devtools/overlayattached throws at runtime as soon as the component mounts:Root cause
Zag.js sets
data-scope,data-part, and similardata-*attributes on the props object viaObject.definePropertywithconfigurable: false(intentional — they're identity markers Zag relies on).observed_props_observe_propinpackages/debugger/src/inspector/inspector.tsunconditionally callsObject.defineProperty(observed.props, key, { get, enumerable: true })to monkey-patch a tracking getter. Redefining a non-configurable own property is a JavaScriptTypeError— the debugger crashes the host app.Suggested fix
Skip tracking when the existing descriptor is non-configurable (and wrap in try/catch as a belt-and-braces guard):
Losing tracking on a handful of
data-*marker props has no practical downside; crashing the app does.Environment
@solid-devtools/overlay0.33.5@ark-ui/solid(latest, via Zag.js)solid-js1.9.x