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

500 Internal Server Error when /rest/default/V1/order/000000004/ship api is called #36814

Closed
5 tasks
Kiril0v opened this issue Feb 7, 2023 · 7 comments
Closed
5 tasks
Assignees
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.4-p2

Comments

@Kiril0v
Copy link

Kiril0v commented Feb 7, 2023

Preconditions and environment

  • Magento version ver. 2.4.4-p2
    -PHP 7.4.33 (cli) (built: Nov 8 2022 11:40:37) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies

-Server version: 10.5.18-MariaDB-0+deb11u1 Debian 11
Reading history-file /root/.mysql_history

Steps to reproduce

import this curl to Postman and don't forget to add your credentials

curl --location --request POST 'https://mysite/rest/default/V1/order/000000004/ship'
--header 'Authorization: Bearer TOKEN'
--header 'Content-Type: application/json'
--header 'Cookie: mage-messages=
--data-raw '{
"items": [
{
"extension_attributes": {},
"order_item_id": 4,
"qty": 1
}
],
"notify": true,
"appendComment": true,
"comment": {
"extension_attributes": {},
"comment": "string",
"is_visible_on_front": 0
},
"tracks": [
{
"extension_attributes": {},
"track_number": "1234",
"title": "string",
"carrier_code": "string"
}
],
"packages": [
{
"extension_attributes": {}
}
],
"arguments": {
"extension_attributes": {
"source_code": "string"
}
}
}'

Expected result

Response 200 or appropriate error
Access your admin panel.
Navigate to Sales > Shipments, here you will see the shipment shown in the grid.
Navigate to Sales > Orders, here you will see the status of the order is Complete.

Actual result

  • I'm trying to post a new shipment but getting 500 Internal Server Error as a response
  • When calling the following api https://mysite/rest/default/V1/order/000000004/ship
    with json as body
    { "items": [ { "extension_attributes": {}, "order_item_id": 4, "qty": 1 } ], "notify": true, "appendComment": true, "comment": { "extension_attributes": {}, "comment": "string", "is_visible_on_front": 0 }, "tracks": [ { "extension_attributes": {}, "track_number": "1234", "title": "string", "carrier_code": "string" } ], "packages": [ { "extension_attributes": {} } ], "arguments": { "extension_attributes": { "source_code": "string" } } }

this is the response i'm getting:
{"message":"Internal Error. Details are available in Magento log file. Report ID: webapi-63e244077431e"}

Here is my debug.log

`[2023-02-07T12:28:55.476445+00:00] main.CRITICAL: LogicException: Property "SourceCode" does not have accessor method "getSourceCode" in class "Magento\Sales\Api\Data\ShipmentCreationArgumentsExtensionInterface". in /var/www/magento/lib/internal/Magento/Framework/Reflection/NameFinder.php:103
Stack trace:
#0 /var/www/magento/lib/internal/Magento/Framework/Reflection/NameFinder.php(62): Magento\Framework\Reflection\NameFinder->findAccessorMethodName()
#1 /var/www/magento/lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php(289): Magento\Framework\Reflection\NameFinder->getGetterMethodName()
#2 /var/www/magento/lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php(514): Magento\Framework\Webapi\ServiceInputProcessor->_createFromArray()
#3 /var/www/magento/lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php(306): Magento\Framework\Webapi\ServiceInputProcessor->convertValue()
#4 /var/www/magento/lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php(514): Magento\Framework\Webapi\ServiceInputProcessor->_createFromArray()
#5 /var/www/magento/lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php(194): Magento\Framework\Webapi\ServiceInputProcessor->convertValue()
#6 /var/www/magento/app/code/Magento/Webapi/Controller/Rest/InputParamsResolver.php(115): Magento\Framework\Webapi\ServiceInputProcessor->process()
#7 /var/www/magento/lib/internal/Magento/Framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest\InputParamsResolver->resolve()
#8 /var/www/magento/lib/internal/Magento/Framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\InputParamsResolver\Interceptor->___callParent()
#9 /var/www/magento/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\InputParamsResolver\Interceptor->Magento\Framework\Interception{closure}()
#10 /var/www/magento/generated/code/Magento/Webapi/Controller/Rest/InputParamsResolver/Interceptor.php(23): Magento\Webapi\Controller\Rest\InputParamsResolver\Interceptor->___callPlugins()
#11 /var/www/magento/app/code/Magento/Webapi/Controller/Rest/SynchronousRequestProcessor.php(85): Magento\Webapi\Controller\Rest\InputParamsResolver\Interceptor->resolve()
#12 /var/www/magento/app/code/Magento/Webapi/Controller/Rest.php(188): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor->process()
#13 /var/www/magento/lib/internal/Magento/Framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch()
#14 /var/www/magento/lib/internal/Magento/Framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent()
#15 /var/www/magento/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception{closure}()
#16 /var/www/magento/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(23): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins()
#17 /var/www/magento/lib/internal/Magento/Framework/App/Http.php(116): Magento\Webapi\Controller\Rest\Interceptor->dispatch()
#18 /var/www/magento/lib/internal/Magento/Framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch()
#19 /var/www/magento/pub/index.php(30): Magento\Framework\App\Bootstrap->run()
#20 {main}

Next Exception: Report ID: webapi-63e244077431e; Message: Property "SourceCode" does not have accessor method "getSourceCode" in class "Magento\Sales\Api\Data\ShipmentCreationArgumentsExtensionInterface". in /var/www/magento/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php:208
Stack trace:
#0 /var/www/magento/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php(153): Magento\Framework\Webapi\ErrorProcessor->_critical()
#1 /var/www/magento/app/code/Magento/Webapi/Controller/Rest.php(190): Magento\Framework\Webapi\ErrorProcessor->maskException()
#2 /var/www/magento/lib/internal/Magento/Framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch()
#3 /var/www/magento/lib/internal/Magento/Framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent()
#4 /var/www/magento/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception{closure}()
#5 /var/www/magento/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(23): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins()
#6 /var/www/magento/lib/internal/Magento/Framework/App/Http.php(116): Magento\Webapi\Controller\Rest\Interceptor->dispatch()
#7 /var/www/magento/lib/internal/Magento/Framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch()
#8 /var/www/magento/pub/index.php(30): Magento\Framework\App\Bootstrap->run()
#9 {main} [] []
`

Additional information

No response

Release note

No response

Triage and priority

  • 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 Feb 7, 2023

Hi @Kiril0v. Thank you for your report.
To speed up processing of this issue, 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.

@m2-assistant
Copy link

m2-assistant bot commented Feb 7, 2023

Hi @engcom-Bravo. 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).

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.

  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas 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-Bravo
Copy link
Contributor

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

@engcom-Bravo
Copy link
Contributor

Hi @Kiril0v,

Thank you for reporting and collaboration.

Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.

Screenshot 2023-02-08 at 3 59 16 PM

Screenshot 2023-02-08 at 5 11 38 PM

We are able to ship the product using API.

Kindly recheck the behavior on Magento 2.4-develop instance and elaborate steps to reproduce if the issue is still reproducible.

Thanks.

@engcom-Bravo engcom-Bravo added the Issue: needs update Additional information is require, waiting for response label Feb 8, 2023
@engcom-Bravo
Copy link
Contributor

Hi @Kiril0v,

We have noticed that this issue has not been updated for a period of 14 Days.
Hence we assume that this issue is fixed now, so we are closing it. Please raise a fresh ticket or reopen this ticket if you need more assistance on this.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.4-p2
Projects
None yet
Development

No branches or pull requests

2 participants