Skip to content

Fix infinite checkout loader when some script wasn't loaded correctly because of network error#14874

Merged
magento-engcom-team merged 4 commits intomagento:2.2-developfrom
vovayatsyuk:fix-infinite-checkout-loader
May 3, 2018
Merged

Fix infinite checkout loader when some script wasn't loaded correctly because of network error#14874
magento-engcom-team merged 4 commits intomagento:2.2-developfrom
vovayatsyuk:fix-infinite-checkout-loader

Conversation

@vovayatsyuk
Copy link
Copy Markdown
Member

@vovayatsyuk vovayatsyuk commented Apr 26, 2018

Description

Infinite checkout loader may appear when some module makes a require call but the dependency wasn't returned (Network error).

The patch changes how Magento treats isPending modules. If all dependencies are errored - treat it as loaded.

Manual testing scenarios

  1. Open Magento/Checkout/view/frontend/web/js/model/quote.js
  2. Insert the following code:
require([
    'jquery',
    'https://some-site/tracking/api/js'
], function ($) {}, function () {});

right after

define([
    'ko',
    'underscore'
], function (ko, _) {
    'use strict';

    // add code here
  1. Navigate to checkout.
  2. You can't purchase the product because the page is blocked by loader.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-engcom-team
Copy link
Copy Markdown
Contributor

@vovayatsyuk thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@magento-engcom-team magento-engcom-team merged commit b3e26cc into magento:2.2-develop May 3, 2018
magento-engcom-team pushed a commit that referenced this pull request May 3, 2018
@magento-engcom-team
Copy link
Copy Markdown
Contributor

Hi @vovayatsyuk. Thank you for your contribution.
Changes from your Pull Request will be available with the upcoming 2.2.5 release.

@eTonki
Copy link
Copy Markdown

eTonki commented Jul 11, 2018

it still does not load checkout even in version 2.2.5
I see the problem in chrome but not in firefox
I understood that the blockage is due to this extension of the antivirus:
https://chrome.google.com/webstore/detail/avira-browser-safety/flliilndjeohchalpbbcdekjklbdgfkk?hl=en

@cbartak-rivet
Copy link
Copy Markdown

We are also seeing this issue in 2.2.5, with customers who have ad blockers installed (notably Ad Block Plus).

@DrewML
Copy link
Copy Markdown

DrewML commented Sep 6, 2018

@cbartak-rivet I'd recommend opening a new issue with a stack trace if you can replicate the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants