xpepermint / smtp-client

Simple, promisified, protocol-based SMTP client for Node.js.
36 stars 13 forks source link

TypeError: Cannot read property 'removeListener' of null #4

Closed thevirajshelke closed 4 years ago

thevirajshelke commented 5 years ago

I am getting the following error while trying to run the code for multiple domains back to back

/home/thevirajshelke/email-utility-server/node_modules/smtp-channel/src/index.js:244
      this._socket.removeListener('error', onError);
                   ^

TypeError: Cannot read property 'removeListener' of null
    at Socket.onClose (/home/thevirajshelke/email-utility-server/node_modules/smtp-channel/src/index.js:244:20)
    at Object.onceWrapper (events.js:291:20)
    at Socket.emit (events.js:208:15)
    at TCP.<anonymous> (net.js:588:12)

Any solution or insights?

thevirajshelke commented 5 years ago

I have found the same issue on smtp-channel github issue #2

thevirajshelke commented 5 years ago

I think this was fixed on the smtp-channel codebase by Pull Request #3

I have installed smtp-client and in the node modules under smtp-channel I cannot see the PR's code. Can anyone confirm? I think the issue is fixed on the smtp-channel but it's not present under the smtp-client's code base

thevirajshelke commented 5 years ago

I have manually added the PR's changes into my node modules file and works fine for me. So this bug seems to be fixed. Just that while doing an npm install the code is not having the PR's changes. @xpepermint can you please check this and fix it?

Thanks in advance :+1:

leftshift commented 4 years ago

Just ran into the same issue, @xpepermint could you push a new release including these changes to npm? Thanks!

leftshift commented 4 years ago

This was fixed in the released version 0.2.3 of smtp-channel published three months ago. Unfortunately, this has not been updated in smpt-client's package.json.

I've fixed that along with some other problems in #5.

thevirajshelke commented 4 years ago

@xpepermint is it fixed? I couldn't see any new commits. Also, @leftshift good job with PR #5 but your PR seems to fail can you please check and do the necessary changes? Thanks!

xpepermint commented 4 years ago

@thevirajshelke waiting for the PR to be fixed, then I'm merging.

thevirajshelke commented 4 years ago

Okay. thanks a lot, @xpepermint :-) :+1: