Hi Shopify Community,
I’m encountering a persistent React rendering error in my Admin Action UI extension (admin.product-details.action.render) despite following the official docs and cleaning up my code. The error occurs in Shopify’s internal <Context.Provider> component:
text
ERROR: The above error occurred in the <Context.Provider> component:
ERROR: {
"name": "Error",
"message": "Objects are not valid as a React child (found: object with keys {type, props, key, ref, __k, __, __b, __e, __c, constructor, __v, __i, __u, __source, __self}). If you meant to render a collection of children, use an array instead."
}
My Setup:
-
Shopify CLI latest version
-
React flavor Admin Action extension (
issue-tracker-action) -
shopify app devwith app-preview working -
Dependencies aligned (
@shopify/ui-extensions-react/admin, React 18+)
Console logs show:
text
Issue_Tracker_Action data: [object with selected array]
Issue_Tracker_Action selected: [array of product IDs/objects]
Issue_Tracker_Action selectedFirst: [first product ID or object]
Files (complete code):
ActionExtension.jsx (src/ActionExtension.jsx):
jsx
[PASTE YOUR COMPLETE ActionExtension.jsx CODE HERE - the full file you shared]
utils.js (src/utils.js):
js
[PASTE YOUR COMPLETE utils.js CODE HERE - the full file you shared]
What I’ve tried:
-
Logging
data,data.selected- they’re plain objects/arrays, not JSX -
Stripping JSX to minimal
<AdminAction><Box>Test</Box></AdminAction>- error persists -
Verified no direct object rendering in my JSX
-
Aligned package versions, cleared cache, restarted dev server
-
Confirmed
shopify.extension.tomlpoints to correct module
The error suggests something in useApi(TARGET) or Shopify’s internal context is passing a React element object, but my code only renders strings/JSX primitives.
Questions:
-
Is this a known issue with
admin.product-details.action.render+ React flavor? -
Should
data.selectedbe handled differently for Admin Actions? -
Any required wrapper/index file I’m missing?
-
Flavor mismatch (React vs Preact) despite using
@shopify/ui-extensions-react/admin?
Would appreciate any insights or working examples! Happy to share package.json, shopify.extension.toml, or full repo.
Tags: #ui-extensions #admin-action #react #shopify-cli #debugging