cglatot/pasta

Unknown Error (0) when accessing via URL

coralcarl opened this issue · 12 comments

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

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?

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.

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.

It seems to be requesting via https regardless?
image
image

Console:
image

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?

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

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

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.

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.