https://cypress.io logo
Issues with Cypress 12.5.1 and origin/require (ng ...
# i-need-help
m
I have a strange issue which I can't even explain properly. I am using
cy.origin
and
require
to import dependencies. Those dependencies are local modules (page objects) which I need for assertions. Locally, everything works like a charm, but on CI I get this error:
Error: Error: ENOENT: no such file or directory, open '/tmp/cypress/webpack-preprocessor/36c17fa865a97b9d11c9436638e044d7/cross-origin-cb-948eb7e9dc3ceb4e5222da0c9c591d18.js'
Now before posting the whole setup, does anyone have an idea what could be the issue here? It seems it can not find the sources required for cross origin callbacks.
a
To be honest, I'm not super familiar with this, but maybe try upgrading to 12.6.0 which added
Cypress.require()
for including dependencies within the
cy.origin()
callback. You can see more in the docs here: https://docs.cypress.io/guides/references/changelog#12-6-0
m
I was using 12.6.0, but there is another issue in this version. I reported it yesterday: https://github.com/cypress-io/cypress/issues/25885
a
Excellent! Thanks so much for creating an issue. It has been routed to the correct team and will be investigated as a bug.
h
@melodic-artist-76036 I'm going through similar problems. Currently, when I enable experimentalOriginDependencies just like you did, my tests are loading infinitly without any error. I can't even run them to debug. Did you had this problem? I'm on 12.7.0. My company forces external login and I'm stuck with Cypress not being able to use page objects, because cy.origin() does not accept dependencies...
Turning off flag "chromeWebSecurity" solves the problem. Origin is not required anymore. BTW this discord is useless 😦
s
And yet you are still here 😕
h
yes, giving solutions in case any future poor soul needs it