cypress
cypress copied to clipboard
Renderer CoreText warnings displaying when running cypress in Electron
Current behavior:
During my test run my log started being filled with:
2020-05-06 10:20:09.935 Cypress Helper (Renderer)[13275:1197167] CoreText note: Client requested name ".AppleSymbolsFB", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2020-05-06 10:20:09.935 Cypress Helper (Renderer)[13275:1197167] CoreText note: Set a breakpoint on CTFontLogSystemFontNameRequest to debug.
Eventually, Cypress crashed between tests, between the Screenshot and Video packaging steps:
(Screenshots)
- /Users/morgan/Documents/WineSpectator/git/ws/cypress/screenshots/ws_home_page.sp (1280x720)
ec.js/Testing shared resources like header, footer, etc -- Homepage Ads appear -
- Banner Ads Appear (failed).png
The Test Runner unexpectedly exited via a exit event with signal SIGSEGV
Please search Cypress documentation for possible solutions:
https://on.cypress.io
Check if there is a GitHub issue describing this crash:
https://github.com/cypress-io/cypress/issues
Consider opening a new issue.
----------
Platform: darwin (19.4.0)
Cypress Version: 4.5.0
Desired behavior:
Cypress executes test runs without crashing
Test code to reproduce
fwiw most of my tests were hitting
winespectator.com -- I had tests running on the home page here.
Versions
Platform: darwin (19.4.0) Cypress Version: 4.5.0
I can consistently reproduce this with this portion of a test. The first test triggers it, and running additional tests allows enough time for it to manifest. If I run the first test in isolation with an .only it ends before I see the error in the logs
context('Past Years Top 10s', function() {
beforeEach(function() {
cy.visit('https://top100.winespectator.com/archives/')
})
it('Elements Appear', function() {
cy.get('.s-archive-item')
.should('be.visible')
.and('have.length', 6)
})
})
context('100 Values', function(){
beforeEach(function() {
cy.visit('https://top100.winespectator.com/values/')
})
it('Map appears, and can be clicked to expand', function() {
cy.get('.values-map-link')
.should('be.visible')
.click()
cy.get('.featherlight-content')
.should('be.visible')
.find('.featherlight-close')
.click()
cy.get('.featherlight-content')
.should('not.be.visible')
})
it('Header Buttons serve valid pages', function() {
cy.get('.values-menu')
.find('a')
.each(function(button) {
cy.validateHref(button)
})
})
})
Working back, it appears that this was introduced in 4.2.0
I am able to see the Renderer warnings, but am not able to reproduce the crashing with a SIGSEGV exit. Is the SIGSEGV crash consistent on each run? Because I'm not sure the crash is related to the Renderer warnings.
I can see the warnings started appearing in 4.2.0 when running in Electron. Probably due to the Electron upgrade.
You can run the tests passing --browser chrome
. This will launch the tests within a Chrome browser detected on your machine without the error.
I think this may have something to do with the app under test using -apple-system
font in css, but I haven't been able to recreate it outside of their app.
The crash for me occurs later in the test run. As I continue to run more tests this error spams my log. It may be triggering some sort of leak. After a minute or so the process crashes.
I encountered the same problem!
The CoreText warnings started appearing on a fresh install (4.7.0) on the base todo mvc app. It does not have -apple-system
font in the css.
As mentioned it is only happening on electron (cypress run
) and goes away with chrome (cypress run --browser chrome --headless
) :rose:
For full verification I ran Array.from(document.querySelectorAll('*')).map(n => getComputedStyle(n)).map(style => style.fontFamily).filter(fam => fam.includes('-apple'));
It does exist on page: https://top100.winespectator.com/archives/
But it doesn't exist in the app I am testing (which still gives the error when run on electron):
This is not fixed in the upcoming Electron 9 upgrade.
Reproducible example:
it('Map appears, and can be clicked to expand', () => {
cy.visit('https://top100.winespectator.com/values/')
cy.get('.values-map-link')
.should('be.visible')
.click()
})
This is not fixed in Electron 10 upgrade, Cypress 5.5.0
FYI, the issue on our side was caused by using cli-spinners
. The characters used in those ASCII-art spinners resulted in the "CoreText note" console error messages. By avoiding the use of these characters (in our case, we switched to a css spinner), we avoided ... whatever underlying bug causes these spurious console error messages.
FWIW, this issue has affected nearly every application I test with Cypress, often triggered by a deeply-nested dependency that I don't have direct control over. Would be really great to be able to suppress these, as our test output is not very useful (getting thousands of these warnings printed per test run)
FWIW - Same issue using [email protected]
- each test suite fires off 10-20 of these:
2021-01-29 10:59:24.986 Cypress Helper (Renderer)[71257:1176057] CoreText note: Client requested name ".AppleSymbolsFB", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
It renders just above the XML terminal output.
As suggested by @starpit, I checked our node_modules
dir for that deep dependency of cli-spinners
, but we don't have that.
You don't need cli-spinners
a single ⠋
or similar character is enough, in my case it was loaded via CSS.
Any status update regarding this topic? it's making the CLI output just useless with all the noise coming from this message
This is not fixed in latest Electron (13.0.0-beta.7) either.
I confirm the issue exists in Cypress 7.4.0 when running in headless mode with cypress run --headless --record false
command
Still experiencing this in Cypress 8.3.0
The way I worked around it was by setting a custom userAgent
value in cypress.json
. Then, I had the application server check for that user agent (and also that the application wasn't running in production mode) and skip emitting those characters if so. This worked in my case, because the characters were purely decorative (emoji and other multibyte characters in the display text of a <select />
), and I had full control of their output.
I'm still experiencing this in 9.5.4
It doesn't affect tests, but it makes the console output so much harder to parse.
Until this is fixed, I'm piping my CI output through grep
to strip the spam:
npm test 2>&1| grep -v 'CoreText note:'
This is still present in 12.11.0. Similar to others, the tests run, but the output is near impossible to read. Any useful information is pushed outside of the scroll buffer.
the issue still exists. Cypress: 12.13..0 Electron: V106
I'm not able to recreate this behavior with this example in 12.13.0. Is this still hapenning?