ronram5126 / steamworkshopdownloader

Simple steam workshop downlaoder
MIT License
21 stars 7 forks source link

Multiple errors while downloading a collection #5

Closed Nipodemos closed 4 years ago

Nipodemos commented 4 years ago

Hello! I am downloading this collection: https://steamcommunity.com/sharedfiles/filedetails/?id=2040151856

I had an error about folder naming which i commented in #4 , but i temporaly change the folder name to ${downloadDir/ collection ${count} so the name of the folder was collection 0 and it solved that problem. However, now i have other errors: i can't download some itens in the collection... it gives an error:

downloading Metro Stations: More Platforms & Special Tracks [For Sunset Harbor update]
    0. Metro 1 Platform Curved 1 For Sunset Harbor
[
  Error: connect ECONNREFUSED 127.0.0.1:80
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
    errno: -4078,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '127.0.0.1',
    port: 80
  }
]

a few worked, and a few did not worked, giving this error. I opended cmd with administrator rights

here is the full output:

> batchdownload@1.0.0 start C:\Users\Alan\Downloads\steamworkshopdownloader
> node index.js

downloading Metro Stations: More Platforms & Special Tracks [For Sunset Harbor update]
    0. Metro 1 Platform Curved 1 For Sunset Harbor
[
  Error: connect ECONNREFUSED 127.0.0.1:80
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
    errno: -4078,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '127.0.0.1',
    port: 80
  }
]
Metro 1 Platform Curved 1 For Sunset Harbor
Metro Stations: More Platforms & Special Tracks [For Sunset Harbor update]
[
  Error: connect ECONNREFUSED 127.0.0.1:80
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
    errno: -4078,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '127.0.0.1',
    port: 80
  }
]
(node:5304) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:80
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
(node:5304) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:5304) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    1. Metro 1 Platform Curved 2 For Sunset Harbor
    2. Metro 1 Platform Deeper 1 For Sunset Harbor
[
  Error: connect ECONNREFUSED 127.0.0.1:80
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
    errno: -4078,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '127.0.0.1',
    port: 80
  }
]
Metro 1 Platform Deeper 1 For Sunset Harbor
Metro Stations: More Platforms & Special Tracks [For Sunset Harbor update]
[
  Error: connect ECONNREFUSED 127.0.0.1:80
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
    errno: -4078,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '127.0.0.1',
    port: 80
  }
]
(node:5304) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:80
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
(node:5304) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
    3. Metro 1 Platform Deeper 2 For Sunset Harbor
[
  Error: connect ECONNREFUSED 127.0.0.1:80
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
    errno: -4078,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '127.0.0.1',
    port: 80
  }
]
Metro 1 Platform Deeper 2 For Sunset Harbor
Metro Stations: More Platforms & Special Tracks [For Sunset Harbor update]
[
  Error: connect ECONNREFUSED 127.0.0.1:80
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
    errno: -4078,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '127.0.0.1',
    port: 80
  }
]
(node:5304) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:80
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
(node:5304) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
    4. Metro 1 Platform Diagonal 1 For Sunset Harbor
    5. Metro 1 Platform Diagonal 2 For Sunset Harbor
    6. Metro 1 Platform Rotated For Sunset Harbor
    7. Metro 2 Platforms Cross For Sunset Harbor
    8. Metro 2 Platforms Cross X (45 Degree) For Sunset Harbor
    9. Metro 2 Platforms Cross X (Diagonal) For Sunset Harbor
    10. Metro 2 Platforms Parallel 1 For Sunset Harbor
    11. Metro 2 Platforms Parallel 2 For Sunset Harbor
    12. Metro 3 Platforms Cross For Sunset Harbor
    13. Metro 3 Platforms Parallel 1 For Sunset Harbor
[
  Error: connect ECONNREFUSED 127.0.0.1:80
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
    errno: -4078,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '127.0.0.1',
    port: 80
  }
]
Metro 3 Platforms Parallel 1 For Sunset Harbor
Metro Stations: More Platforms & Special Tracks [For Sunset Harbor update]
[
  Error: connect ECONNREFUSED 127.0.0.1:80
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
    errno: -4078,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '127.0.0.1',
    port: 80
  }
]
(node:5304) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:80
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
(node:5304) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
    14. Metro 3 Platforms Parallel 2 For Sunset Harbor
    15. Metro 3 Platforms Star For Sunset Harbor
    16. Metro 4 Platforms Cross For Sunset Harbor
[
  Error: connect ECONNREFUSED 127.0.0.1:80
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
    errno: -4078,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '127.0.0.1',
    port: 80
  }
]
Metro 4 Platforms Cross For Sunset Harbor
Metro Stations: More Platforms & Special Tracks [For Sunset Harbor update]
[
  Error: connect ECONNREFUSED 127.0.0.1:80
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
    errno: -4078,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '127.0.0.1',
    port: 80
  }
]
(node:5304) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:80
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
(node:5304) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 5)
    17. Metro 5 Platforms Cross For Sunset Harbor
Metro 5 Platforms Cross For Sunset Harbor
Metro Stations: More Platforms & Special Tracks [For Sunset Harbor update]
Error: Request failed with status code 504
    at createError (C:\Users\Alan\Downloads\steamworkshopdownloader\node_modules\axios\lib\core\createError.js:16:15)
    at settle (C:\Users\Alan\Downloads\steamworkshopdownloader\node_modules\axios\lib\core\settle.js:17:12)
    at IncomingMessage.handleStreamEnd (C:\Users\Alan\Downloads\steamworkshopdownloader\node_modules\axios\lib\adapters\http.js:236:11)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1201:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  config: {
    url: 'http://steamworkshop.download/online/steamonline.php',
    method: 'post',
    data: 'item=2040866947&app=255710',
    headers: {
      Accept: 'application/json, text/plain, */*',
      'Content-Type': 'application/x-www-form-urlencoded',
      'User-Agent': 'axios/0.19.2',
      'Content-Length': 26
    },
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    adapter: [Function: httpAdapter],
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    validateStatus: [Function: validateStatus]
  },
  request: <ref *1> ClientRequest {
    _events: [Object: null prototype] {
      socket: [Function (anonymous)],
      abort: [Function (anonymous)],
      aborted: [Function (anonymous)],
      error: [Function (anonymous)],
      timeout: [Function (anonymous)],
      prefinish: [Function: requestOnPrefinish]
    },
    _eventsCount: 6,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    _last: true,
    chunkedEncoding: false,
    shouldKeepAlive: false,
    useChunkedEncodingByDefault: true,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    _contentLength: null,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    socket: Socket {
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'steamworkshop.download',
      _readableState: [ReadableState],
      readable: true,
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      _writableState: [WritableState],
      writable: false,
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: null,
      _server: null,
      parser: null,
      _httpMessage: [Circular *1],
      [Symbol(asyncId)]: 10870,
      [Symbol(kHandle)]: [TCP],
      [Symbol(kSetNoDelay)]: false,
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesRead)]: 0,
      [Symbol(kBytesWritten)]: 0
    },
    _header: 'POST /online/steamonline.php HTTP/1.1\r\n' +
      'Accept: application/json, text/plain, */*\r\n' +
      'Content-Type: application/x-www-form-urlencoded\r\n' +
      'User-Agent: axios/0.19.2\r\n' +
      'Content-Length: 26\r\n' +
      'Host: steamworkshop.download\r\n' +
      'Connection: close\r\n' +
      '\r\n',
    _onPendingData: [Function: noopPendingOutput],
    agent: Agent {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      defaultPort: 80,
      protocol: 'http:',
      options: [Object],
      requests: {},
      sockets: [Object],
      freeSockets: {},
      keepAliveMsecs: 1000,
      keepAlive: false,
      maxSockets: Infinity,
      maxFreeSockets: 256,
      [Symbol(kCapture)]: false
    },
    socketPath: undefined,
    method: 'POST',
    maxHeaderSize: undefined,
    insecureHTTPParser: undefined,
    path: '/online/steamonline.php',
    _ended: true,
    res: IncomingMessage {
      _readableState: [ReadableState],
      readable: false,
      _events: [Object: null prototype],
      _eventsCount: 3,
      _maxListeners: undefined,
      socket: [Socket],
      httpVersionMajor: 1,
      httpVersionMinor: 1,
      httpVersion: '1.1',
      complete: true,
      headers: [Object],
      rawHeaders: [Array],
      trailers: {},
      rawTrailers: [],
      aborted: false,
      upgrade: false,
      url: '',
      method: null,
      statusCode: 504,
      statusMessage: 'Gateway Time-out',
      client: [Socket],
      _consuming: false,
      _dumped: false,
      req: [Circular *1],
      responseUrl: 'http://steamworkshop.download/online/steamonline.php',
      redirects: [],
      [Symbol(kCapture)]: false
    },
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    reusedSocket: false,
    _redirectable: Writable {
      _writableState: [WritableState],
      writable: true,
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      _options: [Object],
      _redirectCount: 0,
      _redirects: [],
      _requestBodyLength: 26,
      _requestBodyBuffers: [],
      _onNativeResponse: [Function (anonymous)],
      _currentRequest: [Circular *1],
      _currentUrl: 'http://steamworkshop.download/online/steamonline.php',
      [Symbol(kCapture)]: false
    },
    [Symbol(kCapture)]: false,
    [Symbol(kNeedDrain)]: false,
    [Symbol(corked)]: 0,
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      accept: [Array],
      'content-type': [Array],
      'user-agent': [Array],
      'content-length': [Array],
      host: [Array]
    }
  },
  response: {
    status: 504,
    statusText: 'Gateway Time-out',
    headers: {
      server: 'nginx/1.16.0',
      date: 'Mon, 20 Apr 2020 01:48:28 GMT',
      'content-type': 'text/html',
      'transfer-encoding': 'chunked',
      connection: 'close'
    },
    config: {
      url: 'http://steamworkshop.download/online/steamonline.php',
      method: 'post',
      data: 'item=2040866947&app=255710',
      headers: [Object],
      transformRequest: [Array],
      transformResponse: [Array],
      timeout: 0,
      adapter: [Function: httpAdapter],
      xsrfCookieName: 'XSRF-TOKEN',
      xsrfHeaderName: 'X-XSRF-TOKEN',
      maxContentLength: -1,
      validateStatus: [Function: validateStatus]
    },
    request: <ref *1> ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 6,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: null,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      socket: [Socket],
      _header: 'POST /online/steamonline.php HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'Content-Type: application/x-www-form-urlencoded\r\n' +
        'User-Agent: axios/0.19.2\r\n' +
        'Content-Length: 26\r\n' +
        'Host: steamworkshop.download\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _onPendingData: [Function: noopPendingOutput],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/online/steamonline.php',
      _ended: true,
      res: [IncomingMessage],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      _redirectable: [Writable],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    data: '<html>\r\n' +
      '<head><title>504 Gateway Time-out</title></head>\r\n' +
      '<body>\r\n' +
      '<center><h1>504 Gateway Time-out</h1></center>\r\n' +
      '<hr><center>nginx/1.16.0</center>\r\n' +
      '</body>\r\n' +
      '</html>\r\n'
  },
  isAxiosError: true,
  toJSON: [Function (anonymous)]
}

can you look at this in your free time? thanks!

Nipodemos commented 4 years ago

just an update, i think the problem are the servers or something like that, because it is failing in random files. I ran a few times and suddenly it downloaded all files without errors... Go figure

ronram5126 commented 4 years ago

Gateway error sounds like the issue with the network connection.

ronram5126 commented 4 years ago

All good I might close this as It is more likely the issue with network rather than code itself...