Comments (7)
I was able to catch it! I don't know why the first time i couldn't see it! but the catch on the pop3().connect works!
Sorry to have bothered you guys and thanks for the answers!
Don't know if it is in fact the frequency the problem, but today it hasn't given me any activity problem since now!
Anyway, thanks again :)
I think we can close this issue 👍
from node-pop3.
Ok, this time I really got the problem!
It was the fact that after I caught the error, I wasn't QUITting the POP3 session.
It took me 2 months figuring it out, but finally, I got it. Hope this will be helpful to others :)
from node-pop3.
@lianxh do you know about this?
from node-pop3.
Also, i don't know if this is related to the frequency of the polling, but sometimes it stucks on AUTH error and keeps on for every call to pop3, and then the "Disconnected for inactivity message"
` Error: [AUTH] Authentication failed.
at Socket. (/Users/.../src/server/node_modules/node-pop3/lib/Connection.js:176:24)
at Socket.emit (events.js:315:20)
at Socket.EventEmitter.emit (domain.js:467:12)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at Socket.Readable.push (internal/streams/readable.js:223:10)
at TCP.onStreamRead (internal/stream_base_commons.js:188:23) {
eventName: 'error',
command: 'PASS password'
}
events.js:292
throw er; // Unhandled 'error' event
^
Error: Disconnected for inactivity.
...`
from node-pop3.
@tyzion it seems that the pop3 server has rejected your frequent requests. Maybe you should reduce the frequency of requests.
from node-pop3.
I think i tried that, but I don't remember, i'll try again
@lianxh In the meantime can i ask you if you know how to handle this kind of error?
Here's my code:
const DELAY = 60000;
async function run(){
try{
const pop3 = new Pop3Command({host: process.env.HOST});
// this is how I tried to catch the unhandled event, but didn't give me any result
await pop3.connect().catch(err => console.log('this is an err: ', err));
await pop3.command('USER', process.env.POP3_USER);
await pop3.command('PASS', process.env.POP3_PASS);
}
const [quitInfo, stream] = await pop3.command('QUIT')
console.log(quitInfo)
setTimeout(run, DELAY)
} catch(err) {
console.log('\n\n\n', err)
setTimeout(run, DELAY)
}
};
setTimeout(run, DELAY);
from node-pop3.
Hi, sorry to bother you again
I stopped working on my project for a while. I thought I was through with this problem, but I was wrong, I hadn't caught anything, I just consolled it.
Once I came back to my project I got the same error, no matter how frequent the poll was.
I tried to debug your project a little, but couldn't get anywhere.
What's different from before now is that now it gets disconnected not on the connect commands, but on the others.
@lianxh if you could help me again with this issue, that would be very much appreciated, thanks :)
from node-pop3.
Related Issues (14)
- Can't use require in Node, only import? HOT 3
- Not compatible with AWS Lambda HOT 2
- Retrieving attachments HOT 4
- LIST returns 265 messages HOT 2
- Unhandled 'error' event HOT 2
- Created TypeScript type definitions. HOT 2
- Text As HTML do not cast spaces of received mail into HTML format HOT 2
- Timeout issue in TOP/RETR commands. HOT 3
- ERR Command is not valid in this state HOT 8
- Documentation requests HOT 1
- Error upon QUIT HOT 2
- Error on `master` HOT 1
- Browser version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-pop3.