13

When I'm on Checkout Page. Sometimes I'm facing the below error.

Carrier with such method not found: null, null

I have selected by Shipping Address, Not selected any Shipping Method & Clicked on "Next"

I'm using DHL Shipping Method. I have to override the DHL Shipping Method Model as per my requirement.

Magento 2: How to change Weight field for DHL Shipping Method [SOLVED]

Not sure if anyone comes across this issue.

3
  • I'm having this issue as well.. Haven't found a fix for it yet. Clicking "Next" again for the second time works. It's just the first time..
    – Erfan
    Aug 21, 2017 at 4:03
  • Have you found any solution @Erfan Sep 7, 2017 at 17:56
  • Yeah, @Jalpesh, for me it was because of a collectTotals call in a custom plugin (after quote load). We made sure it only collects totals when it needs, and it fixed a lot of issues for us.
    – Erfan
    Sep 8, 2017 at 7:59

2 Answers 2

0

This solution might work for this issue (override collectRates() method and set the correct shipping method to quote shipping address) - https://stackoverflow.com/a/64826863/8497354

FYI - Possible M2 core issues:

Cheers!

0

The above error is triggered when the specified shipping method is not available or is invalid.

As we can see at vendor/magento/module-checkout/Model/ShippingInformationManagement.php:209 if getShippingRateByCode returns false, it throws this exception.

Inside this method, we can see that it's not very complex to understand...

    public function getShippingRateByCode($code)
    {
        foreach ($this->getShippingRatesCollection() as $rate) {
            if ($rate->getCode() == $code) {
                return $rate;
            }
        }

        return false;
    }

I can think of 3 possible reasons for that:

  1. You have a saved quote using a shipping method that was disabled
  2. When you changed the shipping method, you forgot to add the constant CODE or changed its value
  3. You've changed the config.xml of the module and forgot to add <model> within the default node. I did that once for the payment method and got a similar error.

I hope any of these suggestions help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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