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

expecting an array or an iterable object but got [object Null] #23992

Closed
agoodall77 opened this issue Sep 27, 2022 · 9 comments
Closed

expecting an array or an iterable object but got [object Null] #23992

agoodall77 opened this issue Sep 27, 2022 · 9 comments

Comments

@agoodall77
Copy link

agoodall77 commented Sep 27, 2022

Current behavior

I have a suite of tests that use a before each statement.
On running the tests using the webkit plugin the before each runs then the first test runs.
When the before each runs again it fails before it can get to the second test.

Producing a "expecting an array or an iterable object but got [object Null" error.

The stack trace produced is:

TypeError: expecting an array or an iterable object but got [object Null]

Because this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `CDS Pages`
    automation@https://website/__cypress/runner/cypress_runner.js:153782:63
    automate@https://website/__cypress/runner/cypress_runner.js:139528:32
From previous event:
    getAndClear@https://website/__cypress/runner/cypress_runner.js:139554:70
From previous event:
    @https://website/__cypress/runner/cypress_runner.js:160956:36
From previous event:
    onRunnableRun@https://website/__cypress/runner/cypress_runner.js:164671:50
    @https://website/__cypress/runner/cypress_runner.js:162351:19
    next@https://website/__cypress/runner/cypress_runner.js:108383:13
    @https://website/__cypress/runner/cypress_runner.js:108427:9
    timeslice@https://website/__cypress/runner/cypress_runner.js:102353:27

It should be noted that this issue only occurs when running against webkit not against chrome, edge or safari

Desired behavior

Cypress runs the tests as per the other browsers without erroring.

Test code to reproduce

describe('CDS Pages', () => {

  beforeEach(() => {
    cdsLoginPage.navigatecds(webpage)
    cdsLoginPage.addUsercredentials(user credentials)
    cdsLoginPage.signIn()
    cdsAccountPage.accountcds(an account)
    cdsAccountPage.switchincds(an account, text)
  })
})

Cypress Version

10.8.0

Node version

v14.18.0

Operating System

11.6

Debug Logs

No response

Other

No response

@ZachJW34
Copy link
Contributor

Do you have experimentalSessionAndOrigin enabled? Try removing this flag and running again, experimentalWebkitSupport does not support experimentalSessionAndOrigin yet.

Going to close as duplicate of #23832

@agoodall77
Copy link
Author

agoodall77 commented Sep 27, 2022 via email

@ZachJW34
Copy link
Contributor

Could you provide a reproducible example? I won't be able to investigate further without one as there isn't enough information for me to go on.

@agoodall77
Copy link
Author

agoodall77 commented Sep 27, 2022 via email

@astone123
Copy link
Contributor

@agoodall77 We understand that you wouldn't want to share any IP with us, but if you could create a sort of trimmed-down example of the project (preferably in a repository) that triggers this error so that we can re-produce the issue on our machines, that would be extremely helpful. Thanks!

@cypress-bot cypress-bot bot added the stage: awaiting response Potential fix was proposed; awaiting response label Sep 28, 2022
@agoodall77
Copy link
Author

agoodall77 commented Sep 28, 2022 via email

@astone123
Copy link
Contributor

@agoodall77 unfortunately we don't offer that level of support at this time. Please let us know if you are able to provide a reproducible example

@agoodall77
Copy link
Author

agoodall77 commented Sep 28, 2022 via email

@flotwig
Copy link
Contributor

flotwig commented Sep 28, 2022

This looks like #23832. Thanks for the repro @agoodall77, I'm going to close this issue since it is a duplicate. You can watch #23832 for updates on this.

@flotwig flotwig closed this as completed Sep 28, 2022
@astone123 astone123 removed the stage: awaiting response Potential fix was proposed; awaiting response label Oct 4, 2022
@astone123 astone123 removed their assignment Oct 4, 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

4 participants