Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulk API PUT/DELETE do not work when Magento_ReCaptchaWebapiRest is enabled #35348

Closed
1 of 5 tasks
nuzil opened this issue Apr 21, 2022 · 6 comments
Closed
1 of 5 tasks
Labels
Area: APIs Component: Api Use with concrete module component label E.g. "Component: Api" + "Catalog" Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: done Reported on 2.4.4 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@nuzil
Copy link
Contributor

nuzil commented Apr 21, 2022

Preconditions (*)

  1. Magento 2.4.3 - 2.4.4

Steps to reproduce (*)

  1. Execute any Rest Api Bulk request with PUT or DELETE, when in URL expected 1 or more parameters. Example: {{URL}}rest/async/bulk/V1/products/bySku
    Sample payload:
    [
    {
    "product":{
    "sku":"24-MB01",
    "name":"Printed Dress",
    "status":1,
    "visibility":4,
    "price":17
    }
    },
    {
    "product":{
    "sku":"24-MB04",
    "name":"Black WATCH",
    "status":1,
    "visibility":4,
    "price":77
    }
    }
    ]
  2. Request will return 500 and exception.

Expected result (*)

  1. Execute any Rest Api Bulk request with PUT or DELETE, when in URL expected 1 or more parameters. Example: {{URL}}rest/async/bulk/V1/products/bySku
  2. Request will return 200 and will be processed correctly

Actual result (*)

  1. See "Steps to reproduce" for actual result.
  2. If disable module "Magento_ReCaptchaWebapiRest", then requests start to work.

Additional Information:
Exception stack trace:

[2022-04-26T08:31:18.611204+00:00] main.CRITICAL: TypeError: Argument 1 passed to Magento\WebapiAsync\Controller\Rest\Asynchronous\InputParamsResolver::resolveBulkItemParams() must be of the type array, string given, called in /var/www/html/mg24/magento2/app/code/Magento/WebapiAsync/Controller/Rest/Asynchronous/InputParamsResolver.php on line 123 and defined in /var/www/html/mg24/magento2/app/code/Magento/WebapiAsync/Controller/Rest/Asynchronous/InputParamsResolver.php:178 Stack trace: #0 /var/www/html/mg24/magento2/app/code/Magento/WebapiAsync/Controller/Rest/Asynchronous/InputParamsResolver.php(123): Magento\WebapiAsync\Controller\Rest\Asynchronous\InputParamsResolver->resolveBulkItemParams() #1 /var/www/html/mg24/magento2/app/code/Magento/WebapiAsync/Controller/Rest/AsynchronousRequestProcessor.php(100): Magento\WebapiAsync\Controller\Rest\Asynchronous\InputParamsResolver->resolve() #2 /var/www/html/mg24/magento2/app/code/Magento/Webapi/Controller/Rest.php(195): Magento\WebapiAsync\Controller\Rest\AsynchronousRequestProcessor->process() #3 /var/www/html/mg24/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch() #4 /var/www/html/mg24/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent() #5 /var/www/html/mg24/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception\{closure}() #6 /var/www/html/mg24/magento2/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(23): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins() #7 /var/www/html/mg24/magento2/lib/internal/Magento/Framework/App/Http.php(116): Magento\Webapi\Controller\Rest\Interceptor->dispatch() #8 /var/www/html/mg24/magento2/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch() #9 /var/www/html/mg24/magento2/lib/internal/Magento/Framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch() #10 /var/www/html/mg24/magento2/pub/index.php(30): Magento\Framework\App\Bootstrap->run() #11 {main} [] []


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@m2-assistant
Copy link

m2-assistant bot commented Apr 21, 2022

Hi @nuzil. Thank you for your report.
To speed up processing of this issue, make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@m2-assistant
Copy link

m2-assistant bot commented Apr 21, 2022

Hi @engcom-November. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-November engcom-November added the Reported on 2.4.4 Indicates original Magento version for the Issue report. label Apr 21, 2022
@engcom-November
Copy link

engcom-November commented Apr 21, 2022

Verified the issue on both Magento 2.4-develop and 2.4.4 versions and the issue is reproducible:
Requests used:
PUT request to /rest/all/async/bulk/V1/products/bySku
Sample payload:
[
{
"product":{
"sku":"24-MB01",
"name":"Printed Dress",
"status":1,
"visibility":4,
"price":17
}
},
{
"product":{
"sku":"24-MB04",
"name":"Black WATCH",
"status":1,
"visibility":4,
"price":77
}
}
]

Or
Delete request to /rest/async/bulk/V1/cmsPage/byPageId
[
{
"pageId": "7"
}
]

image
image

@engcom-November engcom-November added Component: Api Use with concrete module component label E.g. "Component: Api" + "Catalog" Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Area: APIs Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Apr 21, 2022
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Confirmed in Issue Confirmation and Triage Board Apr 21, 2022
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.magento.com/browse/AC-2898 is successfully created for this GitHub issue.

@m2-assistant
Copy link

m2-assistant bot commented Apr 21, 2022

✅ Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@engcom-November engcom-November added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Apr 21, 2022
@m2-community-project m2-community-project bot added this to Ready for Development in High Priority Backlog Apr 21, 2022
@github-jira-sync-bot github-jira-sync-bot added Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: PR in progress and removed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for dev labels May 24, 2022
@m2-community-project m2-community-project bot moved this from Ready for Development to Pull Request In Progress in High Priority Backlog May 25, 2022
@engcom-Hotel
Copy link
Contributor

engcom-Hotel commented May 26, 2022

As this is a duplicate of #35370, hence closing this ticket.

Thank you!

@m2-community-project m2-community-project bot moved this from Pull Request In Progress to Done in High Priority Backlog May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: APIs Component: Api Use with concrete module component label E.g. "Component: Api" + "Catalog" Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: done Reported on 2.4.4 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
Development

No branches or pull requests

4 participants