Zend certified PHP/Magento developer

Uncaught TypeError: t.options.map is not a function (Magento 2.4.4p4)

I’m encountering the following error when accessing Magento 2.4.4p4:

ds.min.js:1 Uncaught TypeError: t.options.map is not a function
  at u (ds.min.js:1:1998)
  at ds.min.js:1:2563
  at Array.map (<anonymous>)
  at l (ds.min.js:1:2443)
  at f (ds.min.js:1:3116)
  at ko.subscription._callback (ds.min.js:1:22219)
  at Function.notifySubscribers (knockout.js:1401:50)
  at Function.valueHasMutated (knockout.js:1645:46)
  at Object.observable [as customer] (knockout.js:1609:40)
  at Object.notify (customer-data.js:153:35)

enter image description here

This error most commonly occurs during the “add to cart” process, but it can also happen on other pages and during various interactions. I’ve noticed that it doesn’t affect all customers, but primarily new customers or those who frequently access the system. I believe this issue is related to session or cookie problems.

Here are the troubleshooting steps I’ve taken:

  • Disabling modules via config.php
  • Removing potentially problematic .phtml file or .xml content

Unfortunately, these attempts haven’t been successful in pinpointing the exact cause. While I suspect the error might be originating from a knockout.js file, I’m unable to identify the specific code or behavior responsible.

This issue has been ongoing for a while, making it difficult to track down the exact Git commit that introduced it. It’s causing various system instabilities, such as GTM session regeneration and login problems on both staging and production environments (production login works normally, but staging requires clearing cache and cookies to function properly).

If anyone has any insights or potential solutions, I’d be happy to share the relevant source code for further analysis.