magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Integration failing after upgrade to new version.

Open daviskevinp opened this issue 1 year ago • 1 comments

Summary

I have inherited an ecommerce solution from a client. This solution involves a custom integration between Documoto and Magento. In documoto, the user has a cart and clicks checkout, kicking off a custom flow on the Documoto side to a custom Magento module. This flow was working prior to an upgrade last year to 2.4.6, but stopped working after the upgrade and no one has been able to get it working since.

The first call we make to magento is for log-in. This step logs the user in and creates a signed-in user token for the customer, which is passed back to Documoto. Documoto then sends that customer token as the bearer token on subsequent requests. The second call creates an empty cart for the customer. Except it's giving me an error message that completely masks details. "The quote could not be created". Everything I read suggests that it's failing an access check and that somehow the user is not authenticating correctly.

Clearly I don't understand something about how the authentication tokens are supposed to interact here. I have created an integration and tried passing the access token from the integration back to the client to be returned as the bearer token (checking the box to enable the access token to be used as a bearer token in the admin). No matter what I'm doing, I simply can't convince magento to let me createEmptyQuoteForCustomer. The documentation on integration tokens is rather scarce, and amounts solely to "send the access token as the bearer token and check the checkbox and you should be good."

Those instructions are not working for me. Help!

This has cut off business orders for this entire system, and we need to get the customer back online again.

Examples

If I knew how to replicate this issue or demonstrate it in any way, I'd know how to solve it. But this is an absolute crisis for the customer, and we need to get it fixed somehow.

Proposed solution

No response

Release note

No response

Triage and priority

  • [X] 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”.

daviskevinp avatar Feb 23 '24 15:02 daviskevinp

Hi @daviskevinp. 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. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: 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[bot] avatar Feb 23 '24 15:02 m2-assistant[bot]

Hi @engcom-Hotel. 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: :point_down:

  • [ ] 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.

m2-assistant[bot] avatar Apr 03 '24 08:04 m2-assistant[bot]

Hello @daviskevinp,

Thanks for the report and collaboration!

After reading the main description, it seems that you are using GraphQL for user authentication. Have you gone through with the mutation generateCustomerToken:

https://developer.adobe.com/commerce/webapi/graphql/schema/customer/mutations/generate-token/

After creating an access token, you need to pass that token with every request as a Bearer Token.

Here in this board, we are handling the bugs with Magento core, you can post this query in Magento StackExchange for further things.

Thanks

engcom-Hotel avatar Apr 03 '24 08:04 engcom-Hotel

Dear @daviskevinp,

We've observed that there haven't been any updates on this issue for quite some time. Therefore, we're assuming it's been resolved and will be closing it. Feel free to open a new ticket or reopen this one if you require further assistance.

Regards

engcom-Hotel avatar Apr 19 '24 05:04 engcom-Hotel