question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

expecting an array or an iterable object but got [object Null] using playwright-webkit

See original GitHub issue

Current behavior

I am experiencing a couple of errors just using the new browser experimental feature.

  • TypeError expecting an array or an iterable object but got [object Null] Because this error occurred during a before each hook we are skipping all of the remaining tests.

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

Desired behavior

Should run my tests without problems.

Test code to reproduce

https://github.com/JoanEsquivel/cypress-webkit

  1. Just install dependencies.
  2. Open the test runner
  3. Run for example:
  • cypress/e2e/1-helloworld.ct.ts
  • cypress/e2e/10-checkboxes.cy

Cypress Version

10.8.0

Node version

v16.13.0

Operating System

Windows 10

Debug Logs

TypeError
expecting an array or an iterable object but got [object Null]
View stack trace
 Print to console
TypeError: expecting an array or an iterable object but got [object Null]
    automation@http://uitestingplayground.com/__cypress/runner/cypress_runner.js:153782:63
    @[native code]

Other

I want to say that this could be my mistake doing a wrong usage of typescript or some library. However, it is weird that this issue is only happening for webkit.

Also I see the same error from “bestu” in the discord channel General/general.

image

Appreciate your help.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
flotwigcommented, Oct 12, 2022

This issue has been fixed in #23442. Please look out for this fix in the next release of Cypress (October 25th)

1reaction
Elecashcommented, Sep 15, 2022

@JoanEsquivel @nagash77 I’m also getting the same error although I’m not using experimentalSessionAndOrigin. Could this be a different error?

I don’t have a repo to reproduce the error, but if needed I might try to build one if needed.

Btw, this error is not consistent for me, sometimes it does fails, sometimes it doesn’t.

Read more comments on GitHub >

github_iconTop Results From Across the Web

sequelize error: Unhandled rejection TypeError: expecting an ...
javascript - sequelize error: Unhandled rejection TypeError: expecting an array or an iterable object but got [object Null] - Stack Overflow. ...
Read more >
JoanMedia (@joan_media) / Twitter
Playwright is an amazing framework for automation E2E testing. ... expecting an array or an iterable object but got [object Null] using playwright-webkit...
Read more >
FEED problem: expecting an array or an iterable object but got ...
var Client = require('instagram-private-api').V1; var device = new Client.Device('someuser'); var storage = new Client.
Read more >
JSONArray (Tapestry API - 5.4.0)
The internal form is an object having get and opt methods for accessing the ... and adds all values fro the iterable to...
Read more >
ES6's Many for Loops and Iterable Objects - Alan Storm
js, jQuery, lodash, etc.) have something like an each or foreach utility method/function that let you loop over objects and arrays without ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found