Skip to content
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

Error: Evaluation failed: TypeError: Cannot read property 'default' of undefined #1116

Closed
contatodct opened this issue Nov 28, 2020 · 15 comments
Labels
doesn't follow template This issue does not use the right template

Comments

@contatodct
Copy link

^Croot@supernetzap:/var/www/bot/admin# ts-node app.ts
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ ┃
┃ @open-wa/wa-automate ┃
┃ 💬 🤖 The most reliable NodeJS whatsapp library for chatbots with advanced features. ┃
┃ Version: 3.1.0 ┃
┃ Check out the latest changes: https://github.com/open-wa/wa-automate-nodejs#latest-changes
┃ ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

  • Initializing WA
  • Browser Launched
    ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
    │ (index) │ Values │
    ├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
    │ WA_VERSION │ undefined │
    │ PAGE_UA │ 'WhatsApp/2.2037.6 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36' │
    │ WA_AUTOMATE_VERSION │ '3.1.0' │
    │ BROWSER_VERSION │ 'HeadlessChrome/83.0.4103.0' │
    └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  • Injecting api
  • WAPI injected
  • Authenticating
  • Authenticate to continue
    set -> e Error: Evaluation failed: TypeError: Cannot read property 'default' of undefined
    at window..window. (/var/www/bot/admin/node_modules/@open-wa/wa-automate/dist/lib/launch.js:1:31435)
    at puppeteer_evaluation_script:3:89
    at ExecutionContext._evaluateInternal (/var/www/bot/admin/node_modules/puppeteer/lib/ExecutionContext.js:102:19)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at ExecutionContext.evaluate (/var/www/bot/admin/node_modules/puppeteer/lib/ExecutionContext.js:33:16)
    -- ASYNC --
    at ExecutionContext. (/var/www/bot/admin/node_modules/puppeteer/lib/helper.js:94:19)
    at DOMWorld.evaluate (/var/www/bot/admin/node_modules/puppeteer/lib/DOMWorld.js:89:24)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    -- ASYNC --
    at Frame. (/var/www/bot/admin/node_modules/puppeteer/lib/helper.js:94:19)
    at Page.evaluate (/var/www/bot/admin/node_modules/puppeteer/lib/Page.js:612:14)
    at Page. (/var/www/bot/admin/node_modules/puppeteer/lib/helper.js:95:27)
    at set (/var/www/bot/admin/node_modules/@open-wa/wa-automate/dist/controllers/auth.js:165:75)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
@smashah
Copy link
Member

smashah commented Nov 28, 2020

@contatodct this only happened once?

@contatodct
Copy link
Author

@smashah
and so.......
let's assume I'm going to register the qrcode the first time .... it appears the qrcode normally and I can scan, but if I miss the scan, it gives this problem, so I need to wait a while to be able to scan, this error keeps showing up, so I wait about 2 hours and try again, here it goes

@contatodct
Copy link
Author

contatodct commented Nov 28, 2020

image

@rahulserver
Copy link

I am facing the same issue on windows (10 64 bit). Seems working fine on MAC(Bug Sur/Catalina both).
It seems that once the app is run for the first time, then somewhere a cache is created. So subsequent qr scans do not lead to any further authentication.

@contatodct
Copy link
Author

@rahulserver
and exactly what happens ..... the first time goes normally, I use Debian 8.7 64Bits and it always worked normal, and now I face this problem

@rahulserver
Copy link

rahulserver commented Nov 29, 2020

My initial run was on 3.0.8. Now even after i fix the package json version to "3.0.8" I still get this error on windows.
Maybe someone might confirm this by running on another windows machine if my assumption is correct(that this package is broken on windows). @contatodct

@contatodct
Copy link
Author

just tested on debian 64Bits and windows .... both have the same problem @rahulserver

@smashah
Copy link
Member

smashah commented Nov 29, 2020

@rahulserver @contatodct can you run with headless: false and then enter Debug.VERSION in the console to get the version number, please.

and take a screenshot of the browser window and share it here.

Also, try with useChrome: true

@rahulserver
Copy link

@smashah I have run with useChrome: true and headless: false same result.
I am not near windows machine. I'll send the screenshot of the error once I get there. In short its the same error what @contatodct sent.

@smashah
Copy link
Member

smashah commented Nov 29, 2020

There's too much context missing from the original issue. I'm going to need you to fill in the issue template. In the meantime, I will test it on a windows machine.

@smashah
Copy link
Member

smashah commented Nov 29, 2020

@github-actions run

Template!
(async () => {
//label issue
await githubClient.issues. addLabels({
        issue_number: context.issue.number,
        owner: context.repo.owner,
        repo: context.repo.repo,
        labels: ["doesn't follow template"]
      })

 await postComment(`⚠️⚠️⚠️[Please follow this issue template](https://github.com/smashah/sulla/issues/new?assignees=&labels=&template=bug_report.md&title=)⚠️⚠️⚠️`);

//close issue
await githubClient.issues. update({
        issue_number: context.issue.number,
        owner: context.repo.owner,
        repo: context.repo.repo,
        state: "closed"
      })
})();

@smashah smashah added the doesn't follow template This issue does not use the right template label Nov 29, 2020
@smashah
Copy link
Member

smashah commented Nov 29, 2020

⚠️⚠️⚠️Please follow this issue template⚠️⚠️⚠️

@smashah smashah closed this as completed Nov 29, 2020
@contatodct
Copy link
Author

@smashah
I'm using Debian, 8.7 64Bits and the Open-wa Example so I don't have an error, the first time it logs normally ..... it looks more like it loads a cache somewhere than when removing Session and trying again to register from another number it happens this ...

100526843-8413f080-31ab-11eb-97f7-288c5518ce43

@edneijunior
Copy link

edneijunior commented Dec 3, 2020

I believe it is related
debug-js/debug#797
probably puppeteer dependency

@Qix-
Copy link

Qix- commented Dec 4, 2020

@edneijunior There's nothing to indicate this is a problem with debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doesn't follow template This issue does not use the right template
Projects
None yet
Development

No branches or pull requests

5 participants