Friday, October 30, 2020
Home > Beginners of Magento 2 > Magento 2 Error: Invalid state change requested

Magento 2 Error: Invalid state change requested

Magento 2

Actually the custom REST API is throwing “Magento 2 Error message: Invalid state change requested” when customer does not pass the Authentication Token in headers. Magento 2 doesn’t give access to Quote for users without authentication token.

“CRITICAL: Magento\Framework\Exception\StateException: Invalid state change requested in vendor/magento/module-quote/Model/QuoteRepository/Plugin/AccessChangeQuoteControl.php:45”

So it seems like logged in customers are not allowed to change their own cart or guest customers have an active cart with a customer id.

StateException if Guest has customer_id or Customer’s customer_id not much with user_id or unknown user’s type

You can fix the issue by using this this module which created by gigadesign1, for that please click here

Use this module as a temporary solution to fix the Magento 2 Error message: Invalid state change requested, leading to orders not being created although the customer has payed for the order.


This module does not actually fix the issue, but updates the quote according to the state that was requested. So if a logged in customer want’s to place an order based on a quote for a guest customer, this module converts the quote to the logged in customer.

This might involve in security issues, so please consider before installing this plugin

Hope this can be helpful for you 🙂

Spread the love