RangeError: offset is out of bounds when trying to render 3d objects in Cypress

So I am using Cypress test runner for end to end testing for an Angular application that uses threeJS to render 3d objects in the scene. Everything works fine until I ask for the 3d scene to be rendered, which is giving the error ‘RangeError: offset is out of bounds’ and the "d objects are not rendered. Note, this particular error is only showing up when I am using the chrome browser/Electron for Cypress testing. Otherwise it is being rendered on chrome without Cypress.

Chrome being controlled by Cypress

Using google chrome without Cypress:

Chrome without Cypress

I was just wondering what could be the reason for this issue?

I tried debugging using the chrome debugger (no error shown in the console) and everything seems to be working fine. I guess it is exclusively related to Cypress. It would be a great help to me if I’m informed what could be the issue for this.


Yeah, it’s me who posted that question in stackoverflow.

It seems other devs were also confronted with this error message. Have you already tried the solution mentioned in RangeError when visually diffing: The value of "offset" is out of range. · Issue #8415 · cypress-io/cypress · GitHub.

BTW: The Cypress repository is probably the best place for reporting this issue.

1 Like