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.

[Wrapped Error] "Cannot read property 'findAndStoreElements' of undefined"

See original GitHub issue

What are you trying to achieve?

I am trying to fill an input field with some text

What do you get instead?

[Wrapped Error] “Cannot read property ‘findAndStoreElements’ of undefined”

Provide console output if related. Use --verbose mode for more details.

• I fill field "_username", "user144001"
   [1] Error | Cannot read property 'findAndStoreElements' of undefined
   Emitted | step.failed (I fill field "_username", "user144001")
   Step finished in 1.929 sec
   [1] Error | Error: [Wrapped Error] "Cannot read property 'findAndStoreElements' of undefined"
   [1] Starting <teardown> session
   Emitted | test.failed ([object Object])
   [1] <teardown> Queued | hook Nightmare._failed()
   [1] <teardown> Queued | hook Util._failed()
   [1] <teardown> Queued | () => done(err)
   [1] <teardown> Stopping recording promises

  Error: [Wrapped Error] "Cannot read property 'findAndStoreElements' of undefined"
      at promise.catch (/Users/Dragos/Documents/codeceptjs-tests/node_modules/codeceptjs/lib/recorder.js:135:15)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

Provide test source code if related

I.fillField('_username', 'username');

Details

  • CodeceptJS version: v1.1.1
  • NodeJS Version: v9.0.0
  • Operating System: macOS Sierra
  • Nightmare version: v2.10.0
  • Configuration file:
helpers: {
        Nightmare: {
            url: ...,
            show: true,
            restart: true,
            typeInterval: 30,
            smartWait: 5000,
            switches: {
                'ignore-certificate-errors': true
            }
        }
    },

If this is strictly a Nightmare related issue(and not a codeceptjs one) I will re-create this ticket in the proper repo.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
charlyhulcommented, Feb 26, 2018

@reubenmiller thanks a lot. it works for me now with the retry step. 👍 hopefully it will be a solution for the others here too

0reactions
Brydomcommented, Dec 20, 2019

If anyone else runs into this, I fixed it by adjusting the helper to use const I = inject(); at the beginning instead of setting I in the _init() function within the object. Also needed to update Codecept version as I guess _init() was deprecated and replaced with inject().

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >
Uncaught TypeError: Cannot read property 'wrap' of undefined
It looks like 'myCarousel.carousel.attributes.wrap' is undefined. Uncaught TypeError: Cannot read property 'wrap' of undefined at Object.
Read more >
Why getting cannot read properties of undefined error?
users is the array of users Im getting from the API. However I am getting the error: Cannot read properties of null (reading...
Read more >
Uncaught TypeError : Cannot read properties of undefined
Looking for ways to handle Uncaught TypeError: Cannot read property of undefined in JavaScript? This guide will help you to catch errors.
Read more >
How to Prevent the TypeError: Cannot Read Property Map of ...
A guide on the root cause of 'cannot read map of undefined' as well as techniques and tools to prevent this error.
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