# Shopify flow runcode input error

**URL:** <https://community.shopify.dev/t/shopify-flow-runcode-input-error/36405>\
**Category:** Shopify Flow\
**Tags:** tasks\
**Created:** [July 29, 2026, 8:25am UTC](https://community.shopify.dev/t/shopify-flow-runcode-input-error/36405 "2026-07-29T08:25:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HBCus\_01](https://avatars.discourse-cdn.com/v4/letter/h/9fc29f/32.png) [@HBCus\_01](https://community.shopify.dev/u/HBCus_01)\
**Post date:** [July 29, 2026, 8:25am UTC](https://community.shopify.dev/t/shopify-flow-runcode-input-error/36405/1 "2026-07-29T08:25:40Z")

</div>

query {  
getProductVariantData {  
id  
sku  
price  
product {  
id  
title  
}  
}  
} Yesterday, Run Code and GraphQL input executed successfully without any issues. Starting today, the workflow fails during GraphQL validation before the Run Code begins execution. error message as shown below

" Interface field Publishable.availablePublicationCount expected but ProductVariant does not provide it."

even below runcode input has same issue

query {  
return {  
order {  
events {  
… on CommentEvent {  
rawMessage  
}  
}  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![paul\_n](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/paul_n/32/108_2.png) [@paul\_n](https://community.shopify.dev/u/paul_n)\
**Post date:** [July 29, 2026, 4:08pm UTC](https://community.shopify.dev/t/shopify-flow-runcode-input-error/36405/2 "2026-07-29T16:08:34Z")

</div>

That error is a bug we are working to fix, but it should not be causing the workflow to not activate.

You have some other error causing the activation problem.

```auto
    "__typename": "Exception",
    "exception_summary": "'Run Code' execution error",
    "exception_message": "TypeError: cannot read property 'inventoryItem' of null\nat if (!(li.variant.inventoryItem.id in committedInventoryByItem)) { (flow.js:47)",
    ],

```

---

<div class="post-metadata">

**Author:** ![HBCus\_01](https://avatars.discourse-cdn.com/v4/letter/h/9fc29f/32.png) [@HBCus\_01](https://community.shopify.dev/u/HBCus_01)\
**Post date:** [July 30, 2026, 7:11am UTC](https://community.shopify.dev/t/shopify-flow-runcode-input-error/36405/3 "2026-07-30T07:11:14Z")

</div>

![image](https://global.discourse-cdn.com/shopifycommunity/original/3X/0/f/0f17a5ebb02b34ae41b5a95011322b6b20c8b7c0.png)

The workflow is **activating successfully** —there is no activation problem.

As shown in the attached screenshot, the workflow reaches the **Run Code** step and fails there with:

```auto
Exception: 'Run Code' execution error

```

Separately, I had also reported the GraphQL validation error:

```auto

```

```auto
Interface field Publishable.availablePublicationCount expected but ProductVariant does not provide it.

```

which you confirmed is a known bug.

runcode input query shown below

{  
getCurrentDatetime {  
currentDatetime  
}

initializeExecutionLog {  
logJson  
currentReturnRequest  
}

return {  
id  
closedAt  
reverseFulfillmentOrders {  
reverseDeliveries {  
deliverable {  
… on ReverseDeliveryShippingDeliverable {  
tracking {  
number  
}  
}  
}  
}  
}  
returnLineItems {  
… on ReturnLineItem {  
quantity

```auto
    fulfillmentLineItem {

  originalTotalSet {
    shopMoney {
      amount
    }
  }

      lineItem {
        title
     variantTitle
        sku
      }
    }

  }
}

order {
  returnProcessingInputs {
    value
  }

   processingHistory {
value

```

}

```auto
  totalDiscountsSet {
    shopMoney {
      amount
    }
  }

  lineItems {
    title
    sku
    quantity

    variant {
      id
    }

    

    discountAllocations {
      allocatedAmountSet {
        shopMoney {
          amount
        }
      }

      discountApplication {
        ... on AutomaticDiscountApplication {
          title
        }

        ... on DiscountCodeApplication {
          code
        }

        ... on ManualDiscountApplication {
          title
        }

        ... on ScriptDiscountApplication {
          title
        }
      }
    }
  }
}

```

}  
}

---

<div class="post-metadata">

**Author:** ![paul\_n](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/paul_n/32/108_2.png) [@paul\_n](https://community.shopify.dev/u/paul_n)\
**Post date:** [August 3, 2026, 5:06pm UTC](https://community.shopify.dev/t/shopify-flow-runcode-input-error/36405/4 "2026-08-03T17:06:56Z")

</div>

I can’t read that. I’m not sure why you have this in your runCode:

```auto
{
  getCurrentDatetime {
     currentDatetime
}

initializeExecutionLog {
  logJson
  currentReturnRequest
}

```
