Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Weird error after initial setup

See original GitHub issue

cy.readFile() must be passed a non-empty string as its 1st argument. You passed: 146.Learn more

This happens after finishing setup and trying to run a sample test.

This is in my command that I use to login:

    .then((url) => {

Error happens on the cy.injectAxe() line.


Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

bstrutherscommented, Feb 16, 2021

I was able to work around this by creating my own injectAxe method in my tests.

const injectAxe = () => {
  // cy.injectAxe is currently broken.

  // Creating our own injection logic
  cy.readFile('../../node_modules/axe-core/axe.min.js').then((source) => {
    return cy.window({ log: false }).then((window) => {

Then instead of calling cy.injectAxe(), I call my own method to inject the script.

soniajainscommented, Dec 7, 2021

Yes, this issue still exists with the latest version, we tried calling our own method to inject the script.

const injectAxe = () => {

cy.readFile(‘…/…/node_modules/axe-core/axe.min.js’).then((source) => { return cy.window({ log: false }).then((window) => { window.eval(source); }); }); };

Read more comments on GitHub >

github_iconTop Results From Across the Web

Weird error message when setting up a new 3CX instance
I had setup a cheap 10$ server with a free 3CX license and tested for a couple of months. My company is now...
Read more >
Getting A Weird Error Message From Context Menu...
7. Click on the Startup Tab and click open task manager. This will open another window which contains all your startup applications on...
Read more >
If your computer beeps and fails to boot - IU KB
If problems are found while booting, you can usually diagnose them using the error codes displayed on the screen.
Read more >
Weird Error when setting up my first projetct - Get Help
Hi guys, I am getting weird errors when following the quick start guide. On my PC I'm getting this: npx: installed 125 in...
Read more >
weird installation database error -
But now I have this weird database connection problem trying to install ... to my setup, as this is all on my home...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found