Skip to content

WYSIWYG image upload dialog hangs up #23966

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

Closed
sshymko opened this issue Aug 1, 2019 · 28 comments
Closed

WYSIWYG image upload dialog hangs up #23966

sshymko opened this issue Aug 1, 2019 · 28 comments
Assignees
Labels
Component: Backend Component: Cms Fixed in 2.3.x The issue has been fixed in 2.3 release line 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 Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@sshymko
Copy link

sshymko commented Aug 1, 2019

WYSIWYG editor in the admin panel sometimes hangs up upon opening an image upload dialog. The "Please wait..." spinner animation does not go away (until you refresh the page and have more luck next time).

Preconditions (*)

  1. Magento 2.3.1 Open Source
  2. Google Chrome 74.0.3729.169 (Official Build) (64-bit)
  3. Configuration > General > Content Management > WYSIWYG Options > Enable WYSIWYG Editor: Enabled by Default

Steps to reproduce (*)

  1. Log in to the admin panel
  2. Go to Content > Elements > Pages
  3. Edit any page, such as Home page
  4. Expand Content section
  5. Click on Insert/edit image toolbar button
  6. Click on Browse button of the Source field
  7. Refresh the page and repeat until reproduced

Expected result (*)

  1. Dialog "Select Images" shows up fully operational

Actual result (*)

  1. Dialog "Select Images" shows up with "Please wait..." infinite spinner animation
    magento2_admin_cms_wysiwyg_img_upload_spinner

  2. Refreshing the page and repeating the steps sometimes fixes the issue

  3. There're no JavaScript errors in the developer console

@m2-assistant
Copy link

m2-assistant bot commented Aug 1, 2019

Hi @sshymko. 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.

@sshymko 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 Aug 1, 2019
@sshymko
Copy link
Author

sshymko commented Aug 1, 2019

@magento give me 2.3-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @sshymko. Thank you for your request. I'm working on Magento 2.3-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @sshymko, here is your Magento instance.
Admin access: https://i-23966-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@sshymko
Copy link
Author

sshymko commented Aug 1, 2019

Confirmed the issue is reproducible on the vanilla 2.3-develop instance provided above.
It took multiple page refreshes ~5-10 to reproduce the issue.
magento2_admin_cms_wysiwyg_img_upload_hang_up

@sshymko
Copy link
Author

sshymko commented Aug 1, 2019

The bug causes instability of the following MFTF tests:

E AdminAddImageToWYSIWYGBlockTestCest: Admin add image to wysiwyg block test (64.08s)
E AdminAddImageToWYSIWYGCMSTestCest: Admin add image to wysiwygcms test (36.67s)
E AdminAddImageToWYSIWYGCatalogTestCest: Admin add image to wysiwyg catalog test (34.74s)
E AdminAddImageToWYSIWYGNewsletterTestCest: Admin add image to wysiwyg newsletter test (32.48s)
[Facebook\WebDriver\Exception\TimeOutException]

The image upload issue affects all instances of WYSIWYG editor in the admin panel.

@krishprakash krishprakash self-assigned this Aug 1, 2019
@m2-assistant
Copy link

m2-assistant bot commented Aug 1, 2019

Hi @krishprakash. 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.

@krishprakash
Copy link

@magento give me 2.3-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @krishprakash. Thank you for your request. I'm working on Magento 2.3-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @krishprakash, here is your Magento instance.
Admin access: https://i-23966-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@krishprakash
Copy link

Hi @sshymko,
I'm not able to reproduce this issue as provided steps by you.
Is there any specific case in which you phase this issue ?

@sshymko
Copy link
Author

sshymko commented Aug 1, 2019

@krishprakash
The provided steps are precisely exact steps. The issue is random and does not always reproduce. It took me 5-10 page refreshes to reproduce it on the provided instance (the screenshot above). Could you please try to refresh the page and repeat the steps as many times as you can?

@ju2kr
Copy link

ju2kr commented Aug 1, 2019

@sshymko I have exactly the same problem, it occurs at irregular intervals. So far I haven't been able to see a fixed pattern to reproduce the problem.

@sshymko
Copy link
Author

sshymko commented Aug 1, 2019

The issue may be caused by race condition of JavaScript callbacks toggling "Please wait..." spinner.
Occurrence of the issue depends on the timing of AJAX calls and alignment of stars :)

@krishprakash
Copy link

@sshymko @ju2kr I have tried several times but couldn't reproduce the issue.
It may be browser specific issue.
Can you please share the browser detail in which you produce this issue.
Thanks

@sshymko
Copy link
Author

sshymko commented Aug 2, 2019

@krishprakash it's not enough to try 2-3 times. It literally takes 10 or sometimes more test case repetitions with the page refresh (Ctrl+R) in between. See the exact browser version in the preconditions.

@krishprakash krishprakash added Component: Backend Component: Cms 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 and removed Progress: needs update labels Aug 2, 2019
@ghost ghost unassigned krishprakash Aug 2, 2019
@magento-engcom-team
Copy link
Contributor

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

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

@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 Aug 2, 2019
@konarshankar07
Copy link
Contributor

Hello @sshymko ,
I think this issue might be fixed in #23621. Can you please test with the mention pull request

Thanks

@sshymko
Copy link
Author

sshymko commented Aug 9, 2019

@konarshankar07
I can confirm #23621 fixes this issue. The bug is no longer reproducible with the patch. Thanks!

@konarshankar07
Copy link
Contributor

Hello @sshymko
Please close this issue if you are not getting this issue any more
Thanks

@sshymko
Copy link
Author

sshymko commented Aug 12, 2019

@konarshankar07
I can no longer reproduce the issue manually, but the corresponding automated MFTF tests still intermittently fail although less frequently than before. I don't think the issue is fully resolved.

@konarshankar07
Copy link
Contributor

@sshymko
Can you please provide me which MFTF testing you are getting the error?
Thanks

@sshymko
Copy link
Author

sshymko commented Aug 12, 2019

@konarshankar07
Failing MFTF tests are listed in my comment above #23966 (comment)

@m2-assistant
Copy link

m2-assistant bot commented Aug 28, 2019

Hi @p-bystritsky. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

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

  • 2. 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!

  • 3. If the issue is not relevant or is not reproducible any more, feel free to close it.


@engcom-Foxtrot
Copy link
Contributor

@sshymko can you please provide detailed steps to reproduce test failures?

@sshymko
Copy link
Author

sshymko commented Aug 28, 2019

@engcom-Foxtrot

Preconditions:

  • Local development environment (NOT pipeline of Magento Inc.)
  • Selenium Server Standalone 3.141.5
  • ChromeDriver 74.0.3729.6
  • Google Chrome 74.0.3729.169
  • Magento 2.3.x OS installed from scratch
    • Production mode
    • DI compiled & static generated
    • Static files deployed
    • Full Page Cache (FPC) disabled (or enabled w/ patch #3937)
    • Fix #23621 applied
    • MFTF Requirements fulfilled
      php bin/magento config:set cms/wysiwyg/enabled disabled
      php bin/magento config:set admin/security/admin_account_sharing 0
      php bin/magento config:set admin/security/use_form_key 0

Steps to reproduce:

  1. Reindex everything & flush cache:
    php bin/magento indexer:reindex
    php bin/magento cache:flush
  2. Start the Selenium server:
    java -jar selenium-server-standalone-3.141.5.jar
  3. Generate entire MFTF test suite:
    vendor/bin/mftf generate:tests
  4. Run the test suite (NOT in parallel):
    vendor/bin/codecept run functional -c dev/tests/acceptance/codeception.yml
  5. Wait ~7h for the tests to finish
  6. Repeat the steps as necessary

Actual result:

  • Number of tests fail, among which random failures related to the WYSIWYG instability:
    Tests: 473, Assertions: 4323, Errors: 7, Failures: 31, Skipped: 26.
    
  • Re-installing the app and rerunning the tests results in slightly different +/-5 failures

p-bystritsky added a commit to p-bystritsky/magento2 that referenced this issue Sep 10, 2019
@magento-engcom-team
Copy link
Contributor

Hi @sshymko. Thank you for your report.
The issue has been fixed in #24333 by @p-bystritsky in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.4 release.

@VladimirZaets
Copy link
Contributor

Hi @sshymko. Thank you for your report.
The issue has been fixed in #25556 by @engcom-Golf in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.5 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Backend Component: Cms Fixed in 2.3.x The issue has been fixed in 2.3 release line 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 Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

8 participants