suryavaddiraju / irctc-api

A NodeJS only package built on top of IRCTC Website APIs to book train tickets, managing user profile faster and simpler.
https://dev.vaddiraju.in/irctc-api/
Apache License 2.0
7 stars 2 forks source link

I started after 10.57AM , Script Exit Issue #19

Closed siddhu2310 closed 2 months ago

siddhu2310 commented 2 months ago

Terminal out put

          protocol: 'https:',
          options: [Object: null prototype] {
            keepAlive: true,
            scheduling: 'lifo',
            timeout: 5000,
            noDelay: true,
            path: null
          },
          requests: [Object: null prototype] {},
          sockets: [Object: null prototype] {},
          freeSockets: [Object: null prototype] {},
          keepAliveMsecs: 1000,
          keepAlive: true,
          maxSockets: Infinity,
          maxFreeSockets: 256,
          scheduling: 'lifo',
          maxTotalSockets: Infinity,
          totalSocketCount: 0,
          maxCachedSessions: 100,
          _sessionCache: { map: {}, list: [] },
          [Symbol(shapeMode)]: false,
          [Symbol(kCapture)]: false
        },
        host: 'www.irctc.co.in',
        cookies: {
          jar: CookieJar {
            rejectPublicSuffixes: true,
            enableLooseMode: false,
            allowSpecialUseDomain: true,
            store: [MemoryCookieStore],
            prefixSecurity: 'silent',
            _cloneSync: [Function (anonymous)],
            _importCookiesSync: [Function (anonymous)],
            getCookiesSync: [Function (anonymous)],
            getCookieStringSync: [Function (anonymous)],
            getSetCookieStringsSync: [Function (anonymous)],
            removeAllCookiesSync: [Function (anonymous)],
            setCookieSync: [Function (anonymous)],
            serializeSync: [Function (anonymous)]
          }
        },
        noDelay: true,
        servername: 'www.irctc.co.in',
        _agentKey: 'www.irctc.co.in:443:::::::::::::::::::::',
        encoding: null,
        singleUse: true
      }
    },
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      accept: [ 'Accept', 'application/json, text/plain, */*' ],
      'content-type': [ 'Content-Type', 'application/json; charset=UTF-8' ],
      'accept-encoding': [ 'Accept-Encoding', 'gzip, deflate, br, zstd' ],
      'accept-language': [ 'Accept-Language', 'en-US,en;q=0.0' ],
      authorization: [
        'Authorization',
        'Bearer b3010a7f-c39c-482c-8a19-3a0c1d9a9792'
      ],
      connection: [ 'Connection', 'keep-alive' ],
      'content-language': [ 'Content-Language', 'en' ],
      'content-length': [ 'Content-Length', '404' ],
      dnt: [ 'DNT', '1' ],
      host: [ 'Host', 'www.irctc.co.in' ],
      origin: [ 'Origin', 'https://www.irctc.co.in' ],
      referer: [ 'Referer', 'https://www.irctc.co.in/nget/booking/train-list' ],
      'sec-fetch-dest': [ 'Sec-Fetch-Dest', 'empty' ],
      'sec-fetch-mode': [ 'Sec-Fetch-Mode', 'cors' ],
      'sec-fetch-site': [ 'Sec-Fetch-Site', 'same-origin' ],
      'user-agent': [
        'User-Agent',
        'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0'
      ],
      bmirak: [ 'bmirak', 'webbm' ],
      bmiyek: [ 'bmiyek', '07C70D80F95505911DC4F4D8A1417982' ],
      greq: [ 'greq', 'GQ:9ab204a9-9f04-4d55-9c4d-2e25f3d9c4dc' ],
      'sec-ch-ua': [
        'sec-ch-ua',
        '"Microsoft Edge";v="123", "Not:A-Brand";v="8", "Chromium";v="123"'
      ],
      'sec-ch-ua-mobile': [ 'sec-ch-ua-mobile', '?0' ],
      'sec-ch-ua-platform': [ 'sec-ch-ua-platform', '"Windows"' ],
      'spa-csrf-token': [ 'spa-csrf-token', '1714714213214--874522748' ],
      cookie: [
        'Cookie',
        'TS018d84e5=01d83d9ce720dc3bf82b68ec809daf6850994c794ecb96d60f03d2bdc9fdfd493328e1ff935be7f829af3d846066a51502fb655b66; JSESSIONID=Kng87HOz0Wbtcd3GhGensB5mcwqyqQ-TPfYEy4NwAMPaObtYCjXD!1261267277; et_appVIP1=1258442250.16927.0000'
      ]
    },
    [Symbol(errored)]: null,
    [Symbol(kHighWaterMark)]: 16384,
    [Symbol(kRejectNonStandardBodyWrites)]: false,
    [Symbol(kUniqueHeaders)]: null
  },
  response: {
    status: 502,
    statusText: 'Bad Gateway',
    headers: Object [AxiosHeaders] {
      date: 'Fri, 03 May 2024 05:30:28 GMT',
      'content-type': 'text/html',
      'content-length': '401',
      connection: 'keep-alive',
      etag: '"65b23952-191"',
      'cache-control': 'no-cache, no-store, must-revalidate, max-age=0',
      pragma: 'no-cache',
      'strict-transport-security': 'max-age=31536000; preload'
    },
    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: Object [AxiosHeaders] {
        Accept: 'application/json, text/plain, */*',
        'Content-Type': 'application/json; charset=UTF-8',
        'Accept-Encoding': 'gzip, deflate, br, zstd',
        'Accept-Language': 'en-US,en;q=0.0',
        Authorization: 'Bearer b3010a7f-c39c-482c-8a19-3a0c1d9a9792',
        Connection: 'keep-alive',
        'Content-Language': 'en',
        'Content-Length': '404',
        DNT: '1',
        Host: 'www.irctc.co.in',
        Origin: 'https://www.irctc.co.in',
        Referer: 'https://www.irctc.co.in/nget/booking/train-list',
        'Sec-Fetch-Dest': 'empty',
        'Sec-Fetch-Mode': 'cors',
        'Sec-Fetch-Site': 'same-origin',
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0',
        bmirak: 'webbm',
        bmiyek: '07C70D80F95505911DC4F4D8A1417982',
        greq: 'GQ:9ab204a9-9f04-4d55-9c4d-2e25f3d9c4dc',
        'sec-ch-ua': '"Microsoft Edge";v="123", "Not:A-Brand";v="8", "Chromium";v="123"',
        'sec-ch-ua-mobile': '?0',
        'sec-ch-ua-platform': '"Windows"',
        'spa-csrf-token': '1714714213214--874522748'
      },
      jar: CookieJar {
        rejectPublicSuffixes: true,
        enableLooseMode: false,
        allowSpecialUseDomain: true,
        store: MemoryCookieStore {
          synchronous: true,
          idx: [Object: null prototype] {
            'www.irctc.co.in': [Object: null prototype]
          },
          [Symbol(nodejs.util.inspect.custom)]: [Function: inspect]
        },
        prefixSecurity: 'silent',
        _cloneSync: [Function (anonymous)],
        _importCookiesSync: [Function (anonymous)],
        getCookiesSync: [Function (anonymous)],
        getCookieStringSync: [Function (anonymous)],
        getSetCookieStringsSync: [Function (anonymous)],
        removeAllCookiesSync: [Function (anonymous)],
        setCookieSync: [Function (anonymous)],
        serializeSync: [Function (anonymous)]
      },
      withCredentials: true,
      method: 'post',
      url: 'https://www.irctc.co.in/eticketing/protected/mapps1/boardingStationEnq',
      data: '{"clusterFlag":"N","onwardFlag":"N","cod":"false","reservationMode":"WS_TA_B2C","autoUpgradationSelected":false,"gnToCkOpted":false,"paymentType":1,"twoPhaseAuthRequired":false,"captureAddress":0,"alternateAvlInputDTO":[{"trainNo":"12661","destStn":"RJPM","srcStn":"TBM","jrnyDate":"20240504","quotaCode":"TQ","jrnyClass":"SL","concessionPassengers":false}],"passBooking":false,"journalistBooking":false}',
      httpAgent: CookieAgent {
        _events: [Object: null prototype] {
          free: [Function (anonymous)],
          newListener: [Function: maybeEnableKeylog]
        },
        _eventsCount: 2,
        _maxListeners: undefined,
        defaultPort: 80,
        protocol: 'http:',
        options: [Object: null prototype] {
          cookies: { jar: [CookieJar] },
          noDelay: true,
          path: null
        },
        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: 0,
        [Symbol(shapeMode)]: false,
        [Symbol(kCapture)]: false,
        [Symbol(cookieOptions)]: {
          jar: CookieJar {
            rejectPublicSuffixes: true,
            enableLooseMode: false,
            allowSpecialUseDomain: true,
            store: [MemoryCookieStore],
            prefixSecurity: 'silent',
            _cloneSync: [Function (anonymous)],
            _importCookiesSync: [Function (anonymous)],
            getCookiesSync: [Function (anonymous)],
            getCookieStringSync: [Function (anonymous)],
            getSetCookieStringsSync: [Function (anonymous)],
            removeAllCookiesSync: [Function (anonymous)],
            setCookieSync: [Function (anonymous)],
            serializeSync: [Function (anonymous)]
          }
        }
      },
      httpsAgent: CookieAgent {
        _events: [Object: null prototype] {
          free: [Function (anonymous)],
          newListener: [Function: maybeEnableKeylog]
        },
        _eventsCount: 2,
        _maxListeners: undefined,
        defaultPort: 443,
        protocol: 'https:',
        options: [Object: null prototype] {
          cookies: { jar: [CookieJar] },
          noDelay: true,
          path: null
        },
        requests: [Object: null prototype] {},
        sockets: [Object: null prototype] {
          'www.irctc.co.in:443:::::::::::::::::::::': [ [TLSSocket] ]
        },
        freeSockets: [Object: null prototype] {},
        keepAliveMsecs: 1000,
        keepAlive: false,
        maxSockets: Infinity,
        maxFreeSockets: 256,
        scheduling: 'lifo',
        maxTotalSockets: Infinity,
        totalSocketCount: 1,
        maxCachedSessions: 100,
        _sessionCache: {
          map: {
            'www.irctc.co.in:443:::::::::::::::::::::': [Buffer [Uint8Array]]
          },
          list: [ 'www.irctc.co.in:443:::::::::::::::::::::' ]
        },
        [Symbol(shapeMode)]: false,
        [Symbol(kCapture)]: false,
        [Symbol(cookieOptions)]: {
          jar: CookieJar {
            rejectPublicSuffixes: true,
            enableLooseMode: false,
            allowSpecialUseDomain: true,
            store: [MemoryCookieStore],
            prefixSecurity: 'silent',
            _cloneSync: [Function (anonymous)],
            _importCookiesSync: [Function (anonymous)],
            getCookiesSync: [Function (anonymous)],
            getCookieStringSync: [Function (anonymous)],
            getSetCookieStringsSync: [Function (anonymous)],
            removeAllCookiesSync: [Function (anonymous)],
            setCookieSync: [Function (anonymous)],
            serializeSync: [Function (anonymous)]
          }
        }
      }
    },
    request: <ref *1> ClientRequest {
      _events: [Object: null prototype] {
        abort: [Function (anonymous)],
        aborted: [Function (anonymous)],
        connect: [Function (anonymous)],
        error: [Function (anonymous)],
        socket: [Function (anonymous)],
        timeout: [Function (anonymous)],
        finish: [Function: requestOnFinish]
      },
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: true,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: true,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      strictContentLength: false,
      _contentLength: '404',
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: true,
      _header: 'POST /eticketing/protected/mapps1/boardingStationEnq HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'Content-Type: application/json; charset=UTF-8\r\n' +
        'Accept-Encoding: gzip, deflate, br, zstd\r\n' +
        'Accept-Language: en-US,en;q=0.0\r\n' +
        'Authorization: Bearer b3010a7f-c39c-482c-8a19-3a0c1d9a9792\r\n' +
        'Connection: keep-alive\r\n' +
        'Content-Language: en\r\n' +
        'Content-Length: 404\r\n' +
        'DNT: 1\r\n' +
        'Host: www.irctc.co.in\r\n' +
        'Origin: https://www.irctc.co.in\r\n' +
        'Referer: https://www.irctc.co.in/nget/booking/train-list\r\n' +
        'Sec-Fetch-Dest: empty\r\n' +
        'Sec-Fetch-Mode: cors\r\n' +
        'Sec-Fetch-Site: same-origin\r\n' +
        'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0\r\n' +
        'bmirak: webbm\r\n' +
        'bmiyek: 07C70D80F95505911DC4F4D8A1417982\r\n' +
        'greq: GQ:9ab204a9-9f04-4d55-9c4d-2e25f3d9c4dc\r\n' +
        'sec-ch-ua: "Microsoft Edge";v="123", "Not:A-Brand";v="8", "Chromium";v="123"\r\n' +
        'sec-ch-ua-mobile: ?0\r\n' +
        'sec-ch-ua-platform: "Windows"\r\n' +
        'spa-csrf-token: 1714714213214--874522748\r\n' +
        'Cookie: TS018d84e5=01d83d9ce720dc3bf82b68ec809daf6850994c794ecb96d60f03d2bdc9fdfd493328e1ff935be7f829af3d846066a51502fb655b66; JSESSIONID=Kng87HOz0Wbtcd3GhGensB5mcwqyqQ-TPfYEy4NwAMPaObtYCjXD!1261267277; et_appVIP1=1258442250.16927.0000\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: CookieAgent {
        _events: [Object: null prototype] {
          free: [Function (anonymous)],
          newListener: [Function: maybeEnableKeylog]
        },
        _eventsCount: 2,
        _maxListeners: undefined,
        defaultPort: 443,
        protocol: 'https:',
        options: [Object: null prototype] {
          cookies: { jar: [CookieJar] },
          noDelay: true,
          path: null
        },
        requests: [Object: null prototype] {},
        sockets: [Object: null prototype] {
          'www.irctc.co.in:443:::::::::::::::::::::': [ [TLSSocket] ]
        },
        freeSockets: [Object: null prototype] {},
        keepAliveMsecs: 1000,
        keepAlive: false,
        maxSockets: Infinity,
        maxFreeSockets: 256,
        scheduling: 'lifo',
        maxTotalSockets: Infinity,
        totalSocketCount: 1,
        maxCachedSessions: 100,
        _sessionCache: {
          map: {
            'www.irctc.co.in:443:::::::::::::::::::::': [Buffer [Uint8Array]]
          },
          list: [ 'www.irctc.co.in:443:::::::::::::::::::::' ]
        },
        [Symbol(shapeMode)]: false,
        [Symbol(kCapture)]: false,
        [Symbol(cookieOptions)]: {
          jar: CookieJar {
            rejectPublicSuffixes: true,
            enableLooseMode: false,
            allowSpecialUseDomain: true,
            store: [MemoryCookieStore],
            prefixSecurity: 'silent',
            _cloneSync: [Function (anonymous)],
            _importCookiesSync: [Function (anonymous)],
            getCookiesSync: [Function (anonymous)],
            getCookieStringSync: [Function (anonymous)],
            getSetCookieStringsSync: [Function (anonymous)],
            removeAllCookiesSync: [Function (anonymous)],
            setCookieSync: [Function (anonymous)],
            serializeSync: [Function (anonymous)]
          }
        }
      },
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      joinDuplicateHeaders: undefined,
      path: '/eticketing/protected/mapps1/boardingStationEnq',
      _ended: true,
      res: IncomingMessage {
        _events: {
          close: undefined,
          error: [Function: handleStreamError],
          data: [Function: handleStreamData],
          end: [ [Function: responseOnEnd], [Function: handleStreamEnd] ],
          readable: undefined,
          finish: undefined,
          aborted: [Function: handlerStreamAborted]
        },
        _readableState: ReadableState {
          highWaterMark: 16384,
          buffer: [],
          bufferIndex: 0,
          length: 0,
          pipes: [],
          awaitDrainWriters: null,
          [Symbol(kState)]: 194779004
        },
        _maxListeners: undefined,
        socket: null,
        httpVersionMajor: 1,
        httpVersionMinor: 1,
        httpVersion: '1.1',
        complete: true,
        rawHeaders: [
          'Date',
          'Fri, 03 May 2024 05:30:28 GMT',
          'Content-Type',
          'text/html',
          'Content-Length',
          '401',
          'Connection',
          'keep-alive',
          'ETag',
          '"65b23952-191"',
          'Cache-Control',
          'no-cache, no-store, must-revalidate, max-age=0',
          'Pragma',
          'no-cache',
          'Strict-Transport-Security',
          'max-age=31536000; preload'
        ],
        rawTrailers: [],
        joinDuplicateHeaders: undefined,
        aborted: false,
        upgrade: false,
        url: '',
        method: null,
        statusCode: 502,
        statusMessage: 'Bad Gateway',
        client: <ref *2> TLSSocket {
          _tlsOptions: {
            allowHalfOpen: undefined,
            pipe: false,
            secureContext: [SecureContext],
            isServer: false,
            requestCert: true,
            rejectUnauthorized: false,
            session: undefined,
            ALPNProtocols: undefined,
            requestOCSP: undefined,
            enableTrace: undefined,
            pskCallback: undefined,
            highWaterMark: undefined,
            onread: undefined,
            signal: undefined
          },
          _secureEstablished: true,
          _securePending: false,
          _newSessionPending: false,
          _controlReleased: true,
          secureConnecting: false,
          _SNICallback: null,
          servername: 'www.irctc.co.in',
          alpnProtocol: false,
          authorized: true,
          authorizationError: null,
          encrypted: true,
          _events: [Object: null prototype] {
            close: [Array],
            end: [Function: onReadableStreamEnd],
            error: undefined,
            newListener: [Function: keylogNewListener],
            connect: undefined,
            secure: [Function: onConnectSecure],
            session: [Function (anonymous)],
            free: [Function: onFree],
            timeout: [Function: onTimeout],
            agentRemove: [Function: onRemove],
            data: undefined,
            drain: undefined
          },
          _eventsCount: 8,
          connecting: false,
          _hadError: false,
          _parent: null,
          _host: 'www.irctc.co.in',
          _closeAfterHandlingError: false,
          _readableState: ReadableState {
            highWaterMark: 16384,
            buffer: [],
            bufferIndex: 0,
            length: 0,
            pipes: [],
            awaitDrainWriters: null,
            [Symbol(kState)]: 60303732
          },
          _writableState: WritableState {
            highWaterMark: 16384,
            length: 0,
            corked: 0,
            onwrite: [Function: bound onwrite],
            writelen: 0,
            bufferedIndex: 0,
            pendingcb: 0,
            [Symbol(kState)]: 17564020,
            [Symbol(kBufferedValue)]: null,
            [Symbol(kWriteCbValue)]: [Function (anonymous)]
          },
          allowHalfOpen: false,
          _maxListeners: undefined,
          _sockname: null,
          _pendingData: null,
          _pendingEncoding: '',
          server: undefined,
          _server: null,
          ssl: null,
          _requestCert: true,
          _rejectUnauthorized: false,
          parser: null,
          _httpMessage: [Circular *1],
          autoSelectFamilyAttemptedAddresses: [ '103.252.142.21:443' ],
          [Symbol(alpncallback)]: null,
          [Symbol(res)]: TLSWrap {
            _parent: [TCP],
            _parentWrap: null,
            _secureContext: [SecureContext],
            reading: true,
            onkeylog: [Function: onkeylog],
            onhandshakestart: {},
            onhandshakedone: [Function (anonymous)],
            onocspresponse: [Function: onocspresponse],
            onnewsession: [Function: onnewsessionclient],
            onerror: [Function: onerror],
            [Symbol(owner_symbol)]: [Circular *2]
          },
          [Symbol(verified)]: true,
          [Symbol(pendingSession)]: null,
          [Symbol(async_id_symbol)]: 868,
          [Symbol(kHandle)]: null,
          [Symbol(lastWriteQueueSize)]: 0,
          [Symbol(timeout)]: null,
          [Symbol(kBuffer)]: null,
          [Symbol(kBufferCb)]: null,
          [Symbol(kBufferGen)]: null,
          [Symbol(shapeMode)]: true,
          [Symbol(kCapture)]: false,
          [Symbol(kSetNoDelay)]: false,
          [Symbol(kSetKeepAlive)]: true,
          [Symbol(kSetKeepAliveInitialDelay)]: 60,
          [Symbol(kBytesRead)]: 693,
          [Symbol(kBytesWritten)]: 1610,
          [Symbol(connect-options)]: {
            rejectUnauthorized: false,
            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: 'POST',
            headers: [Object: null prototype],
            agents: [Object],
            auth: undefined,
            family: undefined,
            beforeRedirect: [Function: dispatchBeforeRedirect],
            beforeRedirects: [Object],
            hostname: 'www.irctc.co.in',
            port: 443,
            agent: [CookieAgent],
            nativeProtocols: [Object],
            pathname: '/eticketing/protected/mapps1/boardingStationEnq',
            _defaultAgent: [Agent],
            host: 'www.irctc.co.in',
            cookies: [Object],
            noDelay: true,
            servername: 'www.irctc.co.in',
            _agentKey: 'www.irctc.co.in:443:::::::::::::::::::::',
            encoding: null,
            singleUse: true
          }
        },
        _consuming: false,
        _dumped: false,
        req: [Circular *1],
        _eventsCount: 4,
        responseUrl: 'https://www.irctc.co.in/eticketing/protected/mapps1/boardingStationEnq',
        redirects: [],
        [Symbol(shapeMode)]: true,
        [Symbol(kCapture)]: false,
        [Symbol(kHeaders)]: {
          date: 'Fri, 03 May 2024 05:30:28 GMT',
          'content-type': 'text/html',
          'content-length': '401',
          connection: 'keep-alive',
          etag: '"65b23952-191"',
          'cache-control': 'no-cache, no-store, must-revalidate, max-age=0',
          pragma: 'no-cache',
          'strict-transport-security': 'max-age=31536000; preload'
        },
        [Symbol(kHeadersCount)]: 16,
        [Symbol(kTrailers)]: null,
        [Symbol(kTrailersCount)]: 0
      },
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'www.irctc.co.in',
      protocol: 'https:',
      _implicitHeader: [Function (anonymous)],
      emit: [Function (anonymous)],
      _redirectable: Writable {
        _events: {
          close: undefined,
          error: [Function: handleRequestError],
          prefinish: undefined,
          finish: undefined,
          drain: undefined,
          response: [Function: handleResponse],
          socket: [Function: handleRequestSocket]
        },
        _writableState: WritableState {
          highWaterMark: 16384,
          length: 0,
          corked: 0,
          onwrite: [Function: bound onwrite],
          writelen: 0,
          bufferedIndex: 0,
          pendingcb: 0,
          [Symbol(kState)]: 17580812,
          [Symbol(kBufferedValue)]: null
        },
        _maxListeners: undefined,
        _options: {
          maxRedirects: 21,
          maxBodyLength: Infinity,
          protocol: 'https:',
          path: '/eticketing/protected/mapps1/boardingStationEnq',
          method: 'POST',
          headers: [Object: null prototype] {
            Accept: 'application/json, text/plain, */*',
            'Content-Type': 'application/json; charset=UTF-8',
            'Accept-Encoding': 'gzip, deflate, br, zstd',
            'Accept-Language': 'en-US,en;q=0.0',
            Authorization: 'Bearer b3010a7f-c39c-482c-8a19-3a0c1d9a9792',
            Connection: 'keep-alive',
            'Content-Language': 'en',
            'Content-Length': '404',
            DNT: '1',
            Host: 'www.irctc.co.in',
            Origin: 'https://www.irctc.co.in',
            Referer: 'https://www.irctc.co.in/nget/booking/train-list',
            'Sec-Fetch-Dest': 'empty',
            'Sec-Fetch-Mode': 'cors',
            'Sec-Fetch-Site': 'same-origin',
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0',
            bmirak: 'webbm',
            bmiyek: '07C70D80F95505911DC4F4D8A1417982',
            greq: 'GQ:9ab204a9-9f04-4d55-9c4d-2e25f3d9c4dc',
            'sec-ch-ua': '"Microsoft Edge";v="123", "Not:A-Brand";v="8", "Chromium";v="123"',
            'sec-ch-ua-mobile': '?0',
            'sec-ch-ua-platform': '"Windows"',
            'spa-csrf-token': '1714714213214--874522748'
          },
          agents: { http: [CookieAgent], https: [CookieAgent] },
          auth: undefined,
          family: undefined,
          beforeRedirect: [Function: dispatchBeforeRedirect],
          beforeRedirects: { proxy: [Function: beforeRedirect] },
          hostname: 'www.irctc.co.in',
          port: '',
          agent: CookieAgent {
            _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: 1,
            maxCachedSessions: 100,
            _sessionCache: [Object],
            [Symbol(shapeMode)]: false,
            [Symbol(kCapture)]: false,
            [Symbol(cookieOptions)]: [Object]
          },
          nativeProtocols: { 'http:': [Object], 'https:': [Object] },
          pathname: '/eticketing/protected/mapps1/boardingStationEnq'
        },
        _ended: true,
        _ending: true,
        _redirectCount: 0,
        _redirects: [],
        _requestBodyLength: 404,
        _requestBodyBuffers: [],
        _eventsCount: 3,
        _onNativeResponse: [Function (anonymous)],
        _currentRequest: [Circular *1],
        _currentUrl: 'https://www.irctc.co.in/eticketing/protected/mapps1/boardingStationEnq',
        [Symbol(shapeMode)]: true,
        [Symbol(kCapture)]: false
      },
      [Symbol(shapeMode)]: false,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kChunkedBuffer)]: [],
      [Symbol(kChunkedLength)]: 0,
      [Symbol(kSocket)]: <ref *2> TLSSocket {
        _tlsOptions: {
          allowHalfOpen: undefined,
          pipe: false,
          secureContext: SecureContext { context: SecureContext {} },
          isServer: false,
          requestCert: true,
          rejectUnauthorized: false,
          session: undefined,
          ALPNProtocols: undefined,
          requestOCSP: undefined,
          enableTrace: undefined,
          pskCallback: undefined,
          highWaterMark: undefined,
          onread: undefined,
          signal: undefined
        },
        _secureEstablished: true,
        _securePending: false,
        _newSessionPending: false,
        _controlReleased: true,
        secureConnecting: false,
        _SNICallback: null,
        servername: 'www.irctc.co.in',
        alpnProtocol: false,
        authorized: true,
        authorizationError: null,
        encrypted: true,
        _events: [Object: null prototype] {
          close: [
            [Function: onSocketCloseDestroySSL],
            [Function],
            [Function: onClose]
          ],
          end: [Function: onReadableStreamEnd],
          error: undefined,
          newListener: [Function: keylogNewListener],
          connect: undefined,
          secure: [Function: onConnectSecure],
          session: [Function (anonymous)],
          free: [Function: onFree],
          timeout: [Function: onTimeout],
          agentRemove: [Function: onRemove],
          data: undefined,
          drain: undefined
        },
        _eventsCount: 8,
        connecting: false,
        _hadError: false,
        _parent: null,
        _host: 'www.irctc.co.in',
        _closeAfterHandlingError: false,
        _readableState: ReadableState {
          highWaterMark: 16384,
          buffer: [],
          bufferIndex: 0,
          length: 0,
          pipes: [],
          awaitDrainWriters: null,
          [Symbol(kState)]: 60303732
        },
        _writableState: WritableState {
          highWaterMark: 16384,
          length: 0,
          corked: 0,
          onwrite: [Function: bound onwrite],
          writelen: 0,
          bufferedIndex: 0,
          pendingcb: 0,
          [Symbol(kState)]: 17564020,
          [Symbol(kBufferedValue)]: null,
          [Symbol(kWriteCbValue)]: [Function (anonymous)]
        },
        allowHalfOpen: false,
        _maxListeners: undefined,
        _sockname: null,
        _pendingData: null,
        _pendingEncoding: '',
        server: undefined,
        _server: null,
        ssl: null,
        _requestCert: true,
        _rejectUnauthorized: false,
        parser: null,
        _httpMessage: [Circular *1],
        autoSelectFamilyAttemptedAddresses: [ '103.252.142.21:443' ],
        [Symbol(alpncallback)]: null,
        [Symbol(res)]: TLSWrap {
          _parent: TCP {
            reading: [Getter/Setter],
            onconnection: null,
            [Symbol(owner_symbol)]: [Circular *2],
            [Symbol(handle_onclose)]: [Function: done]
          },
          _parentWrap: null,
          _secureContext: SecureContext { context: SecureContext {} },
          reading: true,
          onkeylog: [Function: onkeylog],
          onhandshakestart: {},
          onhandshakedone: [Function (anonymous)],
          onocspresponse: [Function: onocspresponse],
          onnewsession: [Function: onnewsessionclient],
          onerror: [Function: onerror],
          [Symbol(owner_symbol)]: [Circular *2]
        },
        [Symbol(verified)]: true,
        [Symbol(pendingSession)]: null,
        [Symbol(async_id_symbol)]: 868,
        [Symbol(kHandle)]: null,
        [Symbol(lastWriteQueueSize)]: 0,
        [Symbol(timeout)]: null,
        [Symbol(kBuffer)]: null,
        [Symbol(kBufferCb)]: null,
        [Symbol(kBufferGen)]: null,
        [Symbol(shapeMode)]: true,
        [Symbol(kCapture)]: false,
        [Symbol(kSetNoDelay)]: false,
        [Symbol(kSetKeepAlive)]: true,
        [Symbol(kSetKeepAliveInitialDelay)]: 60,
        [Symbol(kBytesRead)]: 693,
        [Symbol(kBytesWritten)]: 1610,
        [Symbol(connect-options)]: {
          rejectUnauthorized: false,
          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: 'POST',
          headers: [Object: null prototype] {
            Accept: 'application/json, text/plain, */*',
            'Content-Type': 'application/json; charset=UTF-8',
            'Accept-Encoding': 'gzip, deflate, br, zstd',
            'Accept-Language': 'en-US,en;q=0.0',
            Authorization: 'Bearer b3010a7f-c39c-482c-8a19-3a0c1d9a9792',
            Connection: 'keep-alive',
            'Content-Language': 'en',
            'Content-Length': '404',
            DNT: '1',
            Host: 'www.irctc.co.in',
            Origin: 'https://www.irctc.co.in',
            Referer: 'https://www.irctc.co.in/nget/booking/train-list',
            'Sec-Fetch-Dest': 'empty',
            'Sec-Fetch-Mode': 'cors',
            'Sec-Fetch-Site': 'same-origin',
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0',
            bmirak: 'webbm',
            bmiyek: '07C70D80F95505911DC4F4D8A1417982',
            greq: 'GQ:9ab204a9-9f04-4d55-9c4d-2e25f3d9c4dc',
            'sec-ch-ua': '"Microsoft Edge";v="123", "Not:A-Brand";v="8", "Chromium";v="123"',
            'sec-ch-ua-mobile': '?0',
            'sec-ch-ua-platform': '"Windows"',
            'spa-csrf-token': '1714714213214--874522748'
          },
          agents: { http: [CookieAgent], https: [CookieAgent] },
          auth: undefined,
          family: undefined,
          beforeRedirect: [Function: dispatchBeforeRedirect],
          beforeRedirects: { proxy: [Function: beforeRedirect] },
          hostname: 'www.irctc.co.in',
          port: 443,
          agent: CookieAgent {
            _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: 1,
            maxCachedSessions: 100,
            _sessionCache: [Object],
            [Symbol(shapeMode)]: false,
            [Symbol(kCapture)]: false,
            [Symbol(cookieOptions)]: [Object]
          },
          nativeProtocols: { 'http:': [Object], 'https:': [Object] },
          pathname: '/eticketing/protected/mapps1/boardingStationEnq',
          _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: true,
            maxSockets: Infinity,
            maxFreeSockets: 256,
            scheduling: 'lifo',
            maxTotalSockets: Infinity,
            totalSocketCount: 0,
            maxCachedSessions: 100,
            _sessionCache: [Object],
            [Symbol(shapeMode)]: false,
            [Symbol(kCapture)]: false
          },
          host: 'www.irctc.co.in',
          cookies: { jar: [CookieJar] },
          noDelay: true,
          servername: 'www.irctc.co.in',
          _agentKey: 'www.irctc.co.in:443:::::::::::::::::::::',
          encoding: null,
          singleUse: true
        }
      },
      [Symbol(kOutHeaders)]: [Object: null prototype] {
        accept: [ 'Accept', 'application/json, text/plain, */*' ],
        'content-type': [ 'Content-Type', 'application/json; charset=UTF-8' ],
        'accept-encoding': [ 'Accept-Encoding', 'gzip, deflate, br, zstd' ],
        'accept-language': [ 'Accept-Language', 'en-US,en;q=0.0' ],
        authorization: [
          'Authorization',
          'Bearer b3010a7f-c39c-482c-8a19-3a0c1d9a9792'
        ],
        connection: [ 'Connection', 'keep-alive' ],
        'content-language': [ 'Content-Language', 'en' ],
        'content-length': [ 'Content-Length', '404' ],
        dnt: [ 'DNT', '1' ],
        host: [ 'Host', 'www.irctc.co.in' ],
        origin: [ 'Origin', 'https://www.irctc.co.in' ],
        referer: [
          'Referer',
          'https://www.irctc.co.in/nget/booking/train-list'
        ],
        'sec-fetch-dest': [ 'Sec-Fetch-Dest', 'empty' ],
        'sec-fetch-mode': [ 'Sec-Fetch-Mode', 'cors' ],
        'sec-fetch-site': [ 'Sec-Fetch-Site', 'same-origin' ],
        'user-agent': [
          'User-Agent',
          'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0'
        ],
        bmirak: [ 'bmirak', 'webbm' ],
        bmiyek: [ 'bmiyek', '07C70D80F95505911DC4F4D8A1417982' ],
        greq: [ 'greq', 'GQ:9ab204a9-9f04-4d55-9c4d-2e25f3d9c4dc' ],
        'sec-ch-ua': [
          'sec-ch-ua',
          '"Microsoft Edge";v="123", "Not:A-Brand";v="8", "Chromium";v="123"'
        ],
        'sec-ch-ua-mobile': [ 'sec-ch-ua-mobile', '?0' ],
        'sec-ch-ua-platform': [ 'sec-ch-ua-platform', '"Windows"' ],
        'spa-csrf-token': [ 'spa-csrf-token', '1714714213214--874522748' ],
        cookie: [
          'Cookie',
          'TS018d84e5=01d83d9ce720dc3bf82b68ec809daf6850994c794ecb96d60f03d2bdc9fdfd493328e1ff935be7f829af3d846066a51502fb655b66; JSESSIONID=Kng87HOz0Wbtcd3GhGensB5mcwqyqQ-TPfYEy4NwAMPaObtYCjXD!1261267277; et_appVIP1=1258442250.16927.0000'
        ]
      },
      [Symbol(errored)]: null,
      [Symbol(kHighWaterMark)]: 16384,
      [Symbol(kRejectNonStandardBodyWrites)]: false,
      [Symbol(kUniqueHeaders)]: null
    },
    data: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n' +
      '\n' +
      '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\n' +
      '    <head>\n' +
      '        <title>IRCTC Next Generation eTicketing System</title>\n' +
      '        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n' +
      '    </head>\n' +
      '\n' +
      '    <body>\n' +
      '        <h1><strong>Server error!</strong></h1>\n' +
      '    </body>\n' +
      '</html>\n'
  }
}
suryavaddiraju commented 2 months ago
siddhu2310 commented 2 months ago

Solve this issue as soon as possible, add log as well

suryavaddiraju commented 2 months ago

Issue sorted with new update v2.0.1