Giter VIP home page Giter VIP logo

Comments (16)

mscdex avatar mscdex commented on June 26, 2024

Ok, I've added a secureOptions config option to allow passing additional options to tls.connect(), so give the master branch a try please.

from node-ftp.

Subash avatar Subash commented on June 26, 2024

Ok, I will try and let you know :)

from node-ftp.

Subash avatar Subash commented on June 26, 2024

@mscdex I tried the latest master but I am not sure it is working as expected.
Sorry but my question is how to catch that error and prevent node from crashing ?/

from node-ftp.

Subash avatar Subash commented on June 26, 2024

@mscdex Hmm the error can be removed by allowing unauthorized connections with secureOptions but is there a way to disallow unauthorized connections and catch the certificate error ??

from node-ftp.

Subash avatar Subash commented on June 26, 2024

What about tlsOptions rather than secureOptions.

from node-ftp.

mscdex avatar mscdex commented on June 26, 2024

The inability to catch tls errors should be fixed in master now.

RE: tlsOptions vs secureOptions. I was tempted to do this at first, but then that would require changing secure to tls too in order to maintain consistency. I'm not sure if it's worth the backwards incompatibility for just this.

from node-ftp.

Subash avatar Subash commented on June 26, 2024

@mscdex Thank you very much for your help. I think everything is good now :)

Completely different topic :
I sometime get this error as well. This error is very random and happens frequently on slow networks.

Error: read ECONNRESET
    at errnoException (net.js:901:11)
    at TCP.onread (net.js:556:19)

from node-ftp.

mscdex avatar mscdex commented on June 26, 2024

You mean the error isn't emitted via the 'error' event or ?

from node-ftp.

Subash avatar Subash commented on June 26, 2024

Yes, It isn't caught by the handler so bubles and crashes the process.

from node-ftp.

Subash avatar Subash commented on June 26, 2024

Actually there are two ECONNRESET errors one is caught but another just bubles up.

from node-ftp.

Subash avatar Subash commented on June 26, 2024

You can see bellow that ECONNRESET bubled right after the certificate error.

Error: Hostname/IP doesn't match certificate's altnames
    at SecurePair.<anonymous> (tls.js:1355:23)
    at SecurePair.EventEmitter.emit (events.js:92:17)
    at SecurePair.maybeInitFinished (tls.js:959:10)
    at CleartextStream.read [as _read] (tls.js:463:15)
    at CleartextStream.Readable.read (_stream_readable.js:320:10)
    at EncryptedStream.write [as _write] (tls.js:366:25)
    at doWrite (_stream_writable.js:219:10)
    at writeOrBuffer (_stream_writable.js:209:5)
    at EncryptedStream.Writable.write (_stream_writable.js:180:11)
    at Socket.ondata (stream.js:51:26)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:736:14)
    at Socket.EventEmitter.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:408:10)
    at emitReadable (_stream_readable.js:404:5)
    at readableAddChunk (_stream_readable.js:165:9)
    at Socket.Readable.push (_stream_readable.js:127:10)
    at TCP.onread (net.js:526:21) exceptionHandler.js:28
(anonymous function) exceptionHandler.js:28
Error: read ECONNRESET
    at errnoException (net.js:901:11)
    at TCP.onread (net.js:556:19)

from node-ftp.

Subash avatar Subash commented on June 26, 2024

Also can you give me our twitter username ? I would like to follow you :)

from node-ftp.

mscdex avatar mscdex commented on June 26, 2024

Try applying this patch on top of master and let me know if that fixes things.

RE: Twitter, sorry, I don't use it :-)

from node-ftp.

Subash avatar Subash commented on June 26, 2024

Ok I will try and let you know :)

from node-ftp.

mscdex avatar mscdex commented on June 26, 2024

Any luck with the patch?

from node-ftp.

Subash avatar Subash commented on June 26, 2024

@mscdex Yes, I am using that and seems to work well.

from node-ftp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.