expected Array to be a Hash: properties

Topic summary

A user encounters an error when attempting to add items to their Shopify cart. The error message indicates a type mismatch: the system expected a Hash (key-value pairs) for properties but received an Array instead.

Likely cause:

  • Product properties or line item properties are being passed in the wrong data format
  • The cart API expects properties structured as {key: value} but is receiving [value1, value2]

Status: The issue remains unresolved with no responses yet. An image showing the specific error was shared but requires troubleshooting the cart implementation code to identify where the data structure mismatch occurs.

Summarized with AI on November 20. AI used: claude-sonnet-4-5-20250929.

Hey guys does anyknoe know why i get this error upon adding to cart