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

Very weird error related to modified page contents when using document.write #1405

Closed
bahmutov opened this issue Mar 2, 2018 · 3 comments
Closed

Comments

@bahmutov
Copy link
Contributor

bahmutov commented Mar 2, 2018

I put the example test into branch https://github.com/cypress-io/cypress-test-tiny/tree/github-static-pages The test just loads a static github page of mine

it('works for website that plays hydration tricks', () => {
  cy.visit('https://glebbahmutov.com')
})

Now that page is a little tricky - it loads Vue app, but it also writes part of the page using document.write to speed up the initial load. Then Vue hydrates the application and it becomes interactive.

First time loading this page in Cypress test runner shows the following error

screen shot 2018-03-02 at 8 42 32 am

Weird, isn't it? Then I set "modifyObstructiveCode": false in cypress.json and the website loaded fine.

BUT: when I tried to recreate the issue again and set "modifyObstructiveCode": true the issue would not show up. I removed cached project bundles, still good. Then suddenly it appeared one more time. So there was no reliable way to recreate the problem.

  • Mac OS
  • Cypress 2.1.0
@bahmutov
Copy link
Contributor Author

bahmutov commented Mar 2, 2018

Haha, just went to look at staging api logs and see the same issue in a CI build
screen shot 2018-03-02 at 9 17 02 am

@bahmutov
Copy link
Contributor Author

bahmutov commented Mar 2, 2018

I wonder if I should have removed certificates to recreate the error, maybe there was a race condition there

@jennifer-shehane
Copy link
Member

Cannot recreate this in Cypress version 3.4.0. Closing. Related open issue, however: #1746

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants