percySnapshot - TypeError: Cannot read properties of undefined (reading 'isTTY')
See original GitHub issueCurrent behavior
Running percy exec -- cypress run
gives me the following errors:
TypeError: Cannot read properties of undefined (reading 'isTTY')
at PercyLogger.write (http://localhost:3000/__cypress/tests?p=cypress/support/index.js:5511:27)
at PercyLogger.log (http://localhost:3000/__cypress/tests?p=cypress/support/index.js:5498:12)
at Object.isPercyEnabled (http://localhost:3000/__cypress/tests?p=cypress/support/index.js:5839:11)
at async Context.eval (http://localhost:3000/__cypress/tests?p=cypress/support/index.js:5148:10)
I was able to narrow down where the error/failed tests were stemming from, and it looks like all my tests pass if I comment out lines where I’m using percyScreenshot
. The odd thing is that running cypress open
works fine and passes all tests as expected.
Desired behavior
No response
Test code to reproduce
The error occurs exactly at line 7
, so removing/deleting that line (cy.percySnapshot(...
) results in a passing test.
const screenWidths = [375, 768, 1280]
describe("ordering stocks", () => {
it("should visit homepage", () => {
cy.visit("/")
cy.findByText(/My text/)
cy.percySnapshot("DSC homepage", { widths: screenWidths })
})
})
Cypress Version
8.7.0
Other
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
TypeError: Cannot read property 'isTTY' of undefined
I have installed twilio latest version in my angular project. But when the project runs, it says that "Cannot read property 'isTTY' of...
Read more >cannot read properties of undefined (reading 'snapshot')
When I call toMatchImageSnapshot() function, it will give me the below error. TypeError: Cannot read properties of undefined (reading '_counters'). Open side ...
Read more >percy-cypress - bytemeta
[TypeScript] percySnapshot - TypeError: Cannot read properties of undefined (reading 'isTTY'). Previous Next. Make software development more efficient, ...
Read more >Issues - percy-cypress - Geeks
Duplicate snapshot name in a parallel build causes missing snapshots · [TypeScript] percySnapshot - TypeError: Cannot read properties of undefined (reading ' ...
Read more >Percy percy-cypress Issues - Giters
Duplicate snapshot name in a parallel build causes missing snapshots · [TypeScript] percySnapshot - TypeError: Cannot read properties of undefined (reading ' ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jennifer-shehane Thanks for responding. @alexbjorlig I did post a similar issue on percy/precy-cypress. Here’s the link to the issue if you are interested https://github.com/percy/percy-cypress/issues/430
It seems this error is throwing from the percy plugin, and not Cypress itself. Have you tried opening an issue with Percy? https://github.com/percy/percy-cypress