plex icon indicating copy to clipboard operation
plex copied to clipboard

Hangs endlessly on .connect()

Open treyturner opened this issue 1 year ago • 0 comments

Hi, I'd really like to use this wrapper, but I can't seem to get a basic connection working. I have a 'managed Plex home', which means I have a kid's account attached to mine, and I have to type in a 4 digit code to login to my account. Is this configuration supported?

If I create a MyPlexAccount with only username and password, I get

1212 |         this[kStopReading] = true;
1213 |         if (!(error instanceof RequestError)) {
1214 |             error = new RequestError(error.message, error, this);
1215 |         }
1216 |         const typedError = error;
1217 |         const { response } = typedError;
                    ^
RequestError: Attempted to assign to readonly property.
 code: "ERR_GOT_REQUEST_ERROR"

      at _beforeError (/home/tturner/wsldev/plex-playlist-feature-gaps/node_modules/got/dist/source/core/index.js:1217:14)
      at /home/tturner/wsldev/plex-playlist-feature-gaps/node_modules/got/dist/source/core/index.js:951:35
      at asyncFunctionResume (native:1:1)
      at promiseReactionJobWithoutPromiseUnwrapAsyncContext (native:1:1)
      at promiseReactionJob (native:1:1)
      at processTicksAndRejections (native:1:1)
      at /home/tturner/wsldev/plex-playlist-feature-gaps/node_modules/got/dist/source/core/index.js:1271:29
      at _onResponseBase (/home/tturner/wsldev/plex-playlist-feature-gaps/node_modules/got/dist/source/core/index.js:778:27)
      at /home/tturner/wsldev/plex-playlist-feature-gaps/node_modules/got/dist/source/core/index.js:948:24
      at _onResponse (/home/tturner/wsldev/plex-playlist-feature-gaps/node_modules/got/dist/source/core/index.js:946:23)
      at /home/tturner/wsldev/plex-playlist-feature-gaps/node_modules/got/dist/source/core/index.js:962:23
      at emit (native:1:1)
      at /home/tturner/wsldev/plex-playlist-feature-gaps/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20
      at node:1:887

If I supply a token I retrieved via XML view, with or without a password, I get an endless hang when I await new MyPlexAccount().connect(). I've tried using internally and externally resolving hostnames as well as http and https.

When I tcpdump, I can see HTTPS calls that end up in Amazon EC2, presumably the Plex gateway, but they stop after a couple of seconds and the .connect() never completes.

Thanks for your time reading and your work on the wrapper.

treyturner avatar Feb 19 '24 04:02 treyturner