Giter Club home page Giter Club logo

Comments (15)

cglatot avatar cglatot commented on June 19, 2024

Hmm, that is an odd one - typically if you can login via token, you can also log via the PIN. Can you try to revoke the PIN by clicking the "Click here to logout" and then generate a new PIN again? This should all be done via the HTTP site.

If that still doesn't work, then can you press F12 on the page to bring up the Dev tools, then refresh the page? Then go to "Console" and "Network" tabs and see if you can see any errors or warnings - they should be in red and yellow.

As for the https site error - that is pretty normal. Unfortunately the REST APIs only seem to be able to interact with Plex via HTTP. I'm hoping to find something that will allow connection over HTTPS as it is obviously more secure, but I just haven't had the time to dive into this myself yet.

from pasta.

Jomo94 avatar Jomo94 commented on June 19, 2024

I've tried revoking and generating a new one several times before submitting, happens every time.

I did the dev debugging, I see two errors (censoring added):
Network

from pasta.

cglatot avatar cglatot commented on June 19, 2024

Does the Console tab show you any errors?

If you click on the 3 entry from the bottom - the one with "servers.xml?X-Plex-Client-......" - that should take you into more details. You should see somewhere a "response". Does yours look something like below (I've redacted all the info)?

<MediaContainer friendlyName="yourPlexName" identifier="com.plexapp.plugins.myplex" machineIdentifier="longstringofnumbersandletters" size="1">
<Server accessToken="morenumbersletters" name="servername" address="x.x.x.x" port="xxxxx" version="1.20.1.3213-67a1137a9" scheme="http" host="x.x.x.x" localAddresses="x.x.x.x" machineIdentifier="longstringofstuffagain" createdAt="1474132283" updatedAt="1598581063" owned="1" synced="0"/>
</MediaContainer>

Looking at the network entries, I would expect you to have a similar response as above. But then when it's trying to get your libraries (the lines for /library/sections/) it's encountering a CORS issue - which is usually when you try to access an HTTPS service from a HTTP site. So if you let me know if you get something similar to above on the servers.xml? line then hopefully that will help - especially the scheme="http" part.

Finally - are you accessing the site directly at pastatool.com? Or are you hosting it yourself via docker / locally?

from pasta.

Jomo94 avatar Jomo94 commented on June 19, 2024

<?xml version="1.0" encoding="UTF-8"?> <MediaContainer friendlyName="myPlex" identifier="com.plexapp.plugins.myplex" machineIdentifier="<REDACTED>" size="1"> <Server accessToken="<REDACTED>" name="<REDACTED>" address="<REDACTED>" port="<REDACTED>" version="1.20.1.3252-a78fef9a9" scheme="http" host="<REDACTED>" localAddresses="<REDACTED>" machineIdentifier="<REDACTED>" createdAt="1560914360" updatedAt="1598637686" owned="1" synced="0"/> </MediaContainer>

Here you go, looks like it is http.

I was using the pastatool site directly. Though I just fetched the docker version and it has the same issue.

from pasta.

cglatot avatar cglatot commented on June 19, 2024

Hmm, okay, the authorisation process is going fine then, so it must be when trying to get the libraries from your server.

Can you paste the response you get from the /library/sections call?

Also, if you go to the Console tab, do you see any error messages there?

Apologies for the delayed response, work/life recently hasn't left me with much free time.

from pasta.

Jomo94 avatar Jomo94 commented on June 19, 2024

No need to apologize for taking some time for something you do on your free time, lol.
Anyway, no response to show and there is an error message, see images:

Response
ConesoleError

from pasta.

cglatot avatar cglatot commented on June 19, 2024

Hmmm, this one is really stumping me.

I would expect the CORS Error to be caused by both methods because they connect in the same way once they have the IP address. So the only thing I can think of now is that somehow the PIN method is trying to use a different IP (or https vs http) than you are entering in manually.

You mentioned that this is working when you use the X-Plex-Token and IP address, right? Is the IP address that you put in manually the same one that has been blanked out in your latest screenshot from the Console error? And is the IP address that is being reported in the console http, or https?

from pasta.

Jomo94 avatar Jomo94 commented on June 19, 2024

They do not match, no. The one I enter manually is one like you would expect local IP to be. "192.168.X.X", the one it is trying to reach via pin matches with the one tied to my google domain name instead. Also the one I enter manually with the token is reporting as http, not https

from pasta.

cglatot avatar cglatot commented on June 19, 2024

Ah ha!!!! Now we're getting somewhere!!

From what you redacted here - there are 2 fields: address and host. Do they both show your google domain name? or does one of them show your IP address? If so, which one?

from pasta.

Jomo94 avatar Jomo94 commented on June 19, 2024

Address and Host both give the ip address to my domain. There is another field, local addresses, that gives my local address that matches what I enter manually. Except it doesn't end with the port, instead it ends with a comma and some more numbers.

from pasta.

cglatot avatar cglatot commented on June 19, 2024

Wait..... is your plex server available outside your network? Or only on LAN?

from pasta.

Jomo94 avatar Jomo94 commented on June 19, 2024

Yes, it is available outside of my network

from pasta.

cglatot avatar cglatot commented on June 19, 2024

Hmmmm, I'm back to being stumped then!

Would you be willing to create an empty library on your Plex server and share it with me? (Plex name: cglatot) This wouldn't give me access to anything else on your Plex, but would let me see the IP address.

Alternatively, could you email me all the details / screenshots I've asked for so far but not redacted? You can comment out machineIdentifier and access tokens, but at this point I think I need to see the IP addresses, etc to continue. If you choose this option you can mail me at: [email protected]

If you don't want to do either of those, then can you describe exactly how you've got your Plex setup / configured? (E.g. I have mines running in a docker container on unraid, served through a reverse proxy)
You're the only person I know of that's having this issue, and I can't replicate it so far - but I would like to fix it if possible.

from pasta.

Jomo94 avatar Jomo94 commented on June 19, 2024

Invite sent and email with some details sent.

from pasta.

cglatot avatar cglatot commented on June 19, 2024

@Jomo94 and I continued this privately via email. Adding this description here as help to users in the future.

The issue was that Jomo94 could not connect to their reverse proxy IP from the same network. So when using the PIN authentication from outside the network, it works successfully.

To address this I added in a function to connect using the local IP address when authenticated via PIN. The release is here: https://github.com/cglatot/pasta/releases/tag/1.4.2

If this still does not work, ensure that your internal PORT is the same as your external PORT (or vice-versa), as this tool will only use the port that Plex.tv is aware of (usually the external).

from pasta.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.