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

UPS carrier model getting error when create plugin in to Magento 2.3.3 compatibility #25390

Closed
Bhavik-kumar opened this issue Oct 31, 2019 · 7 comments
Assignees
Labels
Component: Framework/Code Component: Shipping Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: PR Created Indicates that Pull Request has been created to fix issue Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@Bhavik-kumar
Copy link

Bhavik-kumar commented Oct 31, 2019

Preconditions (*)

Magento 2.3.3 & 2.3-develop
with Developer mode.

Steps to reproduce (*)

  1. create plugin for Magento\Ups\Model\Carrier with custom di.xml
    app/code/<vender>/<module>/etc/di.xml
<type name="Magento\Ups\Model\Carrier">
	<plugin name="fix-for-Ups" type="<vender>\<module>\Plugin\Carrier\Ups" sortOrder="1" />
</type>
  1. create class as below mention
namespace <vender>\<module>\Plugin\Carrier;

class Ups
{
    public function afterCollectRates(\Magento\Ups\Model\Carrier $subject, $result, $request)
    {
       
        return $result;
    }
}

Expected result (*)

Plugin should work properly with developer mode

Actual result (*)

Getting below error

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 Magento\Ups\Model\Carrier::__construct last param should be null (newly added in to 2.3.3) $proxyDeferredFactory is not follow compatibility

@m2-assistant
Copy link

m2-assistant bot commented Oct 31, 2019

Hi @Bhavik-kumar. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@Bhavik-kumar do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Oct 31, 2019
@engcom-Charlie engcom-Charlie self-assigned this Oct 31, 2019
@m2-assistant
Copy link

m2-assistant bot commented Oct 31, 2019

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

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.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-Charlie engcom-Charlie added Component: Framework/Code Component: Shipping Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Oct 31, 2019
@ghost ghost unassigned engcom-Charlie Oct 31, 2019
@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Oct 31, 2019
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-Charlie
Thank you for verifying the issue. Based on the provided information internal tickets MC-22614 were created

Issue Available: @engcom-Charlie, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@hostep
Copy link
Contributor

hostep commented Nov 1, 2019

This will probably be fixed by #25181

Bartlomiejsz added a commit to Bartlomiejsz/magento2 that referenced this issue Dec 19, 2019
@ghost ghost assigned Bartlomiejsz Dec 19, 2019
@Bartlomiejsz Bartlomiejsz added the Progress: PR Created Indicates that Pull Request has been created to fix issue label Dec 19, 2019
@VladimirZaets
Copy link
Contributor

Hi @Bhavik-kumar. Thank you for your report.
The issue has been fixed in #26130 by @Bartlomiejsz in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming 2.4.0 release.

@VladimirZaets VladimirZaets added the Fixed in 2.4.x The issue has been fixed in 2.4-develop branch label Jan 3, 2020
magento-engcom-team added a commit that referenced this issue Jan 3, 2020
… plugin in to Magento 2.3.3 compatibility #26130

 - Merge Pull Request #26130 from Bartlomiejsz/magento2:feature/fix_25390_ups_carrier_constructor
 - Merged commits:
   1. cfd5c22
magento-engcom-team pushed a commit that referenced this issue Jan 3, 2020
@Bhavik-kumar
Copy link
Author

is any one confirm that this is fixed with 2.3.4 ?

@ananth-iyer
Copy link
Member

@Bhavik-kumar I have replicated the issue on 2.3.5-p2 and fix is to run the setup:di:compile again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Framework/Code Component: Shipping Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: PR Created Indicates that Pull Request has been created to fix issue Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

7 participants