Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renderer CoreText warnings displaying when running cypress in Electron #7245

Open
mwren-mshanken opened this issue May 6, 2020 · 24 comments
Labels
browser: electron E2E Issue related to end-to-end testing prevent-stale mark an issue so it is ignored by stale[bot] stage: needs information Not enough info to reproduce the issue Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team. type: regression A bug that didn't appear until a specific Cy version release v4.2.0 🐛 Issue present since 4.2.0

Comments

@mwren-mshanken
Copy link

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

@mwren-mshanken
Copy link
Author

mwren-mshanken commented May 6, 2020

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)
            })
        })
    })

@mwren-mshanken
Copy link
Author

Working back, it appears that this was introduced in 4.2.0

@jennifer-shehane
Copy link
Member

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.

@jennifer-shehane jennifer-shehane added the v4.2.0 🐛 Issue present since 4.2.0 label May 7, 2020
@cypress-bot cypress-bot bot added the stage: awaiting response Potential fix was proposed; awaiting response label May 7, 2020
@jennifer-shehane
Copy link
Member

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.

@jennifer-shehane jennifer-shehane changed the title Cypress Helper errors firing throughout test run Renderer CoreText warnings displaying when running cypress in Electron May 7, 2020
@mwren-mshanken
Copy link
Author

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.

@cw010
Copy link

cw010 commented May 25, 2020

I encountered the same problem!

@basarat
Copy link

basarat commented Jun 4, 2020

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) 🌹

@basarat
Copy link

basarat commented Jun 4, 2020

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/

image

But it doesn't exist in the app I am testing (which still gives the error when run on electron):

image

@jennifer-shehane
Copy link
Member

This is not fixed in the upcoming Electron 9 upgrade.

@cypress-bot cypress-bot bot added stage: needs information Not enough info to reproduce the issue and removed stage: awaiting response Potential fix was proposed; awaiting response labels Jul 7, 2020
@jennifer-shehane
Copy link
Member

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()
})

@cypress-bot cypress-bot bot added stage: ready for work The issue is reproducible and in scope and removed stage: needs information Not enough info to reproduce the issue labels Jul 9, 2020
@jennifer-shehane jennifer-shehane added the type: regression A bug that didn't appear until a specific Cy version release label Jul 9, 2020
@jennifer-shehane
Copy link
Member

This is not fixed in Electron 10 upgrade, Cypress 5.5.0

@starpit
Copy link

starpit commented Nov 12, 2020

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.

@searls
Copy link

searls commented Dec 17, 2020

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)

@EightArmCode
Copy link

EightArmCode commented Jan 29, 2021

FWIW - Same issue using cypress@5.2.0 - 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.

@thisconnect
Copy link

You don't need cli-spinners a single or similar character is enough, in my case it was loaded via CSS.

@nitzanashi
Copy link

Any status update regarding this topic? it's making the CLI output just useless with all the noise coming from this message

@beorn
Copy link

beorn commented Mar 27, 2021

This is not fixed in latest Electron (13.0.0-beta.7) either.

@sunpietro
Copy link

I confirm the issue exists in Cypress 7.4.0 when running in headless mode with cypress run --headless --record false command

@markjaquith
Copy link

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.

@astraljames
Copy link

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.

@cypress-bot cypress-bot bot added stage: backlog and removed stage: ready for work The issue is reproducible and in scope labels Apr 28, 2022
@p120ph37
Copy link

p120ph37 commented May 18, 2022

Until this is fixed, I'm piping my CI output through grep to strip the spam:

npm test 2>&1| grep -v 'CoreText note:'

@nagash77 nagash77 added the prevent-stale mark an issue so it is ignored by stale[bot] label Apr 3, 2023
@chrisk-7777
Copy link

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.

@nagash77 nagash77 added E2E Issue related to end-to-end testing Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team. labels May 8, 2023
@natalyayyad
Copy link

the issue still exists.
Cypress: 12.13..0
Electron: V106

@jennifer-shehane
Copy link
Member

I'm not able to recreate this behavior with this example in 12.13.0. Is this still hapenning?

@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser: electron E2E Issue related to end-to-end testing prevent-stale mark an issue so it is ignored by stale[bot] stage: needs information Not enough info to reproduce the issue Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team. type: regression A bug that didn't appear until a specific Cy version release v4.2.0 🐛 Issue present since 4.2.0
Projects
None yet
Development

No branches or pull requests