-
Notifications
You must be signed in to change notification settings - Fork 197
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
ObjectID generation failed #302
Comments
Hi @agranados0121, The ObjectID generation message here is probably just a symptom of puppeteer failing to run Chrome successfully, as shown by the following lines in your output:
I would try to verify first that Chrome can run inside your VM. Seeing as you're running Linux you probably may want to ensure that the right dependencies are installed. If using a recent version of ubuntu you'll probably need to install If you're trying to run pa11y in a virtualised environment you may also need to pass certain flags to Chrome so it runs successfully inside the container, namely the {
"port": 8080,
"noindex": true,
"readonly": false,
"webservice": {
"database": "mongodb://localhost",
"host": "0.0.0.0",
"port": 3000,
"chromeLaunchConfig": {
"args": [
"--no-sandbox",
"--disable-setuid-sandbox"
]
}
}
} Addressing these two things should be enough to get Chrome running. |
Hey @josebolos, The flags were what I was missing to get everything working. So I really appreciate the help :) |
@josebolos Any chance you could add this to the Troubleshooting section of the readme? I just spend a while trying to find my way around the issue because I ran across pa11y/pa11y-webservice#164 before I found this issue. The flags were the correct fix. |
@josebolos Thank you, that also worked for me trying to use the sample development config on Arch Linux. Might it be a good idea to include these flags in this one already? |
Based on previously resolved issues this has been already addressed but I keep running into the same errors. When running the actual task on a URL, the service generates the same error of ObjectID generation failed. One thing to note is that nothing was installed with homebrew
Actual behaviour
Starting NEW to run one-off task @ 2022-07-06T19:08:23.901Z
[62c5bed69206931dbe508377] > Running Pa11y on URL https://youtube.com
[62c5bed69206931dbe508377] > Launching Headless Chrome
model:task:runById failed, with id: 62c5bed69206931dbe508377
Pa11y timed out (30000ms)
Failed to finish task 62c5bed69206931dbe508377
ObjectID generation failed. Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
Steps to reproduce
NODE_ENV=development node index.js
Environment
Running in a Ubuntu VM:
node -v
v14.19.3
mongod -version
db version v4.4.15
Build Info: {
"version": "4.4.15",
"gitVersion": "bc17cf2c788c5dda2801a090ea79da5ff7d5fac9",
"openSSLVersion": "OpenSSL 1.1.0g 2 Nov 2017",
"modules": [],
"allocator": "tcmalloc",
"environment": {
"distmod": "ubuntu2004",
"distarch": "x86_64",
"target_arch": "x86_64"
}
}
The text was updated successfully, but these errors were encountered: