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

Errors occurred while processing request #6

Open
Roshri opened this issue May 9, 2022 · 44 comments
Open

Errors occurred while processing request #6

Roshri opened this issue May 9, 2022 · 44 comments

Comments

@Roshri
Copy link

Roshri commented May 9, 2022

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
Copy link
Owner

gregchak commented May 9, 2022

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
Copy link
Author

Roshri commented May 9, 2022

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
Copy link
Owner

gregchak commented May 9, 2022

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 added a commit that referenced this issue May 15, 2022
…orm and populate form with that information when application is relaunched. Added a logger.
@gregchak
Copy link
Owner

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

@gregchak
Copy link
Owner

gregchak commented May 18, 2022

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
Copy link

morpheus5150 commented May 18, 2022 via email

@gregchak
Copy link
Owner

gregchak commented May 18, 2022

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
Copy link

morpheus5150 commented May 18, 2022 via email

@gregchak
Copy link
Owner

Did you check the version number? Were logs created?

@morpheus5150
Copy link

morpheus5150 commented May 18, 2022 via email

@torin101
Copy link

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
Copy link
Owner

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
Copy link

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
Copy link

VyoletSky commented Oct 2, 2022

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
Copy link
Owner

gregchak commented Oct 6, 2022

@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
Copy link

@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
Copy link
Owner

gregchak commented Oct 9, 2022

@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
Copy link

morpheus5150 commented Oct 11, 2022 via email

@BalintXHD
Copy link

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
Copy link

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

previousInput.json

@gregchak
Copy link
Owner

gregchak commented Jan 2, 2024

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
Copy link

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
Copy link

elamberton commented Jan 3, 2024 via email

@gregchak
Copy link
Owner

gregchak commented Jan 3, 2024

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

@BrightApollo
Copy link

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

<script/>

Connects, no issue. I was able to load the playlist using a REST extension for FF and the Plex API; I still want your tool to work though.

@magnumforce2006
Copy link

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

<script/>

Connects, no issue. I was able to load the playlist using a REST extension for FF and the Plex API; I still want your tool to work though.

Mind walking me through how you did that? (Rest extension). I'm also able to get that link to work but not this Tool. So I'd like to see if I'm able to get an m3u in somehow.

@BrightApollo
Copy link

Happy to help. I use FF.

Believe it or not, that works.

@magnumforce2006
Copy link

Before I try, I've been setting my section ID to 1. But you're saying 9 is the default for music? I got it using the instructions that state to look in the xml of the music library item (same one I got my Plex Token from).

@BrightApollo
Copy link

Try yours, then mine. Whatever works. Maybe it's sequentially numbered and my music section was the ninth one it added; Plex is not designed well from a data architecture standpoint at all so anything could be true.

@BrightApollo
Copy link

you tried sectionID=9 as well?
500 can be for bad input too

@magnumforce2006
Copy link

magnumforce2006 commented Jan 4, 2024

Looking at the plex console, I think it has something to do with where I'm saving the playlist, even though this is my library location?

image

@BrightApollo
Copy link

throw your playlist at the root of the drive.

@magnumforce2006
Copy link

Just right in C:\ ?

@magnumforce2006
Copy link

magnumforce2006 commented Jan 4, 2024

Seems to pick up the playlist, but then attempting to find tracks failed

image

For what it's worth, this is what my m3u looks like:

image

@magnumforce2006
Copy link

For some added context. My music library is stored locally in what is the default music folder:

image

And my folder strcture goes like A/Artistname/Albumname/Music.mp3, example

image

This all feels pretty standard so I'm unsure why this would be causing issues with plex finding my stuff lol

@BrightApollo
Copy link

your playlist entries are relative and not absolute.try prefixing a few and see if they go

@magnumforce2006
Copy link

magnumforce2006 commented Jan 4, 2024

Nope. Updated playlist to look like this:

image

Trying from my music folder, plex response:

image

And trying from C:

image

I am so so confused lol. And for what it's worth my settings again from Rest:

image

@BrightApollo
Copy link

Okay, let's skinny this wayyyyy down.
All operations should be performed on the machine where the Plex Server is running.
Open Firefox (on the same machine runnng Plex Server), and get your REST UI ready.
Copy one mp3 to a new M3U playlist. Place the playlist and the song in the root of whatever machine is running Plex Server; drive letter doesn't mattter.
This is how one of my M3U files is formed:
#EXTM3U
#EXTINF:227,Kenny Burrell - But Not For Me
Q:\music\Kenny Burrell\Introducing Kenny Burrell(d01) (09) - But Not For Me.mp3

You should have an analogous format for your M3u file containing one song.

This should work, as it is a base case. My Plex Server level is Version 1.32.8.7639 using Web Version 4.116.1

If this still fails I am out of ideas for the moment.

@magnumforce2006
Copy link

So you're saying put the song and playlist right in C:? But how would Plex identify that song since the music library doesn't extend to C:?

Also what does the #EXTINF number mean and how would I derive that?

@BrightApollo
Copy link

Right now all we are trying to see is if the Plex API will process a basic M3U referencing one song / entry, and we want these two files to be "seen" by Plex in the most simplistic way.
I assumed when I exported the M3U out of MediaMonkey that it would be standard; perhaps that's not true. https://en.wikipedia.org/wiki/M3U confirms that MediaMonkey is emitting a good file. Verify your M3U against mine again and see.

@magnumforce2006
Copy link

@BrightApollo I can't speak for everyone else's experiences but I found a way to make it work. I loaded my playlist into VLC media player, and then saved that to m3u. VLC includes %20 instead of spaces, which seems to be what made plex like my input? Here's an excerpt. I got it to load playlists with hundreds of entries no issue. It's convulated, but it works!

#EXTM3U
#EXTINF:508,Stevie Wonder - Another Star
S/Stevie%20Wonder/Songs%20in%20the%20Key%20of%20Life/Disc%202-/2.17,%2007%20-%20Stevie%20Wonder%20-%20Another%20Star.flac
#EXTINF:295,Led Zeppelin - Black Dog [SexLust]
L/Led%20Zeppelin/Early%20Days%20&%20Latter%20Days-%20Vol.%201/09%20-%20Led%20Zeppelin%20-%20Black%20Dog%20[SexLust].mp3
#EXTINF:196,B.o.B - Magic (feat. Rivers Cuomo)
B/B.o.B/B.o.B%20Presents-%20The%20Adventures%20of%20Bobby%20Ray/08%20-%20B.o.B%20-%20Magic%20(feat.%20Rivers%20Cuomo).mp3
#EXTINF:268,TLC - Creep
V/Various%20Artists/90s%20Smash%20Essentials/66%20-%20TLC%20-%20Creep.mp3
#EXTINF:373,Cymbals Eat Guitars - ...And the Hazy Sea
C/Cymbals%20Eat%20Guitars/Why%20There%20Are%20Mountains/01%20-%20Cymbals%20Eat%20Guitars%20-%20...And%20the%20Hazy%20Sea.mp3

@BrightApollo
Copy link

it's not stupid if it works! I'm glad my setup doesn't require escape characters. Good tip to remember.

@BrightApollo
Copy link

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:32400/) but it is unable to establish a connection. This is typically the case when the URL is incorrect or there is something blocking it.

@gregchak now that we have established that my system is setup correctly and it does work when using POST + PlexAPI, what else should we try to get your solution working? Do you have a DEBUG version available that I can install, then ship logs to you? Anything instrumented I can check?

-C

@phred13
Copy link

phred13 commented Jun 23, 2024

Breathing some life in to this relatively old thread.

I've installed the Plex Importing applicaiton/tool/whatever. I'm pretty sure it was a successful install as new directories/files have been installed in C:\Users\xxxxxxxx\AppData\Local\Packages\ChakFrost.PlexPlaylistImport_eghgkf1r4f9kp.

Following some of the hints in this thread, I know I'm connecting to the Plex server from my Win10 PC. The server is sitting on a Synology NAS and the server was a package provided by Synology.

Via Firefox, this connects and show an XML. It also shows the plex logo on the broswer tab's favicon:
http://192.168.1.3:32400/servers?X-Plex-Token=xxxxxx

Never having worked with a PowerShell script before, I feel good that I was able to install it. But I can not figure out how to actually run the importing application/tool.

Any and all help would be greatly appreciated. I feel if I can get it launched I should be damn close to getting my playlists imported.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants