Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown Error (0) when accessing via URL #50

Open
coralcarl opened this issue Dec 5, 2021 · 12 comments
Open

Unknown Error (0) when accessing via URL #50

coralcarl opened this issue Dec 5, 2021 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@coralcarl
Copy link

coralcarl commented Dec 5, 2021

I have a local server and I can connect per webapp over http without problems.

When I try via login the server shows up but I can't select a library and sometimes the server crashes.

Via URL/token on the http version I get an unknown error:
image

@coralcarl coralcarl added the bug Something isn't working label Dec 5, 2021
@cglatot
Copy link
Owner

cglatot commented Dec 5, 2021

Hmm... That is an odd one. From the machine where you are trying to use PASTA, if you try going to http://192.168.0.178:32400 in a web browser, does that take you to plex okay?

@cglatot cglatot self-assigned this Dec 5, 2021
@coralcarl
Copy link
Author

I have a server running on a RPi 4 and am using PASTA on my desktop. I can access the library perfectly fine with the address.

@coralcarl coralcarl changed the title Unknown Error (0) Unknown Error (0) when accessing via http URL Dec 5, 2021
@coralcarl coralcarl changed the title Unknown Error (0) when accessing via http URL Unknown Error (0) when accessing via URL Dec 5, 2021
@cglatot
Copy link
Owner

cglatot commented Dec 5, 2021

I can access the library perfectly fine with the address.

From the same desktop that you're trying to use PASTA?

If so, go to PASTA and bring up the Dev Tools (Ctrl + Shift + I on Chrome), go to the Network Tab. Right before you click on "Connect to Plex", at the top left of the Network tab click the "clear" button. (On Chrome it looks like a circle with a line through it)

Click on "Connect to Plex" and then see if there are any errors in the network tab (they'll show up red).

Also check on the "Console" tab to check for any errors.

@coralcarl
Copy link
Author

It seems to be requesting via https regardless?
image
image

Console:
image

@cglatot
Copy link
Owner

cglatot commented Dec 5, 2021

Hmm, that is very strange. I just tried it over http and it worked fine, didn't try to go over https. Just to make sure, are you loading PASTA via http as well?

To go back to the main point, can you try the same thing with the network tab and the console tab when trying via the Login via Plex method instead of the token?

@coralcarl
Copy link
Author

coralcarl commented Dec 5, 2021

Login is fine, still trying to request via secure connection. I am 100% on the http version.
image

image

MS Edge same behavior but I just deleted the domain security policy for PASTA, which appears to have fixed the forced https requests, still getting no response and an error though:
image

With login when clicking on the server:
image

@lutjasuki
Copy link

lutjasuki commented Feb 10, 2022

Hi.

I've just started getting the same error in chrome for windows 10. It was working a couple of days ago and I think chrome has updated since then

the console error is: (4) Ensure private network requests are made from secure contexts
with four blocked requests listed "

Request Status Resource Address Initiator Address Initiator Context
sections/ blocked Private Public insecure
sections/ blocked   Public insecure
sections/ blocked Private Public insecure
sections/ blocked   Public insecure
" I was able to get around the error by logging in (via LAN address and token) using firefox instead (and making sure that the url for pastatool was http

@cglatot
Copy link
Owner

cglatot commented Apr 15, 2022

Hmmmm, yeah, Browsers are constantly updating to prevent insecure access and it's becoming a headache to try to maintain. If you untick the "Connect using local IP address" box it seems to work fine. Likewise, over https it works fine too.

I'll see if I can do something about the insecure local access, but I wouldn't hold my breath.

@Mindstorm1750
Copy link

This is not really a solution to the problem but a work around for users, if you are using chrome you can use this flag chrome://flags/#block-insecure-private-network-requests
and set it to disabled, but PLEASE once you are done put it back to default as it is a security issue if left disabled.

@ukdtom
Copy link

ukdtom commented Dec 9, 2022

Could be wrong here, but my guess is that OP configured PMS to only accept secure connections, so a redirect to https will happen.

When doing so, PMS cert is issued to xxxx.plex.direct and not to an IP address, thus making the cert invalid, and that's what the code complains about

Ref: https://stackoverflow.com/questions/25723415/bypassing-ssl-certificate-error-in-jquery-and-ajax

Below is not tested, since as already mentioned, I'm not a Pasta user, just stumbled across a Reddit thread, and then looked in the code ;)

Ref: Reddit Thread: https://www.reddit.com/r/PleX/comments/zh2r38/is_pastatool_not_working/

As a work around, OP could browse normally to https://app.plex.tv/

Then inspect a media, and show the xml
Ref: https://support.plex.tv/articles/201998867-investigate-media-information-and-formats/

When looking at the XML page in the browser, it should show a valid url, that could be used instead of an IP address

image

@slfight
Copy link

slfight commented Dec 10, 2022

Could be wrong here, but my guess is that OP configured PMS to only accept secure connections, so a redirect to https will happen.

When doing so, PMS cert is issued to xxxx.plex.direct and not to an IP address, thus making the cert invalid, and that's what the code complains about

Ref: https://stackoverflow.com/questions/25723415/bypassing-ssl-certificate-error-in-jquery-and-ajax

Below is not tested, since as already mentioned, I'm not a Pasta user, just stumbled across a Reddit thread, and then looked in the code ;)

Ref: Reddit Thread: https://www.reddit.com/r/PleX/comments/zh2r38/is_pastatool_not_working/

As a work around, OP could browse normally to https://app.plex.tv/

Then inspect a media, and show the xml Ref: https://support.plex.tv/articles/201998867-investigate-media-information-and-formats/

When looking at the XML page in the browser, it should show a valid url, that could be used instead of an IP address

image

Hello, I've tried this method and it doesn't work. I've also tried removing ":32400" and that also doesn't work. I'm using PastaTool via the same machine the server is on. I've also tried using another pc on the same network, same login, to fiddle but also can't access.

I've tried restarting my computer, clearing cookies. Nothing works. I've tried 127.0.0.1 and I can access app.plex.tv that way but doing the same using this method also doesn't work on PastaTool.

None of my libraries show but I can "see" the server if I'm logged in. It doesn't work via Firefox. Oddly Chrome semi-works and can see server name but it cannot see libraries.

I have also tried the Chrome flags suggestion in this thread but that doesn't work for me.

Untitled

@sgtsquiggs
Copy link

I had the same error:

  1. I initially put in the wrong URL.
  2. It continued to use that URL regardless of what I input (verified via inspector).

Refreshing the page fixed it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants