gregchak / plex-playlist-import

Windows application for importing playlists into PLEX
GNU General Public License v3.0
23 stars 2 forks source link

Errors occurred while processing request #6

Open Roshri opened 2 years ago

Roshri commented 2 years ago

Hi! I just discovered this program and I'm trying it for the first time So I could install it properly, launched it and filled in all the data, but when I try to import the playlist it just doesn't work.

It gives me the following error "Errors occurred while processing request. An error occurred while sending the request"

The path to playlist file is an absolute path starting with my drive letter. All the lines in the .m3u are also structured like this, for example

E:\Music\Animu\IDOLM@STER\Cinderella Master\[2020-2020] STARLIGHT MASTER GOLD RUSH\[2020.09.16] THE IDOLM@STER CINDERELLA GIRLS STARLIGHT MASTER GOLD RUSH! 01 Go Just Go! [COCC-17831]\02.Go Just Go! (M@STER VERSION) 夢見りあむソロ・リミックス.mp3

gregchak commented 2 years ago

From the error message it seems like the URL may not be correct. Make sure you include the port number in the URL if applicable for your PMS configuration. You'll know the URL is correct by using it in your browser. It should open up PLEX.

Roshri commented 2 years ago

The url is the default one, localhost at the default 32400 port, when copying it to a web browser it does open the Plex web page too Is there a way to view logs or something to find about this error?

gregchak commented 2 years ago

I was just thinking that and realizing that I hadn't put in any logging. I will make that update. The only thing shown to the user is the exception message which, in this context, isn't all that helpful.

gregchak commented 2 years ago

Release 1.1.0.0 adds ability to write more detailed error information to log.

gregchak commented 2 years ago

Logs and the JSON used to load the form will be located here: (adjust for your username) C:\Users\{username}\AppData\Local\Packages\ChakFrost.PlexPlaylistImport_{letters and numbers}\LocalState\previousInput.json

morpheus5150 commented 2 years ago

Cant it just save the data when you input it on the screen?

From: gregchak @.> Sent: Tuesday, May 17, 2022 5:50 PM To: gregchak/plex-playlist-import @.> Cc: Subscribed @.***> Subject: Re: [gregchak/plex-playlist-import] Errors occurred while processing request (Issue #6)

Logs and the JSON used to load the form will be located here: (adjust for your username) C:\Users{username}\AppData\Local\Packages\ChakFrost.PlexPlaylistImport_{letters and numbers}\LocalState\previousInput.json

— Reply to this email directly, view it on GitHubhttps://github.com/gregchak/plex-playlist-import/issues/6#issuecomment-1129454012, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMLNCFORPMOHCDJER2PT4JDVKQ5CZANCNFSM5VM5PUAA. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>>

gregchak commented 2 years ago

Sorry for the confusion @morpheus5150 , I was trying to answer a couple of your questions in 1 response.

As mentioned above, that is the path for the logs and where the previous inputs are stored. The application should be loading the data that is in the previousInputs.json file when it starts if the file is there. Check that location and see if the previoiusInputs.json file is there. If its not there then there's nothing for the application to read. The file will be written when you click the Import button. In addition if the import fails then logs should be written into the same directory. So try another import and check that directory for those files. If those files are not written then there's either a permission issue or somehow you have the wrong version. I'll double check the package to make sure its 1.1.0.0

morpheus5150 commented 2 years ago

I did an import and it did not create the file


From: gregchak @.> Sent: Wednesday, May 18, 2022 10:26:24 AM To: gregchak/plex-playlist-import @.> Cc: morpheus5150 @.>; Mention @.> Subject: Re: [gregchak/plex-playlist-import] Errors occurred while processing request (Issue #6)

Sorry for the confusion @morpheus5150https://github.com/morpheus5150 , I was trying to answer a couple of your questions in 1 response.

As mentioned above, that is the path for the logs and where the previous inputs are stored. The application should be loading that data that is in the previousInputs.json file when it starts if the file is there. Check that location and see if the previoiusInputs.json file is there. If its not there then there's nothing for the application to read. The file will be written when you click the Import button. In addition if the import fails then logs should be written into the same directory. So try another import and check that directory for those files. If those files are not written then there's either a permission issue or somehow you have the wrong version. I'll double check the package to make sure its 1.1.0.0

— Reply to this email directly, view it on GitHubhttps://github.com/gregchak/plex-playlist-import/issues/6#issuecomment-1130288406, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMLNCFPKCXYQ6RD44EYH3KDVKUR4BANCNFSM5VM5PUAA. You are receiving this because you were mentioned.Message ID: @.***>

gregchak commented 2 years ago

Did you check the version number? Were logs created?

morpheus5150 commented 2 years ago

I got it working…was using old version

From: gregchak @.> Sent: Wednesday, May 18, 2022 1:14 PM To: gregchak/plex-playlist-import @.> Cc: morpheus5150 @.>; Mention @.> Subject: Re: [gregchak/plex-playlist-import] Errors occurred while processing request (Issue #6)

Did you check the version number? Were logs created?

— Reply to this email directly, view it on GitHubhttps://github.com/gregchak/plex-playlist-import/issues/6#issuecomment-1130490763, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMLNCFMTA32DGRZNWPSPMVLVKVFPZANCNFSM5VM5PUAA. You are receiving this because you were mentioned.Message ID: @.**@.>>

torin101 commented 2 years ago

I'm having the same issue. What's in my log is below. OS is Windows 10, fresh plex install.

2022-06-23 14:37:40.011 -04:00 [ERR] Errors occurred while processing request. System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Exception: The text associated with this error code could not be found.

A connection with the server could not be established

at System.Net.Http.HttpHandlerToFilter.SendAsync(HttpRequestMessage request, CancellationToken cancel) at System.Net.Http.HttpClientHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpClientHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts) at App1.MainPage.Import_Click(Object sender, RoutedEventArgs e)

gregchak commented 2 years ago

It looks like the application is not able to connect to PLEX. Its unclear if its something like the URL that is incorrect or if PLEX is denying the request. But I would recheck all your settings. When it comes to connecting to PLEX it either works or it doesn't. And if it doesn't its usually something in the values that have been specified that is incorrect. You may also want to check and see if you are specifying HTTPS vs HTTP and which your PMS is listening on.

elamberton commented 2 years ago

If you receive a 500 server error back, it is helpful to check the Plex Console to see what may have happened during the processing of the playlist file. To view the console, look under settings, in the manage sub section, you'll find the Console link.

VyoletSky commented 2 years ago

Hi, I have exactly the same error message and log file output as torin101 above. http://localhost:32400 works just fine in a browser, but the application will not connect to the server with this URL.

I've spent several hours double and triple checking everything I can think of. There's no errors in the Plex Console, I guess it just isn't getting that far. I've tried https, I've tried the actual URL, etc. I've even tried adding the URL to "List of IP addresses and networks that are allowed without auth" within the Plex settings.

It's worth noting it takes 5-10 seconds to fail. Like it's trying... and then giving up?

I'm out of ideas, any suggestions please? I really need this application to work! :(

gregchak commented 2 years ago

@VyoletSky if you're getting the same error of A connection with the server could not be established then its not connecting to your PMS. What connection type is your network connection set to? If its Public, then there might be some extra hoops you have to jump through because that type locks things down quite a bit. You may also want to check not only your Windows firewall, but if you have an anti-virus that might be blocking the connection. For the most part, localhost connections are allowed but maybe you have something else going on that would block that connection. Have you tried allowing Plex Playlist Import in your firewall? You stated you can connect to PMS via a browser so it is allowing connections, but I wonder if something is explicitly blocking this app from making network connections.

VyoletSky commented 2 years ago

@gregchak Thanks for replying. So get this...

My Plex media server is running on a dedicated mini PC (Intel NUC for low power consumption). I do have public/remote access setup and the port forwarding rule for it, and Plex reports "Fully accessible outside your network" and all ok.

I've been trying to run the Playlist Importer on that mini PC, which to me, seemed sensible. It's not even going "across" the network that way (or is it??) But I tried your suggestions of disabling firewall and anti-virus, still no joy.

In a moment of "let's try something irrational" I installed the Playlist Importer on my main PC and ran it from there with the URL for the mini PC and still using the m3u file saved on the mini PC - it worked perfectly!

I do not understand this at all, do you have any ideas why Plex will not accept the connection from the same PC that the media server is running on???

But I'm very happy it's working via a different route. Your app is awesome, thank you!

gregchak commented 2 years ago

@VyoletSky Well I'm glad its working, but I'm not sure why it isn't able to run on your NUC. I've never used a NUC so I don't know if there's any sort of extra localhost protections it has set up. I can say that when I first developed this app I was running everything on the same computer and it worked well. To your point, running everything locally should remove some of those network connection issues, but you proved that is not the case.

The error you posted says unable to connect so I have no reason to believe that is not the issue. I just don't understand why, in your set up, it would not be able to.

morpheus5150 commented 2 years ago

There is no JSON file or anything else in that folder…any ideas?

From: gregchak @.> Sent: Tuesday, May 17, 2022 5:50 PM To: gregchak/plex-playlist-import @.> Cc: Subscribed @.***> Subject: Re: [gregchak/plex-playlist-import] Errors occurred while processing request (Issue #6)

Logs and the JSON used to load the form will be located here: (adjust for your username) C:\Users{username}\AppData\Local\Packages\ChakFrost.PlexPlaylistImport_{letters and numbers}\LocalState\previousInput.json

— Reply to this email directly, view it on GitHubhttps://github.com/gregchak/plex-playlist-import/issues/6#issuecomment-1129454012, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMLNCFORPMOHCDJER2PT4JDVKQ5CZANCNFSM5VM5PUAA. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>>

BalintXHD commented 1 year ago

Issue here, "Errors occurred while processing request ". Sending logs.

log20230408.txt

{"url":"http://localhost:32400/","token":"Tty5pdyMBRiPRTmQYNQ7","sectionId":3,"path":"F:\\Zene\\zene2\\zene\\Balint Playlist.m3u"}

BrightApollo commented 10 months ago

Also having inital connection / initial import problem. log20240101.txt

previousInput.json

gregchak commented 10 months ago

After looking at the logs it looks like the import tool is trying to connect to Plex at the URL specified (http://127.0.0.1:3240/) but it is unable to establish a connection. This is typically the case when the URL is incorrect or there is something blocking it. In addition you may want to make sure that your Plex isn't set up for HTTPS connections only. With the URL set to localhost I am assuming that you are running this import tool from the same computer that you are running Plex. Is that correct? You may want to check your firewall rules too to ensure that 32400 both inbound and outbound are allowed. Since you are running Plex on this same computer I would assume 32400 is allowed inbound, but possibly not outbound, or possibly not in the right network type; i.e. private vs. public. That's where I would start the troubleshooting. No config is needed in your router since all of this local not only to your network but to your computer.

BrightApollo commented 10 months ago

After looking at the logs it looks like the import tool is trying to connect to Plex at the URL specified (http://127.0.0.1:3240/) but it is unable to establish a connection. This is typically the case when the URL is incorrect or there is something blocking it.

Plex can allow connections to http or https; tested both as good. ESET firewall disabled, no Windows Defender configuration active, still no good. I've ruled out firewall and basic netowrking issues. Is there a DEBUG mode I can try?

elamberton commented 10 months ago

I am running the import tool on a Windows Computer with Plex installed on a NAS.

On Tue, Jan 2, 2024 at 11:06 AM BrightApollo @.***> wrote:

After looking at the logs it looks like the import tool is trying to connect to Plex at the URL specified (http://127.0.0.1:3240/) but it is unable to establish a connection. This is typically the case when the URL is incorrect or there is something blocking it.

Plex can allow connections to http or https; tested both as good. ESET firewall disabled, no Windows Defender configuration active, still no good. I've ruled out firewall and basic netowrking issues. Is there a DEBUG mode I can try?

— Reply to this email directly, view it on GitHub https://github.com/gregchak/plex-playlist-import/issues/6#issuecomment-1874221229, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJF7NNQFW6D3C4QI5NV2TJLYMQV7PAVCNFSM5VM5PUAKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBXGQZDEMJSGI4Q . You are receiving this because you commented.Message ID: @.***>

gregchak commented 10 months ago

@BrightApollo Try to connect to the API via your browser by using this link: http://localhost:3240/servers?X-Plex-Token=[Your token]

BrightApollo commented 10 months ago

@BrightApollo Try to connect to the API via your browser by using this link: http://localhost:32400/servers?X-Plex-Token=[Your token]

Githubissues.
  • Githubissues is a development platform for aggregating issues.