MDVA-40896: Error: TypeError: Argument 3 passed…
Error: TypeError: Argument 3 passed to Magento\Framework\Webapi\ServiceInputProcessor::process() must be of the type array, string given error is shown in async product bulk API. Quality patch MDVA-40896 for magento/module-re-captcha-webapi-rest applies to Magento Open Source and Adobe Commerce 2.4.3 to 2.4.3-p3.
- Categories
- Web API
- Components
- magento/module-re-captcha-webapi-rest
- Origin
- adobe-commerce-support
- Since QPT
- 1.1.15
Issue
Error: TypeError: Argument 3 passed to Magento\Framework\Webapi\ServiceInputProcessor::process() must be of the type array, string given error is shown in async product bulk API.
Steps to reproduce
1. Send a request to rest/all/async/bulk/V1/products/bySKU endpoint using the following payload: [ { "product": { "sku": "24-MB01", "price": 36, "extension_attributes": { "stock_item": { "qty": 100, "is_in_stock": true } }, "custom_attributes": [ { "attribute_code": "new", "value": "1" } ] } }, { "product": { "sku": "24-MB04", "price": 28, "extension_attributes": { "stock_item": { "qty": 50, "is_in_stock": true } }, "custom_attributes": [ { "attribute_code": "new", "value": "0" } ] } } ]
Adobe's page lists 2.4.3 - 2.4.3-p2 as compatible; the versions below are resolved from the current QPT constraints and are the ones the tool will offer.
Install
Install the Quality Patches Tool with composer require magento/quality-patches, apply the prerequisites listed for all files applicable to your distribution and version first, then run vendor/bin/magento-patches apply MDVA-40896. On Cloud, add MDVA-40896 under stage.build.QUALITY_PATCHES in .magento.env.yaml.
For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its MDVA-40896/ folder into patches/composer/, merge composer.patches.json into composer.json, then run composer install. Bundle prerequisites the same way and list them first. Paths are relative to each package root, using the default -p1 level. Prefer local files when configuring composer-patches; a remote URL can change.
Patch files and compatible versions
magento/security-package >=1.1.2 <1.1.3
- Patch file
- patches/os/MDVA-40896_2.4.3.patch
- vendor/magento/module-re-captcha-webapi-rest/Plugin/RestValidationPlugin.php
