Clicking on a chart element causes the retry to fail.
This is the error:

The click action should work as expected. The click should select the chart in the following point:

context('Actions', () => {
beforeEach(() => {
cy.visit('https://demo.spotfire.cloud.tibco.com/spotfire/wp/analysis?file=/Public/Airbnb%20Boston%20Listings')
})
it('select chart value', () => {
cy.wait(6000) // Give time for the chart to render. Ideally, this should wait on the specific HTML element.
cy.get('div[title="Property Type Distribution"]').parent().parent().parent().click(150, 60) // This click will fail.
})
})
Second version of code to reproduce that does not rely on cy.wait():
context('Actions', () => {
beforeEach(() => {
cy.visit('https://demo.spotfire.cloud.tibco.com/spotfire/wp/analysis?file=/Public/Airbnb%20Boston%20Listings')
})
it('select chart value', () => {
cy.get('div[title="Property Type Distribution"]').as('chartTitle').parent().parent().parent()
.within(el => {
cy.get('div.sf-element-canvas-image').invoke('attr', 'sf-busy').should('eq', 'false')
cy.wrap(el).as('chart').click(150, 60) // This click will fail.
})
})
})
Windows 10, Chrome or Electron, any version.
"devDependencies": {
"cypress": "^4.3.0"
},
I can recreate this.

This is throwing from here: https://github.com/cypress-io/cypress/blob/develop/packages/driver/src/dom/document.ts#L34:L34
If you track the stack trace up further - this method is resolving to null, which is being passed along to the other commands.
https://github.com/cypress-io/cypress/blob/develop/packages/driver/src/cy/mouse.js#L548:L548

The getFirstCommonAncestor basically does not find the current element within their common ancestors - looping through until it gets to curEl.parentNode that is null.

Probably a similar situation to https://github.com/cypress-io/cypress/pull/6787 and/or https://github.com/cypress-io/cypress/issues/6707 cc @sainthkh
I'll check this out.
@sainthkh You may want to VPN into east coast US because this site loads incredibly slow in Asia.
Thankfully, the site wasn't slow in South Korea. It might be because of the world's fastest Internet South Korea has.
Anyway, I researched the problem and found the cause.
cy.click() command doesn't issue native mouse event, but it only simulates it (#311).
To run that simulation, we check mouseUpPhase and mouseDownPhase:
And then, check if the target element of mouseDownPhase exists:
This code doesn't consider this case: what if the target element of mouseUpPhase doesn't exist?
That's the cause of the problem in this issue.
When you click an item in the chart, the app tries to make a drag area, div.sf-canvas-drag-cursor. That's the target element of mouseUpPhase because it's right below the mouse pointer.

But it doesn't exist any more when getFirstCommonAncestor() starts. That's why getFirstCommonAncestor() loops up to the <html> tag and null.
The solution might be just returning the mouseDownPhase element.
Implementation isn't hard, but I'm asking this just in case to avoid breaking change:
When this code was written, was there a specific case that mouseUpPhase always exists?
The code for this is done in cypress-io/cypress#7010, but has yet to be released.
We'll update this issue and reference the changelog when it's released.
Released in 4.4.1.
This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v4.4.1, please open a new issue.