puppeteer .waitForSelector causes error (evalmachine.<anonymous>
See original GitHub issueHi,
I’m facing this issue when I tried to run puppeteer with bytenode. anyone can help? Script
async doLogin() {
console.log(this.browser.page.url());
const loginPage = this.browser.page.url().includes(this.loginEndpoint);
//if stuck in login page, maybe email or password is wrong
if (loginPage) {
console.log('1');
await this.browser.page.waitForSelector('#identifierId', { visible: true })
console.log('2');
await this.browser.page.type('#identifierId', this.browser.browserOptions.account.email, { delay: 0 })
console.log('3');
await this.browser.page.keyboard.press('Enter')
here is the debug info
User Trying to login
https://accounts.google.com/signin/v2/identifier?flowName=GlifWebSignIn&flowEntry=ServiceLogin
1
Error: Login Gagal
at BotGoogleLogin.<anonymous> (evalmachine.<anonymous>:1:2629581)
at step (evalmachine.<anonymous>:1:2628046)
at Object.throw (evalmachine.<anonymous>:1:2626823)
at rejected (evalmachine.<anonymous>:1:2626164)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
[3676:0409/222919.180:ERROR:gpu_init.cc(457)] Passthrough is not supported, GL is disabled, ANGLE is
However If I disable Bytenode Compiler, it runs smoothly withour error.
disabled BytenodeWebpackPlugin
:
called Login Funct
User Trying to login
https://accounts.google.com/signin/v2/identifier?flowName=GlifWebSignIn&flowEntry=ServiceLogin
1
2
3
login sukses
OS Windows 11 puppeteer-core: 13.5.2 bytenode: 1.3.5 bytenode-webpack-plugin: 1.2.5 @electron-forge/plugin-webpack: ^6.0.0-beta.54 @electron-forge/cli: ^6.0.0-beta.61 ts-loader: ^8.3.0 typescript: ^4.5.3
is there something wrong with my project setup ?
Issue Analytics
- State:
- Created a year ago
- Comments:8
Top Results From Across the Web
node.js - Puppeteer - Handlin page.waitForSelector() fails
waitForSelector () fails, it throws an error. Since this is run inside an async function if leads straight to the catch portion of...
Read more >Passing instances of ElementHandle to page.evaluate() in ...
Hi there, In general the issue with puppeteer's page.evaluate() and bytenode has been ... waitForSelector causes error (evalmachine.
Read more >puppeteer-core@19.4.1 - jsDocs.io
Puppeteer methods might throw errors if they are unable to fulfill a request. For example, page.waitForSelector(selector[, options]) might ...
Read more >Puppeteer documentation - DevDocs
Puppeteer methods might throw errors if they are unable to fulfill a request. For example, page.waitForSelector(selector[, options]) might fail if the ...
Read more >Resolve CloudWatch canary error "Node is either not visible ...
Resolution. When creating a CloudWatch canary, the "Node is either not visible or not an HTMLElement" error is typically caused by: Using ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So, I have simplified your example significantly by removing everything except bytenode and puppeteer, and it worked just fine with and without bytenode.
Here is the simplified version of your work:
package.json
:index.js
:main.js
:googleLogin.js
:browser.js
:Compile:
bytenode -c main.js browser.js googleLogin.js
and run:node index.js
.So, clearly the issue is not in bytenode itself. It might be in bytenode-webpack-plugin or webpack in general.
ofcourse sir, here it is https://github.com/harimayco/bytenode-electron-puppeteer-error
you can set chrome executable chrome path in main.ts regarding your OS Many Thanks!