Skip to content

GraphQL OPTIONS request fails with error 500. #38738

Open
@william-gooch

Description

@william-gooch

Preconditions and environment

  • Magento 2.4.7

Steps to reproduce

  1. Attempt to make an OPTIONS request against the GraphQL endpoint curl -i -X OPTIONS http://test.site/graphql

Expected result

Returns the "unexpected EOF" error but with a 200 status code so that CORS requests succeed.

Actual result

Returns the "unexpected EOF" error with a 500 status code, so CORS preflight requests always fail.

Additional information

This seems like it re-introduces MDVA-35312 which was previously fixed in Magento 2.4.3.
I believe this is caused by https://github.com/magento/magento2/blame/c6bc8300e771e5e96ce9ac6c116746fe3de80544/app/code/Magento/GraphQl/Controller/GraphQl.php#L194 which parses the query and returns an error even if the request validators succeed.

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”.

Activity

m2-assistant

m2-assistant commented on May 20, 2024

@m2-assistant

Hi @william-gooch. 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:


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ 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.

william-gooch

william-gooch commented on May 20, 2024

@william-gooch
Author

@magento give me 2.4-develop instance

magento-deployment-service

magento-deployment-service commented on May 20, 2024

@magento-deployment-service

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

self-assigned this
on May 20, 2024
m2-assistant

m2-assistant commented on May 20, 2024

@m2-assistant

Hi @engcom-Delta. 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.
william-gooch

william-gooch commented on May 20, 2024

@william-gooch
Author

Confirmed to occur on 2.4-develop instance

engcom-Delta

engcom-Delta commented on May 22, 2024

@engcom-Delta
Contributor

Hi @william-gooch ,

Verified the issue on 2.4.7 and 2.4-develop, it is reproducible.

Hence, Confirming the issue.

Steps to reproduce:-

  1. Attempt to make an OPTIONS request against the GraphQL endpoint curl -i -X OPTIONS http://test.site/graphql

2.4.7

Screenshot 2024-05-22 at 4 00 27 PM

2.4-develop

Screenshot 2024-05-22 at 4 00 49 PM

18 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area: APIsComponent: GraphQLGraphQLIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.Progress: PR in progressReported on 2.4.7Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Participants

    @VicDeo@Detzler@lano-vargas@skaliszczak@william-gooch

    Issue actions

      GraphQL OPTIONS request fails with error 500. · Issue #38738 · magento/magento2