josephrcox / easy-reddit-downloader

Simple headless Reddit post downloader
MIT License
70 stars 9 forks source link

ECONRESET and AXIOSErrorCall (?) issues. #66

Closed NoExplorer closed 1 year ago

NoExplorer commented 1 year ago

Edit (2023-02-13 22:47 EEST): Closed this, look at comment below. TL;DR , not a really bad bug. Easily fixable by re-running the program.

=========

Edit: Not a real bug. Probably broken build. When running a more trusty build though I got a different ECONRESET error (I think, might be a less-detailed error of everything below):

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error: aborted
    at connResetException (node:internal/errors:718:14)
    at TLSSocket.socketCloseListener (node:_http_client:456:19)
    at TLSSocket.emit (node:events:525:35)
    at node:net:320:12
    at TCP.done (node:_tls_wrap:588:7) {
  code: 'ECONNRESET'
}

Edit 2:Re-running the app seems to download everything, weird. Might just be my internet connection.

===========

I'm back. Guess I'm gonna be the bugtester for this and by complete accident. Anyways, I added a few more links to my download_posts_list file and began downloading them. I also had enabled the detailed logs option in the user_config file in case I found anything new with that happens with videos having no audio. But I got more issues.

About the ECONRESET: Possibly a connection error with my end. Just took a quick and dirty look online.

About the AXIOSErrorCall: I know nothing about this, here's the exit info:

G:\Archival Job 14-01-23\easy-reddit-downloader_20230210-main\node_modules\axios\dist\node\axios.cjs:785
  AxiosError.call(axiosError, error.message, code, config, request, response);
             ^
AxiosError: connect ETIMEDOUT 151.101.65.140:443
    at AxiosError.from (G:\Archival Job 14-01-23\easy-reddit-downloader_20230210-main\node_modules\axios\dist\node\axios.cjs:785:14)
    at RedirectableRequest.handleRequestError (G:\Archival Job 14-01-23\easy-reddit-downloader_20230210-main\node_modules\axios\dist\node\axios.cjs:2733:25)
    at RedirectableRequest.emit (node:events:513:28)
    at eventHandlers.<computed> (G:\Archival Job 14-01-23\easy-reddit-downloader_20230210-main\node_modules\follow-redirects\index.js:14:24)
    at ClientRequest.emit (node:events:513:28)
    at TLSSocket.socketErrorListener (node:_http_client:496:9)
    at TLSSocket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  port: 443,
  address: '151.101.65.140',
  syscall: 'connect',
  code: 'ETIMEDOUT',
  errno: -4039,
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [ 'xhr', 'http' ],
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    env: {
      FormData: [Function: FormData] {
        LINE_BREAK: '\r\n',
        DEFAULT_CONTENT_TYPE: 'application/octet-stream'
      },
      Blob: [class Blob]
    },
    validateStatus: [Function: validateStatus],
    headers: AxiosHeaders {
      Accept: 'application/json, text/plain, */*',
      'User-Agent': 'axios/1.2.1',
      'Accept-Encoding': 'gzip, compress, deflate, br'
    },
    method: 'get',
    url: '[link]',
    data: undefined
  },
  request: <ref *3> Writable {
    _writableState: WritableState {
      objectMode: false,
      highWaterMark: 16384,
      finalCalled: false,
      needDrain: false,
      ending: false,
      ended: false,
      finished: false,
      destroyed: false,
      decodeStrings: true,
      defaultEncoding: 'utf8',
      length: 0,
      writing: false,
      corked: 0,
      sync: true,
      bufferProcessing: false,
      onwrite: [Function: bound onwrite],
      writecb: null,
      writelen: 0,
      afterWriteTickInfo: null,
      buffered: [],
      bufferedIndex: 0,
      allBuffers: true,
      allNoop: true,
      pendingcb: 0,
      constructed: true,
      prefinished: false,
      errorEmitted: false,
      emitClose: true,
      autoDestroy: true,
      errored: null,
      closed: false,
      closeEmitted: false,
      [Symbol(kOnFinished)]: []
    },
    _events: [Object: null prototype] {
      response: [Function: handleResponse],
      error: [Function: handleRequestError],
      socket: [Function: handleRequestSocket]
    },
    _eventsCount: 3,
    _maxListeners: undefined,
    _options: {
      maxRedirects: 21,
      maxBodyLength: Infinity,
      protocol: 'https:',
      path: '[subreddit and post]',
      method: 'GET',
      headers: [Object: null prototype] {
        Accept: 'application/json, text/plain, */*',
        'User-Agent': 'axios/1.2.1',
        'Accept-Encoding': 'gzip, compress, deflate, br'
      },
      agents: { http: undefined, https: undefined },
      auth: undefined,
      beforeRedirect: [Function: dispatchBeforeRedirect],
      beforeRedirects: { proxy: [Function: beforeRedirect] },
      hostname: 'www.reddit.com',
      port: '',
      agent: undefined,
      nativeProtocols: {
        'http:': {
          _connectionListener: [Function: connectionListener],
          METHODS: [
            'ACL',         'BIND',       'CHECKOUT',
            'CONNECT',     'COPY',       'DELETE',
            'GET',         'HEAD',       'LINK',
            'LOCK',        'M-SEARCH',   'MERGE',
            'MKACTIVITY',  'MKCALENDAR', 'MKCOL',
            'MOVE',        'NOTIFY',     'OPTIONS',
            'PATCH',       'POST',       'PROPFIND',
            'PROPPATCH',   'PURGE',      'PUT',
            'REBIND',      'REPORT',     'SEARCH',
            'SOURCE',      'SUBSCRIBE',  'TRACE',
            'UNBIND',      'UNLINK',     'UNLOCK',
            'UNSUBSCRIBE'
          ],
          STATUS_CODES: {
            '100': 'Continue',
            '101': 'Switching Protocols',
            '102': 'Processing',
            '103': 'Early Hints',
            '200': 'OK',
            '201': 'Created',
            '202': 'Accepted',
            '203': 'Non-Authoritative Information',
            '204': 'No Content',
            '205': 'Reset Content',
            '206': 'Partial Content',
            '207': 'Multi-Status',
            '208': 'Already Reported',
            '226': 'IM Used',
            '300': 'Multiple Choices',
            '301': 'Moved Permanently',
            '302': 'Found',
            '303': 'See Other',
            '304': 'Not Modified',
            '305': 'Use Proxy',
            '307': 'Temporary Redirect',
            '308': 'Permanent Redirect',
            '400': 'Bad Request',
            '401': 'Unauthorized',
            '402': 'Payment Required',
            '403': 'Forbidden',
            '404': 'Not Found',
            '405': 'Method Not Allowed',
            '406': 'Not Acceptable',
            '407': 'Proxy Authentication Required',
            '408': 'Request Timeout',
            '409': 'Conflict',
            '410': 'Gone',
            '411': 'Length Required',
            '412': 'Precondition Failed',
            '413': 'Payload Too Large',
            '414': 'URI Too Long',
            '415': 'Unsupported Media Type',
            '416': 'Range Not Satisfiable',
            '417': 'Expectation Failed',
            '418': "I'm a Teapot",
            '421': 'Misdirected Request',
            '422': 'Unprocessable Entity',
            '423': 'Locked',
            '424': 'Failed Dependency',
            '425': 'Too Early',
            '426': 'Upgrade Required',
            '428': 'Precondition Required',
            '429': 'Too Many Requests',
            '431': 'Request Header Fields Too Large',
            '451': 'Unavailable For Legal Reasons',
            '500': 'Internal Server Error',
            '501': 'Not Implemented',
            '502': 'Bad Gateway',
            '503': 'Service Unavailable',
            '504': 'Gateway Timeout',
            '505': 'HTTP Version Not Supported',
            '506': 'Variant Also Negotiates',
            '507': 'Insufficient Storage',
            '508': 'Loop Detected',
            '509': 'Bandwidth Limit Exceeded',
            '510': 'Not Extended',
            '511': 'Network Authentication Required'
          },
          Agent: [Function: Agent] { defaultMaxSockets: Infinity },
          ClientRequest: [Function: ClientRequest],
          IncomingMessage: [Function: IncomingMessage],
          OutgoingMessage: [Function: OutgoingMessage],
          Server: [Function: Server],
          ServerResponse: [Function: ServerResponse],
          createServer: [Function: createServer],
          validateHeaderName: [Function: __node_internal_],
          validateHeaderValue: [Function: __node_internal_],
          get: [Function: get],
          request: [Function: request],
          setMaxIdleHTTPParsers: [Function: setMaxIdleHTTPParsers],
          maxHeaderSize: [Getter],
          globalAgent: [Getter/Setter]
        },
        'https:': {
          Agent: [Function: Agent],
          globalAgent: Agent {
            _events: [Object: null prototype],
            _eventsCount: 2,
            _maxListeners: undefined,
            defaultPort: 443,
            protocol: 'https:',
            options: [Object: null prototype],
            requests: [Object: null prototype] {},
            sockets: [Object: null prototype],
            freeSockets: [Object: null prototype] {},
            keepAliveMsecs: 1000,
            keepAlive: false,
            maxSockets: Infinity,
            maxFreeSockets: 256,
            scheduling: 'lifo',
            maxTotalSockets: Infinity,
            totalSocketCount: 197,
            maxCachedSessions: 100,
            _sessionCache: [Object],
            [Symbol(kCapture)]: false
          },
          Server: [Function: Server],
          createServer: [Function: createServer],
          get: [Function: get],
          request: [Function: request]
        }
      },
      pathname: '[subreddit and post]'
    },
    _ended: true,
    _ending: true,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 0,
    _requestBodyBuffers: [],
    _onNativeResponse: [Function (anonymous)],
    _currentRequest: <ref *1> ClientRequest {
      _events: [Object: null prototype] {
        response: [Function: bound onceWrapper] {
          listener: [Function (anonymous)]
        },
        abort: [Function (anonymous)],
        aborted: [Function (anonymous)],
        connect: [Function (anonymous)],
        error: [Function (anonymous)],
        socket: [Function (anonymous)],
        timeout: [Function (anonymous)]
      },
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: false,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      strictContentLength: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: false,
      socket: <ref *2> TLSSocket {
        _tlsOptions: {
          allowHalfOpen: undefined,
          pipe: false,
          secureContext: SecureContext { context: SecureContext {} },
          isServer: false,
          requestCert: true,
          rejectUnauthorized: true,
          session: undefined,
          ALPNProtocols: undefined,
          requestOCSP: undefined,
          enableTrace: undefined,
          pskCallback: undefined,
          highWaterMark: undefined,
          onread: undefined,
          signal: undefined
        },
        _secureEstablished: false,
        _securePending: false,
        _newSessionPending: false,
        _controlReleased: true,
        secureConnecting: true,
        _SNICallback: null,
        servername: null,
        alpnProtocol: null,
        authorized: false,
        authorizationError: null,
        encrypted: true,
        _events: [Object: null prototype] {
          close: [
            [Function: onSocketCloseDestroySSL],
            [Function],
            [Function: onClose],
            [Function: socketCloseListener]
          ],
          end: [ [Function: onConnectEnd], [Function: onReadableStreamEnd] ],
          newListener: [Function: keylogNewListener],
          connect: [ [Function], [Function], [Function] ],
          secure: [Function: onConnectSecure],
          session: [Function (anonymous)],
          free: [Function: onFree],
          timeout: [Function: onTimeout],
          agentRemove: [Function: onRemove],
          error: [Function: socketErrorListener],
          drain: [Function: ondrain]
        },
        _eventsCount: 11,
        connecting: false,
        _hadError: true,
        _parent: null,
        _host: 'www.reddit.com',
        _closeAfterHandlingError: false,
        _readableState: ReadableState {
          objectMode: false,
          highWaterMark: 16384,
          buffer: BufferList { head: null, tail: null, length: 0 },
          length: 0,
          pipes: [],
          flowing: true,
          ended: false,
          endEmitted: false,
          reading: true,
          constructed: true,
          sync: false,
          needReadable: true,
          emittedReadable: false,
          readableListening: false,
          resumeScheduled: false,
          errorEmitted: true,
          emitClose: false,
          autoDestroy: true,
          destroyed: true,
          errored: Error: connect ETIMEDOUT 151.101.65.140:443
              at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1487:16) {
            errno: -4039,
            code: 'ETIMEDOUT',
            syscall: 'connect',
            address: '151.101.65.140',
            port: 443
          },
          closed: true,
          closeEmitted: true,
          defaultEncoding: 'utf8',
          awaitDrainWriters: null,
          multiAwaitDrain: false,
          readingMore: false,
          dataEmitted: false,
          decoder: null,
          encoding: null,
          [Symbol(kPaused)]: false
        },
        _maxListeners: undefined,
        _writableState: WritableState {
          objectMode: false,
          highWaterMark: 16384,
          finalCalled: false,
          needDrain: false,
          ending: false,
          ended: false,
          finished: false,
          destroyed: true,
          decodeStrings: false,
          defaultEncoding: 'utf8',
          length: 215,
          writing: true,
          corked: 0,
          sync: false,
          bufferProcessing: false,
          onwrite: [Function: bound onwrite],
          writecb: [Function: bound onFinish],
          writelen: 215,
          afterWriteTickInfo: null,
          buffered: [],
          bufferedIndex: 0,
          allBuffers: true,
          allNoop: true,
          pendingcb: 1,
          constructed: true,
          prefinished: false,
          errorEmitted: true,
          emitClose: false,
          autoDestroy: true,
          errored: Error: connect ETIMEDOUT 151.101.65.140:443
              at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1487:16) {
            errno: -4039,
            code: 'ETIMEDOUT',
            syscall: 'connect',
            address: '151.101.65.140',
            port: 443
          },
          closed: true,
          closeEmitted: true,
          [Symbol(kOnFinished)]: []
        },
        allowHalfOpen: false,
        _sockname: null,
        _pendingData: 'GET [subreddit and post] HTTP/1.1\r\n' +
          'Accept: application/json, text/plain, */*\r\n' +
          'User-Agent: axios/1.2.1\r\n' +
          'Accept-Encoding: gzip, compress, deflate, br\r\n' +
          'Host: www.reddit.com\r\n' +
          'Connection: close\r\n' +
          '\r\n',
        _pendingEncoding: 'latin1',
        server: undefined,
        _server: null,
        ssl: null,
        _requestCert: true,
        _rejectUnauthorized: true,
        parser: null,
        _httpMessage: [Circular *1],
        [Symbol(res)]: TLSWrap {
          _parent: TCP {
            reading: [Getter/Setter],
            onconnection: null,
            [Symbol(owner_symbol)]: [Circular *2],
            [Symbol(handle_onclose)]: [Function: done]
          },
          _parentWrap: undefined,
          _secureContext: SecureContext { context: SecureContext {} },
          reading: false,
          onkeylog: [Function: onkeylog],
          onhandshakestart: {},
          onhandshakedone: [Function (anonymous)],
          onocspresponse: [Function: onocspresponse],
          onnewsession: [Function: onnewsessionclient],
          onerror: [Function: onerror],
          [Symbol(owner_symbol)]: [Circular *2]
        },
        [Symbol(verified)]: false,
        [Symbol(pendingSession)]: null,
        [Symbol(async_id_symbol)]: 924,
        [Symbol(kHandle)]: null,
        [Symbol(lastWriteQueueSize)]: 0,
        [Symbol(timeout)]: null,
        [Symbol(kBuffer)]: null,
        [Symbol(kBufferCb)]: null,
        [Symbol(kBufferGen)]: null,
        [Symbol(kCapture)]: false,
        [Symbol(kSetNoDelay)]: false,
        [Symbol(kSetKeepAlive)]: true,
        [Symbol(kSetKeepAliveInitialDelay)]: 60,
        [Symbol(kBytesRead)]: 0,
        [Symbol(kBytesWritten)]: 0,
        [Symbol(connect-options)]: {
          rejectUnauthorized: true,
          ciphers: 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA',
          checkServerIdentity: [Function: checkServerIdentity],
          minDHSize: 1024,
          maxRedirects: 21,
          maxBodyLength: Infinity,
          protocol: 'https:',
          path: null,
          method: 'GET',
          headers: [Object: null prototype] {
            Accept: 'application/json, text/plain, */*',
            'User-Agent': 'axios/1.2.1',
            'Accept-Encoding': 'gzip, compress, deflate, br'
          },
          agents: { http: undefined, https: undefined },
          auth: undefined,
          beforeRedirect: [Function: dispatchBeforeRedirect],
          beforeRedirects: { proxy: [Function: beforeRedirect] },
          hostname: 'www.reddit.com',
          port: 443,
          agent: undefined,
          nativeProtocols: { 'http:': [Object], 'https:': [Object] },
          pathname: '[subreddit and post]',
          _defaultAgent: Agent {
            _events: [Object: null prototype],
            _eventsCount: 2,
            _maxListeners: undefined,
            defaultPort: 443,
            protocol: 'https:',
            options: [Object: null prototype],
            requests: [Object: null prototype] {},
            sockets: [Object: null prototype],
            freeSockets: [Object: null prototype] {},
            keepAliveMsecs: 1000,
            keepAlive: false,
            maxSockets: Infinity,
            maxFreeSockets: 256,
            scheduling: 'lifo',
            maxTotalSockets: Infinity,
            totalSocketCount: 197,
            maxCachedSessions: 100,
            _sessionCache: [Object],
            [Symbol(kCapture)]: false
          },
          host: 'www.reddit.com',
          noDelay: true,
          servername: 'www.reddit.com',
          _agentKey: 'www.reddit.com:443:::::::::::::::::::::',
          encoding: null,
          singleUse: true
        }
      },
      _header: 'GET [link] HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'User-Agent: axios/1.2.1\r\n' +
        'Accept-Encoding: gzip, compress, deflate, br\r\n' +
        'Host: www.reddit.com\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: Agent {
        _events: [Object: null prototype] {
          free: [Function (anonymous)],
          newListener: [Function: maybeEnableKeylog]
        },
        _eventsCount: 2,
        _maxListeners: undefined,
        defaultPort: 443,
        protocol: 'https:',
        options: [Object: null prototype] { noDelay: true, path: null },
        requests: [Object: null prototype] {},
        sockets: [Object: null prototype] {
          'www.reddit.com:443:::::::::::::::::::::': [
            [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket],
            [TLSSocket]
          ],
          'i.redd.it:443:::::::::::::::::::::': [
            [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket], [TLSSocket],
            ... 46 more items
          ],
          'v.redd.it:443:::::::::::::::::::::': [
            [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket],
            [TLSSocket]
          ],
          'i.imgur.com:443:::::::::::::::::::::': [
            [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket],
            [TLSSocket], [TLSSocket]
          ],
          'pbs.twimg.com:443:::::::::::::::::::::': [ [TLSSocket] ]
        },
        freeSockets: [Object: null prototype] {},
        keepAliveMsecs: 1000,
        keepAlive: false,
        maxSockets: Infinity,
        maxFreeSockets: 256,
        scheduling: 'lifo',
        maxTotalSockets: Infinity,
        totalSocketCount: 197,
        maxCachedSessions: 100,
        _sessionCache: {
          map: {
            'api.github.com:443:::::::::::::::::::::': [Buffer [Uint8Array]],
            'www.reddit.com:443:::::::::::::::::::::': [Buffer [Uint8Array]],
            'imgur.com:443:::::::::::::::::::::': [Buffer [Uint8Array]],
            'pbs.twimg.com:443:::::::::::::::::::::': [Buffer [Uint8Array]]
          },
          list: [
            'api.github.com:443:::::::::::::::::::::',
            'www.reddit.com:443:::::::::::::::::::::',
            'imgur.com:443:::::::::::::::::::::',
            'pbs.twimg.com:443:::::::::::::::::::::'
          ]
        },
        [Symbol(kCapture)]: false
      },
      socketPath: undefined,
      method: 'GET',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '[subreddit and post]',
      _ended: false,
      res: null,
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'www.reddit.com',
      protocol: 'https:',
      _redirectable: [Circular *3],
      [Symbol(kCapture)]: false,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(kEndCalled)]: true,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype] {
        accept: [ 'Accept', 'application/json, text/plain, */*' ],
        'user-agent': [ 'User-Agent', 'axios/1.2.1' ],
        'accept-encoding': [ 'Accept-Encoding', 'gzip, compress, deflate, br' ],
        host: [ 'Host', 'www.reddit.com' ]
      },
      [Symbol(errored)]: null,
      [Symbol(kUniqueHeaders)]: null
    },
    _currentUrl: 'link',
    [Symbol(kCapture)]: false
  },
  cause: Error: connect ETIMEDOUT 151.101.65.140:443
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1487:16) {
    errno: -4039,
    code: 'ETIMEDOUT',
    syscall: 'connect',
    address: '151.101.65.140',
    port: 443
  }
}

Node.js v18.13.0

Might have to do with imgur, not sure. Could be a broken build that I might be running. I'll keep testing. No issue with accidentally finding bugs and reporting them, I contribute something at least. I'll see what the logs hold when I try downloading a video post too and report back at #65 with any info.

NoExplorer commented 1 year ago

Closing this; doesn't appear to be a really bad issue. It does happen somewhat frequently. High possibility that it is my internet. Test if you have time or if this is something new, but I do not think its annoying because re-running the program doesn't seem to exit with ECONNRESET or AXIOSError.Call and everything is downloaded fine. You could delete this if you want, just a small info thing from my end.

Seems to only be caused when downloading with the download_posts_list method.

=====

Edit (2023-02-13 23:17 EEST): Make sure to enable the redownload_posts function in user_config. Else the data that didn't get transferred correctly due to a connection issue won't be redownloaded! Or just, delete the downloaded stuff from the folder and restart.

josephrcox commented 1 year ago

Interesting. Thanks for finding this and investigating!

The download_posts_list feature was honestly half baked and I think it just needs some refinements haha 😂

I will look into making misc improvements soon that should fix issues like this.

NoExplorer commented 1 year ago

Honestly it does work, and these small issues aren't that problematic. I'll be awaiting the improvements!

NoExplorer commented 1 year ago

It doesn't seem to be an error from the feature, its my unstable internet connection. False alarm, sorry! I kept testing it today and it works normally without errors, even with the detailed_logs option enabled.