Skip to content

Checkout: missing shipping address fields #3148

Closed
@chicgeek

Description

@chicgeek

Bug description / how to reproduce

While testing the checkout flow we discovered an issue when continuing from the shipping step to the payment step. This is what we observed, though only occasionally:

  • Fill out a valid shipping address.
  • Click the button to continue to next step (#shipping-method-buttons-container .button).
  • In the checkout summary observe that postcode and country appear, but all other address fields (name, street, city, phone) are absent.
  • Attempting to complete checkout fails due to the address being malformed.

Build / environment

We are currently on beta8 and have reproduced this both on Luma as well as our custom theme.

Findings

My team narrowed it down to being an issue with timing of the estimate-shipping-methods ajax call. estimate-shipping-methods only requires country and postcode and saves the address with only these values. In cases where the bug appeared, this estimate-shipping-methods occurs after the shipping-information, saving the truncated address (bad).

Further digging into when shipping-information is called. In this file a 2s delay is set between calling validation for the shipping address form:

app/code/Magento/Checkout/view/frontend/web/js/model/shipping-rates-validator.js

The bug generally occurs when you proceed through checkout very quickly (form autocompletion helps with this) and you click the continue button within this 2s window, before the shipping-information ajax call is fired.

We have not been able to fully resolve this issue, but we have reduced the likelihood of it occurring by reducing the delay from 2000 to 500.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions