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 when authenticated done #3

Closed
marlon33 opened this issue Aug 19, 2020 · 3 comments
Closed

Error when authenticated done #3

marlon33 opened this issue Aug 19, 2020 · 3 comments

Comments

@marlon33
Copy link

(node:3464) UnhandledPromiseRejectionWarning: Error: Evaluation failed: t
    at ExecutionContext._evaluateInternal (C:\Bots\whaticket-master\backend\node
_modules\puppeteer\lib\ExecutionContext.js:102:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async ExecutionContext.evaluate (C:\Bots\whaticket-master\backend\node_mo
dules\puppeteer\lib\ExecutionContext.js:33:16)
    at async Client.sendPresenceAvailable (C:\Bots\whaticket-master\backend\node
_modules\whatsapp-web.js\src\Client.js:537:16)
  -- ASYNC --
    at ExecutionContext.<anonymous> (C:\Bots\whaticket-master\backend\node_modul
es\puppeteer\lib\helper.js:94:19)
    at DOMWorld.evaluate (C:\Bots\whaticket-master\backend\node_modules\puppetee
r\lib\DOMWorld.js:89:24)
  -- ASYNC --
    at Frame.<anonymous> (C:\Bots\whaticket-master\backend\node_modules\puppetee
r\lib\helper.js:94:19)
    at Page.evaluate (C:\Bots\whaticket-master\backend\node_modules\puppeteer\li
b\Page.js:612:14)
    at Page.<anonymous> (C:\Bots\whaticket-master\backend\node_modules\puppeteer
\lib\helper.js:95:27)
    at Client.sendPresenceAvailable (C:\Bots\whaticket-master\backend\node_modul
es\whatsapp-web.js\src\Client.js:537:35)
    at Client.<anonymous> (C:\Bots\whaticket-master\backend\src\libs\wbot.js:69:
9)
(node:3464) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). To termina
te the node process on unhandled promise rejection, use the CLI flag `--unhandle
d-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejectio
ns_mode). (rejection id: 4)
(node:3464) UnhandledPromiseRejectionWarning: TimeoutError: waiting for selector
 "canvas" failed: timeout 45000ms exceeded
    at new WaitTask (C:\Bots\whaticket-master\backend\node_modules\puppeteer\lib
\DOMWorld.js:388:34)
    at DOMWorld._waitForSelectorOrXPath (C:\Bots\whaticket-master\backend\node_m
odules\puppeteer\lib\DOMWorld.js:313:26)
    at DOMWorld.waitForSelector (C:\Bots\whaticket-master\backend\node_modules\p
uppeteer\lib\DOMWorld.js:296:21)
    at Frame.waitForSelector (C:\Bots\whaticket-master\backend\node_modules\pupp
eteer\lib\FrameManager.js:384:51)
    at Frame.<anonymous> (C:\Bots\whaticket-master\backend\node_modules\puppetee
r\lib\helper.js:95:27)
    at Page.waitForSelector (C:\Bots\whaticket-master\backend\node_modules\puppe
teer\lib\Page.js:799:33)
    at Timeout.getQrCode (C:\Bots\whaticket-master\backend\node_modules\whatsapp
-web.js\src\Client.js:110:28)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:3464) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). To termina
te the node process on unhandled promise rejection, use the CLI flag `--unhandle
d-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejectio
ns_mode). (rejection id: 5)
(node:3464) UnhandledPromiseRejectionWarning: TimeoutError: waiting for selector
 "canvas" failed: timeout 45000ms exceeded
    at new WaitTask (C:\Bots\whaticket-master\backend\node_modules\puppeteer\lib
\DOMWorld.js:388:34)
    at DOMWorld._waitForSelectorOrXPath (C:\Bots\whaticket-master\backend\node_m
odules\puppeteer\lib\DOMWorld.js:313:26)
    at DOMWorld.waitForSelector (C:\Bots\whaticket-master\backend\node_modules\p
uppeteer\lib\DOMWorld.js:296:21)
    at Frame.waitForSelector (C:\Bots\whaticket-master\backend\node_modules\pupp
eteer\lib\FrameManager.js:384:51)
    at Frame.<anonymous> (C:\Bots\whaticket-master\backend\node_modules\puppetee
r\lib\helper.js:95:27)
    at Page.waitForSelector (C:\Bots\whaticket-master\backend\node_modules\puppe
teer\lib\Page.js:799:33)
    at Timeout.getQrCode (C:\Bots\whaticket-master\backend\node_modules\whatsapp
-web.js\src\Client.js:110:28)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:3464) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). To termina
te the node process on unhandled promise rejection, use the CLI flag `--unhandle
d-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejectio
ns_mode). (rejection id: 6)

other thing, i start this on aws vps, but the server was calling the privete IP note the public ip, how can i fix it?
image

@canove
Copy link
Owner

canove commented Aug 19, 2020

About the first error, it may be related to whatsapp authentication. Some features in system try to use "wbot", and if its still in "authenticating" mode (before read QRcode), it throw an error. I will try to solve this in a few days.

About running it in a VPS, you need to build frontend app (in frontend folder, run: npm run build). It will create a folder called "build", that you can publish with apache or nginx.
You should also change cors setting in backend\src\app.js to improve security.

Note: Its not tested it in a production environment, and I'm not sure that its safe to use.

@marlon33
Copy link
Author

I did it, change the ip's 'localhost' to 'ipv4 of vps' but still have error,
Failed to load resource: net::ERR_CONNECTION_REFUSED localhost:8080/auth/login:1

i already change the ip's, but still connection was localhost, and i'm trying fix it tks

@marlon33
Copy link
Author

I solvedd this problem, the host did not connect to the server, because my vps ipv4 is private, so, i used a no-ip to connect host > server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants