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

Webpack 5 causing failures during cy.visit() #23416

Closed
nichit93 opened this issue Aug 18, 2022 · 1 comment
Closed

Webpack 5 causing failures during cy.visit() #23416

nichit93 opened this issue Aug 18, 2022 · 1 comment
Assignees

Comments

@nichit93
Copy link

Current behavior

When I am running the cypress tests with webpack 4, all tests are working fine.
But when I use webpack 5, the tests start failing.

Issue:
First-time cy.visit("base page") works fine and makes all the api calls on which we are waiting on to verify loading.
But within the same run, if we visit the base page again, it times out and none of the api calls are made.

In my codebase, I debugged as well and found that while importing a dynamic chunk, it never returns anything and the test times out (only in cypress)

 import(/* webpackChunkName: "[request]" */ "locales/" + stringCulture + "/strings.resx.json").then(
            cultureJson => {
                Strings = cultureJson;
                deferred.resolve();
            },
            error => {
                Strings = stringsResxJson;
                deferred.resolve();
            }
        );

Are there any recommended settings for webpack 5 for cypress?

Desired behavior

It should visit the base page again without timing out

Test code to reproduce

Since this is an issue with webpack 5 bundling of the app wrt cypress. I won't be able to provide a repro.

Cypress Version

9.6.2

Node version

14.18.3

Operating System

Windows 11 Enterprise - 21H2

Debug Logs

No response

Other

I have already tried increasing the timeout time, that doesn't fix the issue.

@nagash77
Copy link
Contributor

@nichit93 Thank you for opening this issue. Support for Webpack 5 already represents the work to be done to support Webpack 5. As such I will be closing this issue as a duplicate. Feel free to follow along on the other issue to receive updates when we begin work on that.

@nagash77 nagash77 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants