Magento 2.3.3 Getting below error when creating plugin for Magento\Ups\Model\Carrier class

1 exception(s): Exception #0 (BadMethodCallException): Missing required argument $data of Magento\Ups\Model\Carrier.

Exception #0 (BadMethodCallException): Missing required argument $data of Magento\Ups\Model\Carrier.

As my understand issue is because of class::__construct last param (newly added in to 2.3.3) $proxyDeferredFactory is not follow compatibility

Magento\Ups\Model\Carrier::__construct (last parameter should be null)

It should be null require

Consider basic knowledge of Plugin!

Welcome suggestion to work with lower MAGENTO version also.

  • did you get any solution for that ? Dec 28, 2019 at 6:53

1 Answer 1


Will be fixed in Magento 2.4. See https://github.com/magento/magento2/commit/cfd5c22848f82f29f69cd42ffbcc8e09fa848568. Workaround: Replace the following line:

?ProxyDeferredFactory $proxyDeferredFactory


?ProxyDeferredFactory $proxyDeferredFactory = null

in the constructor arguments

  • This answer saves my weekends. Mar 19, 2021 at 13:01
  • Just adding on that you may also need to run setup:di:compile as well
    – Keith
    Jul 21, 2021 at 19:43
  • @Keith Yes, but only if you are running on production mode. On developer mode that command is not needed. Aug 2, 2021 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.