Inrixia / Floatplane-Downloader

Project for automatically organizing and downloading Floatplane videos for plex.
https://monitor.spookelton.net/public-dashboards/db0aec66747b4950b01b128916eb737e
GNU Affero General Public License v3.0
152 stars 41 forks source link

Container on 'dev' branch constantly restarting #153

Closed ich777 closed 1 year ago

ich777 commented 1 year ago

I've now switched to the dev branch, I've deleted everything so to speak wiped the whole container config (because I hadn't downloaded anything) and the Docker container is constantly restarting:

Node.js v19.8.1
(node:8) ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as those might change in a future version of Node.js.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:8) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
node:events:490
      throw er; // Unhandled 'error' event
      ^

RequestError: connect ECONNREFUSED 142.44.150.245:443
    at ClientRequest.<anonymous> (file:///fp/node_modules/floatplane/node_modules/got/dist/source/core/index.js:789:107)
    at Object.onceWrapper (node:events:627:26)
    at ClientRequest.emit (node:events:524:35)
    at TLSSocket.socketErrorListener (node:_http_client:495:9)
    at TLSSocket.emit (node:events:512: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)
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1532:16)
Emitted 'error' event at:
    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) {
  input: undefined,
  code: 'ECONNREFUSED',
  timings: {
    start: 1679805771509,
    socket: 1679805771510,
    lookup: 1679805771510,
    connect: undefined,
    secureConnect: undefined,
    upload: undefined,
    response: undefined,
    end: undefined,
    error: 1679805771616,
    abort: undefined,
    phases: {
      wait: 1,
      dns: 0,
      tcp: undefined,
      tls: undefined,
      request: undefined,
      firstByte: undefined,
      download: undefined,
      total: 107
    }
  },
  options: Options {
    _unixOptions: undefined,
    _internals: {
      request: undefined,
      agent: { http: undefined, https: undefined, http2: undefined },
      h2session: undefined,
      decompress: true,
      timeout: {
        connect: undefined,
        lookup: undefined,
        read: undefined,
        request: undefined,
        response: undefined,
        secureConnect: undefined,
        send: undefined,
        socket: undefined
      },
      prefixUrl: '',
      body: undefined,
      form: undefined,
      json: undefined,
      cookieJar: CookieJar {
        rejectPublicSuffixes: true,
        enableLooseMode: false,
        allowSpecialUseDomain: true,
        store: FileCookieStore {
          synchronous: true,
          idx: { 'floatplane.com': [Object] },
          filePath: './db/cookies.json',
          [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)]
      },
      ignoreInvalidCookies: false,
      searchParams: undefined,
      dnsLookup: undefined,
      dnsCache: undefined,
      context: {},
      hooks: {
        init: [],
        beforeRequest: [],
        beforeError: [],
        beforeRedirect: [],
        beforeRetry: [],
        afterResponse: []
      },
      followRedirect: true,
      maxRedirects: 10,
      cache: undefined,
      throwHttpErrors: true,
      username: '',
      password: '',
      http2: false,
      allowGetBody: false,
      headers: {
        'user-agent': 'Floatplane-Downloader/5.7.0 (Inrix, +https://github.com/Inrixia/Floatplane-Downloader), CFNetwork',
        accept: 'application/json',
        connection: 'keep-alive',
        'accept-encoding': 'gzip, deflate, br',
        cookie: 'REMOVED_ON_PURPOSE'
      },
      methodRewriting: false,
      dnsLookupIpVersion: undefined,
      parseJson: [Function: parse],
      stringifyJson: [Function: stringify],
      retry: {
        limit: 5,
        methods: [ 'GET', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'TRACE' ],
        statusCodes: [ 429 ],
        errorCodes: [
          'ETIMEDOUT',
          'ECONNRESET',
          'EADDRINUSE',
          'ECONNREFUSED',
          'EPIPE',
          'ENOTFOUND',
          'ENETUNREACH',
          'EAI_AGAIN'
        ],
        maxRetryAfter: undefined,
        calculateDelay: [Function: calculateDelay],
        backoffLimit: Infinity,
        noise: 100
      },
      localAddress: undefined,
      method: 'GET',
      createConnection: undefined,
      cacheOptions: {
        shared: undefined,
        cacheHeuristic: undefined,
        immutableMinTimeToLive: undefined,
        ignoreCargoCult: undefined
      },
      https: {
        alpnProtocols: undefined,
        rejectUnauthorized: undefined,
        checkServerIdentity: undefined,
        certificateAuthority: undefined,
        key: undefined,
        certificate: undefined,
        passphrase: undefined,
        pfx: undefined,
        ciphers: undefined,
        honorCipherOrder: undefined,
        minVersion: undefined,
        maxVersion: undefined,
        signatureAlgorithms: undefined,
        tlsSessionLifetime: undefined,
        dhparam: undefined,
        ecdhCurve: undefined,
        certificateRevocationLists: undefined
      },
      encoding: undefined,
      resolveBodyOnly: false,
      isStream: true,
      responseType: 'text',
      url: URL {
        [Symbol(context)]: URLContext {
          href: 'REMOVED_ON_PURPOSE',
          origin: 'https://edge01-na.floatplane.com',
          protocol: 'https:',
          hostname: 'edge01-na.floatplane.com',
          pathname: '/Videos/fdTjYwKGQK/1080.mp4',
          search: '?token=REMOVED_ON_PURPOSE',
          username: '',
          password: '',
          port: '',
          hash: ''
        }
      },
      pagination: {
        transform: [Function: transform],
        paginate: [Function: paginate],
        filter: [Function: filter],
        shouldContinue: [Function: shouldContinue],
        countLimit: Infinity,
        backoff: 0,
        requestLimit: 10000,
        stackAllItems: false
      },
      setHost: true,
      maxHeaderSize: undefined,
      signal: undefined,
      enableUnixSockets: true
    },
    _merging: false,
    _init: [
      {
        cookieJar: CookieJar {
          rejectPublicSuffixes: true,
          enableLooseMode: false,
          allowSpecialUseDomain: true,
          store: FileCookieStore {
            synchronous: true,
            idx: [Object],
            filePath: './db/cookies.json',
            [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)]
        },
        headers: {
          'User-Agent': 'Floatplane-Downloader/5.7.0 (Inrix, +https://github.com/Inrixia/Floatplane-Downloader), CFNetwork',
          accept: 'application/json',
          connection: 'keep-alive'
        },
        retry: {
          limit: 5,
          calculateDelay: [Function: calculateDelay],
          statusCodes: [ 429 ]
        }
      },
      { isStream: true }
    ]
  }
}

I'm using the default Docker environment variables: username, password & token

Inrixia commented 1 year ago

I haven't had the chance to test this myself. But others on the dev branch haven't been running into this issue when running in a docker container.

Can you try do a clean install and see if this is reproducible?

Also what os are you using?

Inrixia commented 1 year ago

Yea I cant reproduce this. I'm going to close this for now.

If you are still getting the error with a clean install please try running the container on your PC (non headless/containerized) and see if you get the same error and then update with results here.

ich777 commented 1 year ago

Can you try do a clean install and see if this is reproducible?

Yes, I've pulled it now on a Debian Bullseye machine (headless) and get the same result, this is my Docker run command:

docker run \
  -d \
  --name='Floatplane-Downloader' \
  -e 'username'='*REMOVED*' \
  -e 'password'='*REMOVED*' \
  -e 'token'='*REMOVED*' \
  -v '/mnt/Floatplane-Media':'/fp/videos':'rw' \
  -v '/opt/docker/floatplane-downloader':'/fp/db':'rw' \
  --restart on-failure \
  -e headless="true" 'inrix/floatplane-downloader:dev'

And this is the output:

(node:8) ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as those might change in a future version of Node.js.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:8) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
> Ffmpeg binary missing! Downloading... Done!

Unable to authenticate with floatplane... Response code 403 (Forbidden)
Please login to floatplane...

Signed in as *REMOVED*!

> Fetching user subscriptions... Done!

> Fetching latest videos from [LTT Supporter]... Fetched 5 videos! Skipped 0.
> Processing 6 videos...
ShortCircuit - SC: I likea da truck - Rivian R1T - Downloading...
Linus Tech Tips - How to Keep Sharing your Netflix - Downloading...
ShortCircuit - SC: I likea da truck - Rivian R1T - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 0s [0/5]
Linus Tech Tips - How to Keep Sharing your Netflix - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 0s [0/5]
ShortCircuit - SC: I likea da truck - Rivian R1T - Downloading...
Linus Tech Tips - How to Keep Sharing your Netflix - Downloading...
ShortCircuit - SC: I likea da truck - Rivian R1T - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 1s [1/5]
Linus Tech Tips - How to Keep Sharing your Netflix - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 1s [1/5]
ShortCircuit - SC: I likea da truck - Rivian R1T - Downloading...
Linus Tech Tips - How to Keep Sharing your Netflix - Downloading...
Linus Tech Tips - How to Keep Sharing your Netflix - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 2s [2/5]
ShortCircuit - SC: I likea da truck - Rivian R1T - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 2s [2/5]
Linus Tech Tips - How to Keep Sharing your Netflix - Downloading...
ShortCircuit - SC: I likea da truck - Rivian R1T - Downloading...
ShortCircuit - SC: I likea da truck - Rivian R1T - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 3s [3/5]
Linus Tech Tips - How to Keep Sharing your Netflix - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 3s [3/5]
ShortCircuit - SC: I likea da truck - Rivian R1T - Downloading...
Linus Tech Tips - How to Keep Sharing your Netflix - Downloading...
Linus Tech Tips - How to Keep Sharing your Netflix - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 4s [4/5]
ShortCircuit - SC: I likea da truck - Rivian R1T - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 4s [4/5]
Linus Tech Tips - How to Keep Sharing your Netflix - Downloading...
ShortCircuit - SC: I likea da truck - Rivian R1T - Downloading...
Linus Tech Tips - How to Keep Sharing your Netflix - ERR: connect ECONNREFUSED 142.44.150.245:443 Max Retries! [5/5]
ShortCircuit - SC: I’m giving Nothing one more chance… - Nothing Ear (2) + dbrand billboard - Downloading...
ShortCircuit - SC: I likea da truck - Rivian R1T - ERR: connect ECONNREFUSED 142.44.150.245:443 Max Retries! [5/5]
The WAN Show - Livestream VOD – March 25, 2023 @ 02:43 – Our Worst Week in Years -  March 24, 2023 - Downloading...
node:events:490
      throw er; // Unhandled 'error' event
      ^

RequestError: connect ECONNREFUSED 142.44.150.245:443
    at ClientRequest.<anonymous> (file:///fp/node_modules/floatplane/node_modules/got/dist/source/core/index.js:789:107)
    at Object.onceWrapper (node:events:627:26)
    at ClientRequest.emit (node:events:524:35)
    at TLSSocket.socketErrorListener (node:_http_client:495:9)
    at TLSSocket.emit (node:events:512: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)
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1532:16)
Emitted 'error' event at:
    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) {
  input: undefined,
  code: 'ECONNREFUSED',
  timings: {
    start: 1679906781608,
    socket: 1679906781608,
    lookup: 1679906781609,
    connect: undefined,
    secureConnect: undefined,
    upload: undefined,
    response: undefined,
    end: undefined,
    error: 1679906781714,
    abort: undefined,
    phases: {
      wait: 0,
      dns: 1,
      tcp: undefined,
      tls: undefined,
      request: undefined,
      firstByte: undefined,
      download: undefined,
      total: 106
    }
  },
  options: Options {
    _unixOptions: undefined,
    _internals: {
      request: undefined,
      agent: { http: undefined, https: undefined, http2: undefined },
      h2session: undefined,
      decompress: true,
      timeout: {
        connect: undefined,
        lookup: undefined,
        read: undefined,
        request: undefined,
        response: undefined,
        secureConnect: undefined,
        send: undefined,
        socket: undefined
      },
      prefixUrl: '',
      body: undefined,
      form: undefined,
      json: undefined,
      cookieJar: CookieJar {
        rejectPublicSuffixes: true,
        enableLooseMode: false,
        allowSpecialUseDomain: true,
        store: FileCookieStore {
          synchronous: true,
          idx: { 'floatplane.com': [Object] },
          filePath: './db/cookies.json',
          [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)]
      },
      ignoreInvalidCookies: false,
      searchParams: undefined,
      dnsLookup: undefined,
      dnsCache: undefined,
      context: {},
      hooks: {
        init: [],
        beforeRequest: [],
        beforeError: [],
        beforeRedirect: [],
        beforeRetry: [],
        afterResponse: []
      },
      followRedirect: true,
      maxRedirects: 10,
      cache: undefined,
      throwHttpErrors: true,
      username: '',
      password: '',
      http2: false,
      allowGetBody: false,
      headers: {
        'user-agent': 'Floatplane-Downloader/5.7.0 (Inrix, +https://github.com/Inrixia/Floatplane-Downloader), CFNetwork',
        accept: 'application/json',
        connection: 'keep-alive',
        'accept-encoding': 'gzip, deflate, br',
        cookie: '*REMOVED*'
      },
      methodRewriting: false,
      dnsLookupIpVersion: undefined,
      parseJson: [Function: parse],
      stringifyJson: [Function: stringify],
      retry: {
        limit: 5,
        methods: [ 'GET', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'TRACE' ],
        statusCodes: [ 429 ],
        errorCodes: [
          'ETIMEDOUT',
          'ECONNRESET',
          'EADDRINUSE',
          'ECONNREFUSED',
          'EPIPE',
          'ENOTFOUND',
          'ENETUNREACH',
          'EAI_AGAIN'
        ],
        maxRetryAfter: undefined,
        calculateDelay: [Function: calculateDelay],
        backoffLimit: Infinity,
        noise: 100
      },
      localAddress: undefined,
      method: 'GET',
      createConnection: undefined,
      cacheOptions: {
        shared: undefined,
        cacheHeuristic: undefined,
        immutableMinTimeToLive: undefined,
        ignoreCargoCult: undefined
      },
      https: {
        alpnProtocols: undefined,
        rejectUnauthorized: undefined,
        checkServerIdentity: undefined,
        certificateAuthority: undefined,
        key: undefined,
        certificate: undefined,
        passphrase: undefined,
        pfx: undefined,
        ciphers: undefined,
        honorCipherOrder: undefined,
        minVersion: undefined,
        maxVersion: undefined,
        signatureAlgorithms: undefined,
        tlsSessionLifetime: undefined,
        dhparam: undefined,
        ecdhCurve: undefined,
        certificateRevocationLists: undefined
      },
      encoding: undefined,
      resolveBodyOnly: false,
      isStream: true,
      responseType: 'text',
      url: URL {
        [Symbol(context)]: URLContext {
          href: '*REMOVED*',
          origin: 'https://edge01-na.floatplane.com',
          protocol: 'https:',
          hostname: 'edge01-na.floatplane.com',
          pathname: '/Videos/fdTjYwKGQK/1080.mp4',
          search: '*REMOVED*',
          username: '',
          password: '',
          port: '',
          hash: ''
        }
      },
      pagination: {
        transform: [Function: transform],
        paginate: [Function: paginate],
        filter: [Function: filter],
        shouldContinue: [Function: shouldContinue],
        countLimit: Infinity,
        backoff: 0,
        requestLimit: 10000,
        stackAllItems: false
      },
      setHost: true,
      maxHeaderSize: undefined,
      signal: undefined,
      enableUnixSockets: true
    },
    _merging: false,
    _init: [
      {
        cookieJar: CookieJar {
          rejectPublicSuffixes: true,
          enableLooseMode: false,
          allowSpecialUseDomain: true,
          store: FileCookieStore {
            synchronous: true,
            idx: [Object],
            filePath: './db/cookies.json',
            [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)]
        },
        headers: {
          'User-Agent': 'Floatplane-Downloader/5.7.0 (Inrix, +https://github.com/Inrixia/Floatplane-Downloader), CFNetwork',
          accept: 'application/json',
          connection: 'keep-alive'
        },
        retry: {
          limit: 5,
          calculateDelay: [Function: calculateDelay],
          statusCodes: [ 429 ]
        }
      },
      { isStream: true }
    ]
  }
}

Node.js v19.8.1

Is it possible that passwords with special characters are causing this (it is working on the latest branch just fine)? Is it expected that these lines have no username and password in them from the error message from above:

          username: '',
          password: '',

Also what os are you using?

I usually use Unraid (currently on 6.12.0-rc2)

If you are still getting the error with a clean install please try running the container on your PC (non headless/containerized) and see if you get the same error and then update with results here.

Will do on my Debian machine and keep you updated.

One thing, can you please not close issues until I've answered since otherwise it's really hard to keep track for me of open issues?

Inrixia commented 1 year ago

Ah, in that case this is related to the download servers being down and isn't a major issue. Though the fact that the error is not being handled suggests that there may be a bug somewhere causing the leaky error.

And thanks I'll keep that in mind for future issues.

This can remain closed for now, once download servers are back everything should be fine.

Your client is actually logging in and fetching videos perfectly, it's just failing to download due to the download servers being down.

Inrixia commented 1 year ago

I should note that latest and dev are now identical as devs changes were released earlier today.

ich777 commented 1 year ago

Your client is actually logging in and fetching videos perfectly, it's just failing to download due to the download servers being down.

Wouldn‘t it be better to catch the error and stop for the default 5 minutes instead of trying it again instantly because the container is crashing? I can‘t imagine that I‘m the only one which is affected by the download server being down. But of course who knows, this could also be a weird coincidence.

I should note that latest and dev are now identical as devs changes were released earlier today.

I haven‘t tried the latest branch since I‘ve switched over to dev.

Inrixia commented 1 year ago

The thing is the error is being handled if you look at the beginning. The actual crash appears to be occurring after the 5th retry which is something I'll double check.

Currently noone has been able to replicate it, that said I do have an idea I'll try.

For everyone else each video does its retires backing off before giving up on the 5th attempt at which point said video won't be attempted again until the next time the downloader runs through (either after 5min or on restart).

All this being said technically speaking floatplane shouldn't be advertising download edges which are dead but that's just due to how they hastily disabled them.

I'll give the idea I have a test to see if I can replicate the issue again.

rocketeer55 commented 1 year ago

I am running into the exact same error, running on unraid, on the latest branch (just updated my container to the newest release, and deleted/recreated settings.json). I understand the edge servers are down but I would hope the container can stay running, trying every 5 minutes, until the edge servers are back up. Please let me know if there's anything I can do to help resolve/debug this issue.

mattkdoggie commented 1 year ago

After updating my container was working for a time but I am now getting this same error.

Inrixia commented 1 year ago

This was quite finicky to debug but I am fairly sure I got it. The latest dev release should have the fixes.

That said the new floatplane rate limiting has now been applied to the v3 delivery endpoint as well so properly testing the fix will take some time (5x3min = ~15min) to actually determine if it still occours.

I was not able to replicate the error at all on my end, but was able to trace it back to what I believe was causing it and fix it. Please try replicate it using the dev branch and let me know if you encounter any further crashes :)

mattkdoggie commented 1 year ago

I am still getting the error

TechLinked - TL: Apple VR Headse:                                            0% | ERR: connect ECONNREFUSED 142.44.150.245:443 Max Retries! [5/5]
Linus Tech Tips - Reacting to ou:                                            0% | ERR: connect ECONNREFUSED 142.44.150.245:443 Max Retries! [5/5]
ShortCircuit - SC: I’m giving No:                                            0% | Download Starting...
Linus Tech Tips - How to Keep Sh:                                            0% | ERR: connect ECONNREFUSED 142.44.150.245:443 Max Retries! [5/5]ShortCircuit - SC: I likea da tr:                                            0% | ERR: connect ECONNREFUSED 142.44.150.245:443 Max Retries! [5/5]node:events:490      throw er; // Unhandled 'error' event
      ^rcuit - SC: I’m giving No:                                            0% | Queued
Linus Tech Tips - How to Keep Sh:                                            0% | Download Starting...
RequestError: connect ECONNREFUSED 142.44.150.245:443                        0% | Download Starting...
    at ClientRequest.<anonymous> (file:///fp/node_modules/floatplane/node_modules/got/dist/source/core/index.js:789:107)
    at Object.onceWrapper (node:events:627:26)
    at ClientRequest.emit (node:events:524:35)
    at TLSSocket.socketErrorListener (node:_http_client:495:9)
    at TLSSocket.emit (node:events:512: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)
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1532:16)
Emitted 'error' event at:
    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) {
  input: undefined,
  code: 'ECONNREFUSED',
  timings: {
    start: 1679972220448,
    socket: 1679972220449,
    lookup: 1679972223484,
    connect: undefined,
    secureConnect: undefined,
    upload: undefined,
    response: undefined,
    end: undefined,
    error: 1679972223532,
    abort: undefined,
    phases: {
      wait: 1,
      dns: 3035,
      tcp: undefined,
      tls: undefined,
      request: undefined,
      firstByte: undefined,
      download: undefined,
      total: 3084
    }
  },
  options: Options {
    _unixOptions: undefined,
    _internals: {
      request: undefined,
      agent: { http: undefined, https: undefined, http2: undefined },
      h2session: undefined,
      decompress: true,
      timeout: {
        connect: undefined,
        lookup: undefined,
        read: undefined,
        request: undefined,
        response: undefined,
        secureConnect: undefined,
        send: undefined,
        socket: undefined
      },
      prefixUrl: '',
      body: undefined,
      form: undefined,
      json: undefined,
      cookieJar: CookieJar {
        rejectPublicSuffixes: true,
        enableLooseMode: false,
        allowSpecialUseDomain: true,
        store: FileCookieStore {
          synchronous: true,
          idx: { 'floatplane.com': [Object] },
          filePath: './db/cookies.json',
          [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)]
      },
      ignoreInvalidCookies: false,
      searchParams: undefined,
      dnsLookup: undefined,
      dnsCache: undefined,
      context: {},
      hooks: {
        init: [],
        beforeRequest: [],
        beforeError: [],
        beforeRedirect: [],
        beforeRetry: [],
        afterResponse: []
      },
      followRedirect: true,
      maxRedirects: 10,
      cache: undefined,
      throwHttpErrors: true,
      username: '',
      password: '',
      http2: false,
      allowGetBody: false,
      headers: {
        'user-agent': 'Floatplane-Downloader/5.7.0 (Inrix, +https://github.com/Inrixia/Floatplane-Downloader), CFNetwork',
        accept: 'application/json',
        connection: 'keep-alive',
        'accept-encoding': 'gzip, deflate, br',
        cookie: '*REMOVED*'
      },
      methodRewriting: false,
      dnsLookupIpVersion: undefined,
      parseJson: [Function: parse],
      stringifyJson: [Function: stringify],
      retry: {
        limit: 5,
        methods: [ 'GET', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'TRACE' ],
        statusCodes: [ 429 ],
        errorCodes: [
          'ETIMEDOUT',
          'ECONNRESET',
          'EADDRINUSE',
          'ECONNREFUSED',
          'EPIPE',
          'ENOTFOUND',
          'ENETUNREACH',
          'EAI_AGAIN'
        ],
        maxRetryAfter: undefined,
        calculateDelay: [Function: calculateDelay],
        backoffLimit: Infinity,
        noise: 100
      },
      localAddress: undefined,
      method: 'GET',
      createConnection: undefined,
      cacheOptions: {
        shared: undefined,
        cacheHeuristic: undefined,
        immutableMinTimeToLive: undefined,
        ignoreCargoCult: undefined
      },
      https: {
        alpnProtocols: undefined,
        rejectUnauthorized: undefined,
        checkServerIdentity: undefined,
        certificateAuthority: undefined,
        key: undefined,
        certificate: undefined,
        passphrase: undefined,
        pfx: undefined,
        ciphers: undefined,
        honorCipherOrder: undefined,
        minVersion: undefined,
        maxVersion: undefined,
        signatureAlgorithms: undefined,
        tlsSessionLifetime: undefined,
        dhparam: undefined,
        ecdhCurve: undefined,
        certificateRevocationLists: undefined
      },
      encoding: undefined,
      resolveBodyOnly: false,
      isStream: true,
      responseType: 'text',
      url: URL {
        [Symbol(context)]: URLContext {
          href: '*REMOVED*',
          origin: 'https://edge01-na.floatplane.com',
          protocol: 'https:',
          hostname: 'edge01-na.floatplane.com',
          pathname: '/Videos/fdTjYwKGQK/2160.mp4',
          search: '*REMOVED*',
          username: '',
          password: '',
          port: '',
          hash: ''
        }
      },
      pagination: {
        transform: [Function: transform],
        paginate: [Function: paginate],
        filter: [Function: filter],
        shouldContinue: [Function: shouldContinue],
        countLimit: Infinity,
        backoff: 0,
        requestLimit: 10000,
        stackAllItems: false
      },
      setHost: true,
      maxHeaderSize: undefined,
      signal: undefined,
      enableUnixSockets: true
    },
    _merging: false,
    _init: [
      {
        cookieJar: CookieJar {
          rejectPublicSuffixes: true,
          enableLooseMode: false,
          allowSpecialUseDomain: true,
          store: FileCookieStore {
            synchronous: true,
            idx: [Object],
            filePath: './db/cookies.json',
            [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)]
        },
        headers: {
          'User-Agent': 'Floatplane-Downloader/5.7.0 (Inrix, +https://github.com/Inrixia/Floatplane-Downloader), CFNetwork',
          accept: 'application/json',
          connection: 'keep-alive'
        },
        retry: {
          limit: 5,
          calculateDelay: [Function: calculateDelay],
          statusCodes: [ 429 ]
        }
      },
      { isStream: true }
    ]
  }
}

Node.js v19.8.1
Inrixia commented 1 year ago

Yep in retrospect the fix I deployed won't do anything.

When I get the chance I will test this on Linux to see if I can replicate it. As it stands the error should be caught and handled and in all my tests is so hopefully it's OS specific and shows on Linux.

ich777 commented 1 year ago

@Inrixia seems like it's doing something but not entirely sure:

(node:8) ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as those might change in a future version of Node.js.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:8) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(node:8) ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as those might change in a future version of Node.js.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:8) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
> Ffmpeg binary missing! Downloading... Done!

> Fetching user subscriptions... Done!

> Fetching latest videos from [LTT Supporter]... Fetched 5 videos! Skipped 0.
> Processing 6 videos...
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - Downloading...
Linus Tech Tips - Reacting to our audience’s worst tech takes - Downloading...
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 0s [0/5]
Linus Tech Tips - Reacting to our audience’s worst tech takes - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 0s [0/5]
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - Downloading...
Linus Tech Tips - Reacting to our audience’s worst tech takes - Downloading...

However it is currently hanging at Downloading... but I think that's due to that they disabled their download function.

EDIT: It now takes way longer to do something and I get a different error:

TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - ERR: Response code 429 (Too Many Requests) - Retrying in 0s [0/5]
Linus Tech Tips - Reacting to our audience’s worst tech takes - Downloading...
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - Downloading...
Inrixia commented 1 year ago

The new floatplane api changes rate limit access to the delivery endpoint for downloads to at most 2 requests per minute. After which your timed out for 5 minutes.

The latest version of the floatplane api library (which the downloader uses) handles this by waiting the time specified by the floatplane api when timed out to retry requests.

This means that once the ratelimit is hit the downloader will be waiting on the response to it's last delivery api call until the timeout is complete. This is async though so some other stuff can continue while this happens, but generally speaking if you hit the timeout everything will be waiting ~5min to continue.

This ofc does not remove the error that is the cause of this issue, said error appears to occur after the 5th retry attempt on the downloader side (not the api side).

It just means that to get to the finale retry on the downloader itl take at most 5x5 or ~25min probably less to hit the api 5 times, attempt to download and fail causing the issue.

Inrixia commented 1 year ago

Honestly if I cannot replicate this on Linux I don't know if itl be possible to fix as the error being thrown should be handled and is in all of my tests I have done so far.

So for it not to be is strange, as I said before I'm hoping the behavior is a Linux specific bug that I can debug.

Inrixia commented 1 year ago

All that being said if it wasn't clear it's not hanging on "Downloading..." it's just stuck waiting on the api response which itself is delayed 5min due to more than 2 calls to the delivery endpoint having happened within a minute.

ich777 commented 1 year ago

Is their download function still offline, correct? If yes I think it would be better to test when the downloads actually are working again.

Inrixia commented 1 year ago

Ironically when downloads are back it's unlikely that the error will ever appear so the best time to try diagnose it is now. As for if it will be an actual issue once downloads are back really depends on if the error only occurs on the 5th retry for download stream failures. Or if the error can occur on the 5th retry of any video download failure.

ich777 commented 1 year ago

I now have limited the downloads to two and I get this, I don't think that it catches the error properly since I don't see the message with waiting 5 minutes, it just restarted as it looks like to me, I will do some more testing and report back:

> Fetching latest videos from [LTT Supporter]... Fetched 1 videos! Skipped 0.
> Processing 2 videos...
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - Downloading...
Linus Tech Tips - Reacting to our audience’s worst tech takes - Downloading...
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 0s [0/5]
Linus Tech Tips - Reacting to our audience’s worst tech takes - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 0s [0/5]
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - Downloading...
Linus Tech Tips - Reacting to our audience’s worst tech takes - Downloading...
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 1s [1/5]
Linus Tech Tips - Reacting to our audience’s worst tech takes - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 1s [1/5]
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - Downloading...
Linus Tech Tips - Reacting to our audience’s worst tech takes - Downloading...
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - ERR: Response code 429 (Too Many Requests) - Retrying in 2s [2/5]
Linus Tech Tips - Reacting to our audience’s worst tech takes - ERR: Response code 429 (Too Many Requests) - Retrying in 2s [2/5]
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - Downloading...
Linus Tech Tips - Reacting to our audience’s worst tech takes - Downloading...
Linus Tech Tips - Reacting to our audience’s worst tech takes - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 3s [3/5]
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 3s [3/5]
Linus Tech Tips - Reacting to our audience’s worst tech takes - Downloading...
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - Downloading...
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - ERR: Response code 429 (Too Many Requests) - Retrying in 4s [4/5]
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - Downloading...
Linus Tech Tips - Reacting to our audience’s worst tech takes - ERR: Response code 429 (Too Many Requests) - Retrying in 4s [4/5]
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - ERR: Response code 429 (Too Many Requests) Max Retries! [5/5]
Linus Tech Tips - Reacting to our audience’s worst tech takes - Downloading...
Linus Tech Tips - Reacting to our audience’s worst tech takes - ERR: connect ECONNREFUSED 142.44.150.245:443 Max Retries! [5/5]

> Fetching latest videos from [LTT Supporter]... Fetched 1 videos! Skipped 0.
> Processing 2 videos...
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - Downloading...
Linus Tech Tips - Reacting to our audience’s worst tech takes - Downloading...
Linus Tech Tips - Reacting to our audience’s worst tech takes - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 0s [0/5]
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 0s [0/5]
Linus Tech Tips - Reacting to our audience’s worst tech takes - Downloading...
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - Downloading...
Inrixia commented 1 year ago

That is it behaving correctly. Can you try set the video count back to what you had before and see if the error returns?

Also what setting are you changing? videosToSearch?

ich777 commented 1 year ago

Can you try set the video count back to what you had before and see if the error returns?

Also what setting are you changing? videosToSearch?

Yes and yes, now I've set it back to 5 and wait, will report back when I know more.

ich777 commented 1 year ago

Sadly enough it's the same:

(node:8) ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as those might change in a future version of Node.js.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:8) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
> Fetching user subscriptions... Done!

> Fetching latest videos from [LTT Supporter]... Fetched 5 videos! Skipped 0.
> Processing 6 videos...
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - Downloading...
Linus Tech Tips - Reacting to our audience’s worst tech takes - Downloading...
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 0s [0/5]
Linus Tech Tips - Reacting to our audience’s worst tech takes - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 0s [0/5]
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - Downloading...
Linus Tech Tips - Reacting to our audience’s worst tech takes - Downloading...
Linus Tech Tips - Reacting to our audience’s worst tech takes - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 1s [1/5]
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 1s [1/5]
Linus Tech Tips - Reacting to our audience’s worst tech takes - Downloading...
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - Downloading...
Linus Tech Tips - Reacting to our audience’s worst tech takes - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 2s [2/5]
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 2s [2/5]
Linus Tech Tips - Reacting to our audience’s worst tech takes - Downloading...
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - Downloading...
Linus Tech Tips - Reacting to our audience’s worst tech takes - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 3s [3/5]
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 3s [3/5]
Linus Tech Tips - Reacting to our audience’s worst tech takes - Downloading...
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - Downloading...
Linus Tech Tips - Reacting to our audience’s worst tech takes - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 4s [4/5]
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 4s [4/5]
Linus Tech Tips - Reacting to our audience’s worst tech takes - Downloading...
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - Downloading...
TechLinked - TL: Apple VR Headset, France bans apps, Android malware + more! - ERR: Response code 429 (Too Many Requests) Max Retries! [5/5]
ShortCircuit - SC: I likea da truck - Rivian R1T - Downloading...
ShortCircuit - SC: I likea da truck - Rivian R1T - ERR: Response code 429 (Too Many Requests) - Retrying in 0s [0/5]
ShortCircuit - SC: I likea da truck - Rivian R1T - Downloading...
ShortCircuit - SC: I likea da truck - Rivian R1T - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 1s [1/5]
Linus Tech Tips - Reacting to our audience’s worst tech takes - ERR: connect ECONNREFUSED 142.44.150.245:443 Max Retries! [5/5]
Linus Tech Tips - How to Keep Sharing your Netflix - Downloading...
ShortCircuit - SC: I likea da truck - Rivian R1T - Downloading...
Linus Tech Tips - How to Keep Sharing your Netflix - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 0s [0/5]ShortCircuit - SC: I likea da truck - Rivian R1T - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 2s [2/5]
Linus Tech Tips - How to Keep Sharing your Netflix - Downloading...
ShortCircuit - SC: I likea da truck - Rivian R1T - Downloading...
ShortCircuit - SC: I likea da truck - Rivian R1T - ERR: Response code 429 (Too Many Requests) - Retrying in 3s [3/5]
Linus Tech Tips - How to Keep Sharing your Netflix - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 1s [1/5]Linus Tech Tips - How to Keep Sharing your Netflix - Downloading...
ShortCircuit - SC: I likea da truck - Rivian R1T - Downloading...
ShortCircuit - SC: I likea da truck - Rivian R1T - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 4s [4/5]
Linus Tech Tips - How to Keep Sharing your Netflix - ERR: connect ECONNREFUSED 142.44.150.245:443 - Retrying in 2s [2/5]Linus Tech Tips - How to Keep Sharing your Netflix - Downloading...
ShortCircuit - SC: I likea da truck - Rivian R1T - Downloading...
ShortCircuit - SC: I likea da truck - Rivian R1T - ERR: Response code 429 (Too Many Requests) Max Retries! [5/5]
ShortCircuit - SC: I’m giving Nothing one more chance… - Nothing Ear (2) + dbrand billboard - Downloading...
ShortCircuit - SC: I’m giving Nothing one more chance… - Nothing Ear (2) + dbrand billboard - ERR: Response code 429 (Too Many Requests) - Retrying in 0s [0/5]
Linus Tech Tips - How to Keep Sharing your Netflix - ERR: Response code 429 (Too Many Requests) - Retrying in 3s [3/5]
ShortCircuit - SC: I’m giving Nothing one more chance… - Nothing Ear (2) + dbrand billboard - Downloading...
Linus Tech Tips - How to Keep Sharing your Netflix - Downloading...
Linus Tech Tips - How to Keep Sharing your Netflix - ERR: Response code 429 (Too Many Requests) - Retrying in 4s [4/5]
node:events:490
      throw er; // Unhandled 'error' event
      ^

RequestError: connect ECONNREFUSED 142.44.150.245:443
    at ClientRequest.<anonymous> (file:///fp/node_modules/floatplane/node_modules/got/dist/source/core/index.js:789:107)    at Object.onceWrapper (node:events:627:26)
    at ClientRequest.emit (node:events:524:35)
    at TLSSocket.socketErrorListener (node:_http_client:495:9)
    at TLSSocket.emit (node:events:512: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)
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1532:16)
Emitted 'error' event at:
    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) {
  input: undefined,
  code: 'ECONNREFUSED',
  timings: {
    start: 1680005802339,
    socket: 1680005802341,
    lookup: 1680005802348,
    connect: undefined,
    secureConnect: undefined,
    upload: undefined,
    response: undefined,
    end: undefined,
    error: 1680005802455,
    abort: undefined,
    phases: {
      wait: 2,
      dns: 7,
      tcp: undefined,
      tls: undefined,
      request: undefined,
      firstByte: undefined,
      download: undefined,
      total: 116
    }
  },
  options: Options {
    _unixOptions: undefined,
    _internals: {
      request: undefined,
      agent: { http: undefined, https: undefined, http2: undefined },
      h2session: undefined,
      decompress: true,
      timeout: {
        connect: undefined,
        lookup: undefined,
        read: undefined,
        request: undefined,
        response: undefined,
        secureConnect: undefined,
        send: undefined,
        socket: undefined
      },
      prefixUrl: '',
      body: undefined,
      form: undefined,
      json: undefined,
      cookieJar: CookieJar {
        rejectPublicSuffixes: true,
        enableLooseMode: false,
        allowSpecialUseDomain: true,
        store: FileCookieStore {
          synchronous: true,
          idx: { 'floatplane.com': [Object] },
          filePath: './db/cookies.json',
          [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)]
      },
      ignoreInvalidCookies: false,
      searchParams: undefined,
      dnsLookup: undefined,
      dnsCache: undefined,
      context: {},
      hooks: {
        init: [],
        beforeRequest: [],
        beforeError: [],
        beforeRedirect: [],
        beforeRetry: [],
        afterResponse: []
      },
      followRedirect: true,
      maxRedirects: 10,
      cache: undefined,
      throwHttpErrors: true,
      username: '',
      password: '',
      http2: false,
      allowGetBody: false,
      headers: {
        'user-agent': 'Floatplane-Downloader/5.7.0 (Inrix, +https://github.com/Inrixia/Floatplane-Downloader), CFNetwork',
        accept: 'application/json',
        connection: 'keep-alive',
        'accept-encoding': 'gzip, deflate, br',
        cookie: '**REMOVED**'
      },
      methodRewriting: false,
      dnsLookupIpVersion: undefined,
      parseJson: [Function: parse],
      stringifyJson: [Function: stringify],
      retry: {
        limit: 5,
        methods: [ 'GET', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'TRACE' ],
        statusCodes: [ 429 ],
        errorCodes: [
          'ETIMEDOUT',
          'ECONNRESET',
          'EADDRINUSE',
          'ECONNREFUSED',
          'EPIPE',
          'ENOTFOUND',
          'ENETUNREACH',
          'EAI_AGAIN'
        ],
        maxRetryAfter: undefined,
        calculateDelay: [Function: calculateDelay],
        backoffLimit: Infinity,
        noise: 100
      },
      localAddress: undefined,
      method: 'GET',
      createConnection: undefined,
      cacheOptions: {
        shared: undefined,
        cacheHeuristic: undefined,
        immutableMinTimeToLive: undefined,
        ignoreCargoCult: undefined
      },
      https: {
        alpnProtocols: undefined,
        rejectUnauthorized: undefined,
        checkServerIdentity: undefined,
        certificateAuthority: undefined,
        key: undefined,
        certificate: undefined,
        passphrase: undefined,
        pfx: undefined,
        ciphers: undefined,
        honorCipherOrder: undefined,
        minVersion: undefined,
        maxVersion: undefined,
        signatureAlgorithms: undefined,
        tlsSessionLifetime: undefined,
        dhparam: undefined,
        ecdhCurve: undefined,
        certificateRevocationLists: undefined
      },
      encoding: undefined,
      resolveBodyOnly: false,
      isStream: true,
      responseType: 'text',
      url: URL {
        [Symbol(context)]: URLContext {
          href: '**REMOVED**',
          origin: 'https://edge01-na.floatplane.com',
          protocol: 'https:',
          hostname: 'edge01-na.floatplane.com',
          pathname: '/Videos/fdTjYwKGQK/1080.mp4',
          search: '**REMOVED**',
          username: '',
          password: '',
          port: '',
          hash: ''
        }
      },
      pagination: {
        transform: [Function: transform],
        paginate: [Function: paginate],
        filter: [Function: filter],
        shouldContinue: [Function: shouldContinue],
        countLimit: Infinity,
        backoff: 0,
        requestLimit: 10000,
        stackAllItems: false
      },
      setHost: true,
      maxHeaderSize: undefined,
      signal: undefined,
      enableUnixSockets: true
    },
    _merging: false,
    _init: [
      {
        cookieJar: CookieJar {
          rejectPublicSuffixes: true,
          enableLooseMode: false,
          allowSpecialUseDomain: true,
          store: FileCookieStore {
            synchronous: true,
            idx: [Object],
            filePath: './db/cookies.json',
            [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)]
        },
        headers: {
          'User-Agent': 'Floatplane-Downloader/5.7.0 (Inrix, +https://github.com/Inrixia/Floatplane-Downloader), CFNetwork',
          accept: 'application/json',
          connection: 'keep-alive'
        },
        retry: {
          limit: 5,
          calculateDelay: [Function: calculateDelay],
          statusCodes: [ 429 ]
        }
      },
      { isStream: true }
    ]
  }
}
Inrixia commented 1 year ago

I cannot reproduce this or determine why the error is throwing. The best case I have for what's causing it is that the error is occurring just before proper error handling is around but, but this itself is unlikely at best and may be incorrect.

As it stands this should be resolved once download servers are back. And with the latest retry/delay handling even if the downloader is restarting when this error occurs it will be stuck retrying for a long time against the floatplane api meaning no excessive requests or cpu usage.

Since I cant reliably reproduce the issue, it no longer causes excessive requests or cpu usage, and it should go away once normal functionality returns. I'm going to close this.

If anyone encounters this error once download servers are back please re-open this issue and leave a comment with details.