TechBuckler / PlexGifMaker

A quick way to use your Plex Library and Subtitles to make gifs
GNU Lesser General Public License v2.1
36 stars 1 forks source link

No entries under "Select Library" #3

Open clausjs opened 2 months ago

clausjs commented 2 months ago

Once everything is up and running and successfully connected to Plex the dropdown for "Select Library" has no entries. I have movies and TV content on my plex server but the application doesn't pick anything up

TechBuckler commented 2 months ago

Do you get any error messages in console? What do you get (redact what you can) when you run :32400/library/sections?X-Plex-Token=? Http or Https? Browser? OS? JS disabled? Happy to help where I can!

TechBuckler commented 2 months ago

Didn't mean to close.

clausjs commented 2 months ago

Browser errors:

Error: System.Security.Cryptography.CryptographicException: The key {c1bff50f-6859-4d36-b33a-c444ca47c165} was not found in the key ring. For more information go to http://aka.ms/dataprotectionwarning
   at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore(Byte[] protectedData, Boolean allowOperationsOnRevokedKeys, UnprotectStatus& status)
   at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Unprotect(Byte[] protectedData)
   at Microsoft.AspNetCore.DataProtection.DataProtectionCommonExtensions.Unprotect(IDataProtector protector, String protectedData)
   at Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage.ProtectedBrowserStorage.Unprotect[TValue](String purpose, String protectedJson)
   at Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage.ProtectedBrowserStorage.GetAsync[TValue](String purpose, String key)
   at PlexGifMaker.Pages.Index.InitializeSettingsAndLibraries() in /src/Pages/Index.razor:line 449
   at PlexGifMaker.Pages.Index.OnAfterRenderAsync(Boolean firstRender) in /src/Pages/Index.razor:line 442
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

Docker errors:

PlexGifMaker.Data.PlexService[0]
                    plexgifmaker-1  |       An error occurred while fetching libraries.
                    plexgifmaker-1  |       System.Net.Http.HttpRequestException: Connection refused (localhost:32400)
                    plexgifmaker-1  |        ---> System.Net.Sockets.SocketException (111): Connection refused
                    plexgifmaker-1  |          at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
                    plexgifmaker-1  |          at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
                    plexgifmaker-1  |          at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
                    plexgifmaker-1  |          at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
                    plexgifmaker-1  |          --- End of inner exception stack trace ---
                    plexgifmaker-1  |          at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
                    plexgifmaker-1  |          at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                    plexgifmaker-1  |          at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                    plexgifmaker-1  |          at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
                    plexgifmaker-1  |          at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
                    plexgifmaker-1  |          at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                    plexgifmaker-1  |          at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
                    plexgifmaker-1  |          at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                    plexgifmaker-1  |          at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                    plexgifmaker-1  |          at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
                    plexgifmaker-1  |          at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
                    plexgifmaker-1  |          at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
                    plexgifmaker-1  |          at PlexGifMaker.Data.PlexService.GetLibrariesAsync() in /src/Data/PlexService.cs:line 397

FWIW The messages before that printing the urls its accessing:

System.Net.Http.HttpClient.Default.LogicalHandler[100]
                    plexgifmaker-1  |       Start processing HTTP request GET http://localhost:32400/library/sections?X-Plex-Token=...
                    plexgifmaker-1  | info: System.Net.Http.HttpClient.Default.ClientHandler[100]
                    plexgifmaker-1  |       Sending HTTP request GET http://localhost:32400/library/sections?X-Plex-Token=...

If I navigate to them (which include my token) I see the xml.

http local access. Running on the same machine as the plex server OS: Windows 10 Browser is Firefox: 125.0.3 and JS enabled

TechBuckler commented 2 months ago

For the keyring one, try clearing your browser cache for localhost: https://support.mozilla.org/en-US/kb/delete-browsing-search-download-history-firefox#w_remove-a-single-website-from-your-history . I'm hoping that'll clear up the rest of your issues - but if not, let me know which issues remain.

TechBuckler commented 1 month ago

Still having issues - or was this partially or completely solved?

clausjs commented 1 month ago

Still having issues - or was this partially or completely solved?

Haven't been able to try yet. I'll get to this hopefully this evening

ponchohoncho commented 3 weeks ago

I'm having something similar happen, but only with non-admin users. I can log in with my primary account and see all the libraries, but other users can't. The logs look the same for both of them. Both logins have the line in the logs like

Start processing HTTP request GET https://plex.mydoma.in/library/sections?X-Plex-Token=xxxyyyzzz

When I go to that URL from my login, I see an XML with a list of libraries. When I go to that URL for the other user, I get 401 Unauthorized from Plex.

Here's the full log snippet, you can see the 401 for the other user, and the 200 success for my primary user

warn: PlexGifMaker.Pages.Index[0]
      Base URI or token is missing in local storage. Redirecting to settings.
info: System.Net.Http.HttpClient.Default.LogicalHandler[100]
      Start processing HTTP request GET https://plex.mydoma.in/library/sections?X-Plex-Token=OTHER-USER-TOKEN
info: System.Net.Http.HttpClient.Default.ClientHandler[100]
      Sending HTTP request GET https://plex.mydoma.in/library/sections?X-Plex-Token=OTHER-USER-TOKEN
info: System.Net.Http.HttpClient.Default.ClientHandler[101]
      Received HTTP response headers after 2920.4768ms - 401
info: System.Net.Http.HttpClient.Default.LogicalHandler[101]
      End processing HTTP request after 2920.8695ms - 401
info: System.Net.Http.HttpClient.Default.LogicalHandler[100]
      Start processing HTTP request GET https://plex.mydoma.in/library/sections?X-Plex-Token=ADMIN-USER-TOKEN
info: System.Net.Http.HttpClient.Default.ClientHandler[100]
      Sending HTTP request GET https://plex.mydoma.in/library/sections?X-Plex-Token=ADMIN-USER-TOKEN
info: System.Net.Http.HttpClient.Default.ClientHandler[101]
      Received HTTP response headers after 4.1636ms - 200
info: System.Net.Http.HttpClient.Default.LogicalHandler[101]
      End processing HTTP request after 4.4199ms - 200