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.

Cypress Object.statSync Error (Cannot read properties of undefined (reading 'uid'))

See original GitHub issue

Current behavior

Today

Notes:

  1. Tried reinstalling cypress
  2. Tried clearing cypress cache
  3. Tried a new version of Cypress
  • Remove the node_modules folder & package-lock file from the repo
  • npm i
  • ‘npx cypress open’
  • Click on a spec/feature file
  • The runner output the following

TypeError: Cannot read properties of undefined (reading 'uid') at Object.statSync (C:\Users\User\AppData\Local\Cypress\Cache\8.7.0\Cypress\resources\app\packages\server\node_modules\graceful-fs\polyfills.js:303:17) at isDirectory (C:\Users\User\Documents\ADO\Nebula\Policy\tests\CypressTests\node_modules\resolve\lib\sync.js:22:23) at loadNodeModulesSync (C:\Users\User\Documents\ADO\Nebula\Policy\tests\CypressTests\node_modules\resolve\lib\sync.js:191:17) at Function.resolveSync [as sync] (C:\Users\User\Documents\ADO\Nebula\Policy\tests\CypressTests\node_modules\resolve\lib\sync.js:98:17) at Object.handler (C:\Users\User\Documents\ADO\Nebula\Policy\tests\CypressTests\cypress\plugins\index.js:13:27) at invoke (C:\Users\User\AppData\Local\Cypress\Cache\8.7.0\Cypress\resources\app\packages\server\lib\plugins\child\run_plugins.js:22:16) at C:\Users\User\AppData\Local\Cypress\Cache\8.7.0\Cypress\resources\app\packages\server\lib\plugins\util.js:45:14 at tryCatcher (C:\Users\User\AppData\Local\Cypress\Cache\8.7.0\Cypress\resources\app\packages\server\node_modules\bluebird\js\release\util.js:16:23) at Function.Promise.attempt.Promise.try (C:\Users\User\AppData\Local\Cypress\Cache\8.7.0\Cypress\resources\app\packages\server\node_modules\bluebird\js\release\method.js:39:29) at Object.wrapChildPromise (C:\Users\User\AppData\Local\Cypress\Cache\8.7.0\Cypress\resources\app\packages\server\lib\plugins\util.js:44:23) at Object.wrap (C:\Users\User\AppData\Local\Cypress\Cache\8.7.0\Cypress\resources\app\packages\server\lib\plugins\child\preprocessor.js:28:8) at execute (C:\Users\User\AppData\Local\Cypress\Cache\8.7.0\Cypress\resources\app\packages\server\lib\plugins\child\run_plugins.js:119:27) at EventEmitter.<anonymous> (C:\Users\User\AppData\Local\Cypress\Cache\8.7.0\Cypress\resources\app\packages\server\lib\plugins\child\run_plugins.js:202:5) at EventEmitter.emit (events.js:376:20) at process.<anonymous> (C:\Users\User\AppData\Local\Cypress\Cache\8.7.0\Cypress\resources\app\packages\server\lib\plugins\util.js:19:22) at process.emit (events.js:376:20) at process.emit (C:\Users\User\AppData\Local\Cypress\Cache\8.7.0\Cypress\resources\app\packages\server\node_modules\source-map-support\source-map-support.js:495:21) at emit (internal/child_process.js:910:12) at processTicksAndRejections (internal/process/task_queues.js:83:21)

Desired behavior

This obviously should not be happening

Test code to reproduce

Steps to reproduce described already

Cypress Version

8.7.0

Other

I see this issue with 8.7.0 & also 9.2.1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mdriecommented, Jan 19, 2022

Yes! Thank you. It was something completely different, but in the end - my problem. Thanks for the help!

1reaction
san-ouadghiricommented, Jan 17, 2022

Doc in the cucumber repo changed. Changing my former code with the documented one solved it for me. I changed path.resolve(‘…’) by path.resolve(‘.’) because it suitted better my situation.

https://github.com/TheBrainFamily/cypress-cucumber-preprocessor#with-out-of-the-box-support

Hope it helps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cypress TypeError: Cannot read properties of undefined ...
TypeError : Cannot read properties of undefined (reading 'uid') at Object.statSync (C:\Windows\SysWOW64\config\systemprofile\AppData\Local\ ...
Read more >
typeerror: cannot read properties of undefined (reading 'equal')
TypeError : Cannot read properties of undefined (reading 'uid') at Object.statSync (C:\Windows\SysWOW64\config\systemprofile\AppData\Local\Cypress\Cache\8.7.
Read more >
fs.Stats.uid JavaScript and Node.js code examples - Tabnine
Synchronously reads the entire contents of a file. existsSync. Synchronously tests whether or not the given path exists by checking with the file...
Read more >
https://git.2li.ch/keeweb/keeweb/commit/0e1b086096...
toString; - -/** Used to check objects for own properties. ... var error = new Error('tunneling socket could not be established, ' +...
Read more >
Level-fs: Node's Fs Module with Leveldb As Backend - Morioh
error codes; empty but existing files; modes; users and groups; byte indexes for offsets; file descriptors; directory support; rename(oldPath, newPath, ...
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