-
-
Notifications
You must be signed in to change notification settings - Fork 69
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 while executing the command "node node_modules/gmail-tester/init.js credentials.json token.json [email protected]" #126
Comments
Looks like you're running a server on port 80. Try stopping it while running init.js. |
I'm having a similar issue, but my port is not already in use, i have just node:events:491
throw er; // Unhandled 'error' event
^
Error: listen EACCES: permission denied 0.0.0.0:80
at Server.setupListenHandle [as _listen2] (node:net:1716:21)
at listenInCluster (node:net:1781:12)
at Server.listen (node:net:1869:7)
at /home/chra/Dev/shop/sw6/node_modules/gmail-tester/libs/oauth2.js:60:10
at new Promise (<anonymous>)
at authenticate (/home/chra/Dev/shop/sw6/node_modules/gmail-tester/libs/oauth2.js:36:10)
at get_new_token (/home/chra/Dev/shop/sw6/node_modules/gmail-tester/gmail.js:47:10)
at Object.authorize (/home/chra/Dev/shop/sw6/node_modules/gmail-tester/gmail.js:30:35)
at _get_recent_email (/home/chra/Dev/shop/sw6/node_modules/gmail-tester/gmail-tester.js:38:36)
at __check_inbox (/home/chra/Dev/shop/sw6/node_modules/gmail-tester/gmail-tester.js:108:28)
Emitted 'error' event on Server instance at:
at emitErrorNT (node:net:1760:8)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'EACCES',
errno: -13,
syscall: 'listen',
address: '0.0.0.0',
port: 80
}
Node.js v18.13.0 Simply can be fixed when executing the |
I am facing similar issue where it doesn't ask me to enter the code, however I am not seeing any errors. Initially I set up this on a laptop and I got a new laptop, then setup all the required tools on my new laptop it doesn't ask me to enter the code on my new laptop. cypress - 10.11.0 Could someone please help me here |
I was able to figure this out, by removing this "urn:ietf:wg:oauth:2.0:oob" value from redirect_uris array from my credentials.json file and only have "http://localhost", then try generating the token. With this there will not be the step to paste the token from the browser to terminal, instead once the command for token generation is ran there will be a message "gmail Found" and gmail_token.json file (or whatever the filename is put while token generation) is generated. |
Running something on port 80 usually requires root level access, so you can either run it with
(Once gmail-tester generates a local token file, Credits to this StackOverflow answer. |
I am trying to use gmail-tester, I have downloaded the credentials.json following the steps indicated in the documentation, but when I run the command, the tokenjson is not created and the error comes out:
[gmail] Checking for message from '', to: [email protected], contains '' in subject...
Authorize this app by visiting this url: https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.readonly&response_type=code&client_id={clientId}&redirect_uri=http%3A%2F%2Flocalhost
node:events:491
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE: address already in use :::80
at Server.setupListenHandle [as _listen2] (node:net:1485:16)
at listenInCluster (node:net:1533:12)
at Server.listen (node:net:1621:7)
at /Users/{user}//Documents/POC Cypress/node_modules/gmail-tester/libs/oauth2.js:60:10
at new Promise ()
at authenticate (/Users/{user}/Documents/POC Cypress/node_modules/gmail-tester/libs/oauth2.js:36:10)
at get_new_token (/Users/{user}/Documents/POC Cypress/node_modules/gmail-tester/gmail.js:47:10)
at Object.authorize (/Users/{user}/Documents/POC Cypress/node_modules/gmail-tester/gmail.js:30:35)
at _get_recent_email (/Users/{user}/Documents/POC Cypress/node_modules/gmail-tester/gmail-tester.js:38:36)
at __check_inbox (/Users/{user}/Documents/POC Cypress/node_modules/gmail-tester/gmail-tester.js:108:28)
Emitted 'error' event on Server instance at:
at emitErrorNT (node:net:1512:8)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'EADDRINUSE',
errno: -48,
syscall: 'listen',
address: '::',
port: 80
}
never asks to enter the code, the url takes me to the code site, but it does not leave where to put it, credentials.json file are located in cypress root folder, cypress version 12.4.1.
Can anyone help me what I’m doing wrong?
thank you.
The text was updated successfully, but these errors were encountered: