Unable to connect to Gmail
See original GitHub issueUpon imap.connect()
I get:
Uncaught Error: self signed certificate
...
code: 'DEPTH_ZERO_SELF_SIGNED_CERT',
source: 'socket',
domainEmitter: Connection {
_events: [Object: null prototype] { ready: [Function], end: [Function] },
_eventsCount: 2,
_maxListeners: undefined,
_config: {
localAddress: undefined,
socket: undefined,
socketTimeout: 0,
host: 'imap.gmail.com',
port: 993,
tls: true,
tlsOptions: undefined,
autotls: undefined,
user: <my gmail id>,
password: <my google app password>,
xoauth: undefined,
xoauth2: <my access token>,
connTimeout: 10000,
authTimeout: 5000,
keepalive: true
},
...
My IMAP is enabled; I have 2FA; I tried an App Password only (didn’t work); I tried adding the xoauth2
token.
Anyone can help? Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Can't sign in to your Google Account
If you can't sign in to your Google Account in Gmail, Google Drive, Google Play, or elsewhere, select the issue that most closely...
Read more >Gmail Won't Load? How to Fix It - Lifewire
Restart the computer. · Make sure the browser works with Gmail. · Use another browser or device. · Check the browser extensions or...
Read more >Fix problems connecting your Google account to the Microsoft ...
Step 1: Enable IMAP · In a browser, go to Gmail.com. · Select Settings > Settings. · Select the Forwarding and POP/IMAP tab....
Read more >Is Gmail not working? Try these fixes! - Android Authority
Is Gmail down? · Close and reopen Gmail · Make sure Sync Gmail is on · Check for updates · Restart the device...
Read more >Common Gmail Problems and How to Solve Them - Mailbird
Update the Gmail app: Sometimes an older, outdated version of the app can have trouble getting mail from Google. Making sure you have...
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
For everyone who still gets this error, you need to add
tlsOptions: {servername: "<imap server/host parameter>"}
to theImap()
object.This solved the issue for me: https://stackoverflow.com/a/60126034/1166371
Add
tlsOptions: { rejectUnauthorized: false }