alexrw 13 Posted October 16, 2022 Share Posted October 16, 2022 (edited) EDIT: Seems either Embycon is sending a malformed string to the EMby server, or the new Emby server version has a bug - see 2nd post. Running Kodi Matrix 19.4 with latest Embycon 1.10.27 (using Embuary skin). Emby server is 4.7.8.0 on a different Windows machine. I used this setup for years, but for the past few months I used emby-nextgen and now I decided to go back to Embycon. There have been updates to all component versions in the meantime (except Kodi itself). Now I keep getting in the GUI "URL Error: Internal server error." just before the video plays (it still plays though), then just after the video ends/is stopped, and also whenever the skin is loaded (at Kodi start, or if I reload the skin manually). NOTE that Kodi+Embycon is otherwise functional (authenticates fine to my Emby serrver, which is on the LAN on a different machine, and it does fetch and play movies and tv shows via Embycon). It's just that the error wasn't there in the past when I was using Embycon. The debug log shows this whenever it happens: Quote 2022-10-16 02:45:39.673 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|HTTP response: 500 Internal Server Error 2022-10-16 02:45:39.673 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|GET URL HEADERS: [('Content-Length', '41'), ('Content-Type', 'text/html'), ('Date', 'Sun, 16 Oct 2022 01:45:39 GMT'), ('Server', 'Kestrel'), ('Access-Control-Allow-Headers', 'Accept, Accept-Language, Authorization, Cache-Control, Content-Disposition, Content-Encoding, Content-Language, Content-Length, Content-MD5, Content-Range, Content-Type, Date, Host, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, Origin, OriginToken, Pragma, Range, Slug, Transfer-Encoding, Want-Digest, X-MediaBrowser-Token, X-Emby-Token, X-Emby-Client, X-Emby-Client-Version, X-Emby-Device-Id, X-Emby-Device-Name, X-Emby-Authorization'), ('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, PATCH, OPTIONS'), ('Access-Control-Allow-Origin', '*'), ('Access-Control-Allow-Private-Network', 'true')] 2022-10-16 02:45:39.673 T:5972 ERROR <general>: EmbyCon.resources.lib.downloadutils|ERROR|HTTP response error: 500 Internal Server Error 2022-10-16 02:45:39.673 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|Closing HTTP connection: <http.client.HTTPConnection object at 0x000001AF98F41AC0> It doesn't say what the actual http request was (header + payload) and I lack the time to whip up Wireshark to dig further. Any clues? p.s. The following made no difference: tried to disable the option for cached server calls, also caching ion Embycon Info addon, and also local cached images (in Embycon's menu). Edited October 16, 2022 by alexr Link to comment Share on other sites More sharing options...
alexrw 13 Posted October 16, 2022 Author Share Posted October 16, 2022 (edited) Hmm, I found this in the Emby server logs, it corresponds to the exact time the Kodi/Embycon machine got the error (both machines are ntp time sync'ed) ... I see the server logs also don't say what the actual http request was that it didn't like (System.FormatException: System.FormatException: Input string was not in a correct format) Quote 2022-10-16 02:45:39.530 Error Server: Error processing request *** Error Report *** Version: 4.7.8.0 Command line: C:\Users\Alex\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp Operating system: Microsoft Windows 10.0.19044 Framework: .NET 6.0.9 OS/Process: x64/x64 Runtime: C:/Users/Alex/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll Processor count: 8 Data path: C:\Users\Alex\AppData\Roaming\Emby-Server Application path: C:\Users\Alex\AppData\Roaming\Emby-Server\system System.FormatException: System.FormatException: Input string was not in a correct format. at ServiceStack.Text.SignedInteger`1.ParseInt64(ReadOnlySpan`1 value) in /home/runner/work/ServiceStack/ServiceStack/ServiceStack.Text/src/ServiceStack.Text/DefaultMemory.cs:line 889 at ServiceStack.Text.SignedInteger`1.ParseObject(ReadOnlySpan`1 value) in /home/runner/work/ServiceStack/ServiceStack/ServiceStack.Text/src/ServiceStack.Text/DefaultMemory.cs:line 802 at ServiceStack.Text.Common.JsReader`1.<>c__DisplayClass4_0`1.<GetCoreParseStringSpanFn>b__3(ReadOnlySpan`1 value) in /home/runner/work/ServiceStack/ServiceStack/ServiceStack.Text/src/ServiceStack.Text/Common/JsReader.cs:line 70 at ServiceStack.Text.Jsv.JsvReader.<>c__DisplayClass2_0.<GetParseFn>b__0(String v) in /home/runner/work/ServiceStack/ServiceStack/ServiceStack.Text/src/ServiceStack.Text/Jsv/JsvReader.Generic.cs:line 18 at Emby.Server.Implementations.Services.StringMapTypeDeserializer.PopulateFromMap(Object instance, IDictionary`2 keyValuePairs) at Emby.Server.Implementations.Services.RestPath.CreateRequest(String pathInfo, Dictionary`2 queryStringAndFormData, Object fromInstance) at Emby.Server.Implementations.Services.ServiceHandler.CreateRequest(IRequest httpReq, RestPath restPath, Dictionary`2 requestParams, Object requestDto) at Emby.Server.Implementations.Services.ServiceHandler.CreateRequest(HttpListenerHost host, IRequest httpReq, RestPath restPath) at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken) at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken) Source: ServiceStack.Text TargetSite: Int64 ParseInt64(System.ReadOnlySpan`1[System.Char]) Edited October 16, 2022 by alexr Link to comment Share on other sites More sharing options...
TeamB 2352 Posted October 16, 2022 Share Posted October 16, 2022 1 hour ago, alexr said: It doesn't say what the actual http request was (header + payload) and I lack the time to whip up Wireshark to dig further. turn on Debug Logging in the EmbyCon addon advanced settings, this will then log the URL Link to comment Share on other sites More sharing options...
TeamB 2352 Posted October 16, 2022 Share Posted October 16, 2022 also try not using the embuary skin, use the default skin and see if it still happens Link to comment Share on other sites More sharing options...
alexrw 13 Posted October 16, 2022 Author Share Posted October 16, 2022 (edited) 39 minutes ago, TeamB said: turn on Debug Logging in the EmbyCon addon advanced settings, this will then log the URL It was already on (notice the DEBUG log entries that I copy/pasted), there is no url Edited October 16, 2022 by alexr Link to comment Share on other sites More sharing options...
TeamB 2352 Posted October 16, 2022 Share Posted October 16, 2022 5 minutes ago, alexr said: It was already on (notice the DEBUG log entries that I copy/pasted), there is no url did you restart Kodi? that settings needs a restart kick in. Link to comment Share on other sites More sharing options...
alexrw 13 Posted October 16, 2022 Author Share Posted October 16, 2022 (edited) Actually, there is, it was above it, but Kodi interposed other stuff in between and I missed it. Here is the whole chunk since the last 200 (OK) server response until the 500 (ERROR) server response ... several URLs in there, not sure which one is the culprit, the logs only report 500 at the end: Quote 2022-10-16 02:45:39.536 T:5972 INFO <general>: EmbyCon.default|DEBUG|About to enter mainEntryPoint() 2022-10-16 02:45:39.536 T:5972 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|===== EmbyCon START ===== 2022-10-16 02:45:39.538 T:5972 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|Running Python: sys.version_info(major=3, minor=8, micro=5, releaselevel='final', serial=0) 2022-10-16 02:45:39.538 T:5972 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|Running EmbyCon: 1.10.27 2022-10-16 02:45:39.538 T:5972 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|Kodi BuildVersion: 19.4 (19.4.0) Git:20220302-e12e66e019 2022-10-16 02:45:39.538 T:5972 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|Kodi Version: 19 2022-10-16 02:45:39.538 T:5972 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|Script argument data: ['plugin://plugin.video.embycon/', '11', '?media_type=Movies&mode=GET_CONTENT&use_cache=false&url=%7Bserver%7D%2Femby%2FUsers%2F%7Buserid%7D%2FItems%2FLatest%3FLimit%3D%7BItemLimit%7D%26Recursive%3Dtrue%26GroupItems%3Dtrue%26SortBy%3DDateCreated%26Fields%3D%7Bfield_filters%7D%26SortOrder%3DDescending%26Filters%3D%7BIsUnplayed%7D%26IncludeItemTypes%3DMovie%26ImageTypeLimit%3D1%26format%3Djson&reload=', 'resume:false'] 2022-10-16 02:45:39.538 T:5972 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|Parameter string: ?media_type=Movies&mode=GET_CONTENT&use_cache=false&url=%7Bserver%7D%2Femby%2FUsers%2F%7Buserid%7D%2FItems%2FLatest%3FLimit%3D%7BItemLimit%7D%26Recursive%3Dtrue%26GroupItems%3Dtrue%26SortBy%3DDateCreated%26Fields%3D%7Bfield_filters%7D%26SortOrder%3DDescending%26Filters%3D%7BIsUnplayed%7D%26IncludeItemTypes%3DMovie%26ImageTypeLimit%3D1%26format%3Djson&reload= 2022-10-16 02:45:39.538 T:5972 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|Plugin Path string: plugin://plugin.video.embycon/ 2022-10-16 02:45:39.538 T:5972 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|EmbyCon -> Detected parameters: {'request_path': '/', 'media_type': 'Movies', 'mode': 'GET_CONTENT', 'use_cache': 'false', 'url': '%7Bserver%7D%2Femby%2FUsers%2F%7Buserid%7D%2FItems%2FLatest%3FLimit%3D%7BItemLimit%7D%26Recursive%3Dtrue%26GroupItems%3Dtrue%26SortBy%3DDateCreated%26Fields%3D%7Bfield_filters%7D%26SortOrder%3DDescending%26Filters%3D%7BIsUnplayed%7D%26IncludeItemTypes%3DMovie%26ImageTypeLimit%3D1%26format%3Djson', 'reload': ''} 2022-10-16 02:45:39.538 T:5972 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|Script params: {'request_path': '/', 'media_type': 'Movies', 'mode': 'GET_CONTENT', 'use_cache': 'false', 'url': '%7Bserver%7D%2Femby%2FUsers%2F%7Buserid%7D%2FItems%2FLatest%3FLimit%3D%7BItemLimit%7D%26Recursive%3Dtrue%26GroupItems%3Dtrue%26SortBy%3DDateCreated%26Fields%3D%7Bfield_filters%7D%26SortOrder%3DDescending%26Filters%3D%7BIsUnplayed%7D%26IncludeItemTypes%3DMovie%26ImageTypeLimit%3D1%26format%3Djson', 'reload': ''} 2022-10-16 02:45:39.539 T:5972 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|EmbyCon -> Mode: GET_CONTENT 2022-10-16 02:45:39.539 T:5972 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|EmbyCon -> URL: {server}/emby/Users/{userid}/Items/Latest?Limit={ItemLimit}&Recursive=true&GroupItems=true&SortBy=DateCreated&Fields={field_filters}&SortOrder=Descending&Filters={IsUnplayed}&IncludeItemTypes=Movie&ImageTypeLimit=1&format=json 2022-10-16 02:45:39.539 T:5972 INFO <general>: EmbyCon.resources.lib.dir_functions|DEBUG|== ENTER: getContent == 2022-10-16 02:45:39.539 T:5972 INFO <general>: EmbyCon.resources.lib.dir_functions|DEBUG|URL: {server}/emby/Users/{userid}/Items/Latest?Limit={ItemLimit}&Recursive=true&GroupItems=true&SortBy=DateCreated&Fields={field_filters}&SortOrder=Descending&Filters={IsUnplayed}&IncludeItemTypes=Movie&ImageTypeLimit=1&format=json 2022-10-16 02:45:39.539 T:5972 INFO <general>: EmbyCon.resources.lib.dir_functions|DEBUG|MediaType: Movies 2022-10-16 02:45:39.539 T:5972 INFO <general>: EmbyCon.resources.lib.dir_functions|DEBUG|media_type:movies content_type:movies view_type:Movies 2022-10-16 02:45:39.542 T:5972 INFO <general>: EmbyCon.resources.lib.dir_functions|DEBUG|Creating Paging URLS: {server}/emby/Users/{userid}/Items/Latest?Limit={ItemLimit}&Recursive=true&GroupItems=true&SortBy=DateCreated&Fields={field_filters}&SortOrder=Descending&Filters={IsUnplayed}&IncludeItemTypes=Movie&ImageTypeLimit=1&format=json 2022-10-16 02:45:39.543 T:5972 INFO <general>: EmbyCon.resources.lib.dir_functions|DEBUG|Paged URLS - url_current: {server}/emby/Users/{userid}/Items/Latest?Limit={ItemLimit}&Recursive=true&GroupItems=true&SortBy=DateCreated&Fields={field_filters}&SortOrder=Descending&Filters={IsUnplayed}&IncludeItemTypes=Movie&ImageTypeLimit=1&format=json&StartIndex=0&Limit=10 2022-10-16 02:45:39.543 T:5972 INFO <general>: EmbyCon.resources.lib.dir_functions|DEBUG|Paged URLS - url_prev: None 2022-10-16 02:45:39.543 T:5972 INFO <general>: EmbyCon.resources.lib.dir_functions|DEBUG|Paged URLS - url_next: {server}/emby/Users/{userid}/Items/Latest?Limit={ItemLimit}&Recursive=true&GroupItems=true&SortBy=DateCreated&Fields={field_filters}&SortOrder=Descending&Filters={IsUnplayed}&IncludeItemTypes=Movie&ImageTypeLimit=1&format=json&StartIndex=10&Limit=10 2022-10-16 02:45:39.543 T:5972 INFO <general>: EmbyCon.resources.lib.dir_functions|DEBUG|== ENTER: processDirectory == 2022-10-16 02:45:39.547 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|use_https: False 2022-10-16 02:45:39.547 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|verify_cert: False 2022-10-16 02:45:39.553 T:5972 INFO <general>: EmbyCon.resources.lib.datamanager|DEBUG|last_content_url : use_cache=False url={server}/emby/Users/{userid}/Items/Latest?Limit={ItemLimit}&Recursive=true&GroupItems=true&SortBy=DateCreated&Fields={field_filters}&SortOrder=Descending&Filters={IsUnplayed}&IncludeItemTypes=Movie&ImageTypeLimit=1&format=json&StartIndex=0&Limit=10 2022-10-16 02:45:39.556 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|use_https: False 2022-10-16 02:45:39.556 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|verify_cert: False 2022-10-16 02:45:39.560 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|EmbyCon DownloadUtils -> Returning saved UserID: e58f615a43264f2a8c2f84a6e66f2b6f 2022-10-16 02:45:39.564 T:5972 INFO <general>: EmbyCon.resources.lib.datamanager|DEBUG|Loading url data from server 2022-10-16 02:45:39.567 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|use_https: False 2022-10-16 02:45:39.567 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|verify_cert: False 2022-10-16 02:45:39.567 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|DownloadUrl : {server}/emby/Users/{userid}/Items/Latest?Limit={ItemLimit}&Recursive=true&GroupItems=true&SortBy=DateCreated&Fields={field_filters}&SortOrder=Descending&Filters={IsUnplayed}&IncludeItemTypes=Movie&ImageTypeLimit=1&format=json&StartIndex=0&Limit=10 2022-10-16 02:45:39.571 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|Before: {server}/emby/Users/{userid}/Items/Latest?Limit={ItemLimit}&Recursive=true&GroupItems=true&SortBy=DateCreated&Fields={field_filters}&SortOrder=Descending&Filters={IsUnplayed}&IncludeItemTypes=Movie&ImageTypeLimit=1&format=json&StartIndex=0&Limit=10 2022-10-16 02:45:39.574 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|EmbyCon DownloadUtils -> Returning saved UserID: e58f615a43264f2a8c2f84a6e66f2b6f 2022-10-16 02:45:39.577 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|After: http://192.168.1.2:8096/emby/Users/e58f615a43264f2a8c2f84a6e66f2b6f/Items/Latest?Limit=20&Recursive=true&GroupItems=true&SortBy=DateCreated&Fields=DateCreated,EpisodeCount,SeasonCount,Path,Genres,Studios,Etag,Taglines,SortName,RecursiveItemCount,ChildCount,ProductionLocations,CriticRating,OfficialRating,CommunityRating,PremiereDate,ProductionYear,AirTime,Status,Tags,MediaStreams,People,Overview&SortOrder=Descending&Filters={IsUnplayed}&IncludeItemTypes=Movie&ImageTypeLimit=1&format=json&StartIndex=0&Limit=10 2022-10-16 02:45:39.577 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|Connection: HTTP 2022-10-16 02:45:39.581 T:11404 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|use_https: False 2022-10-16 02:45:39.581 T:11404 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|verify_cert: False 2022-10-16 02:45:39.589 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|EmbyCon DownloadUtils -> Returning saved UserID: e58f615a43264f2a8c2f84a6e66f2b6f 2022-10-16 02:45:39.589 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|authenticate called 2022-10-16 02:45:39.590 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|EmbyCon DownloadUtils -> Returning saved AccessToken: 148a86f0268d48ac8832ec8fe0425c55 2022-10-16 02:45:39.590 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|EmbyCon Authentication Header: {'Accept-encoding': 'gzip', 'Accept-Charset': 'UTF-8,*', 'X-Emby-Authorization': 'MediaBrowser UserId="e58f615a43264f2a8c2f84a6e66f2b6f",Client="Kodi EmbyCon",Device="imagio",DeviceId="94F948A277EA4B13AC4D0327F4520328",Version="1.10.27"', 'X-MediaBrowser-Token': '148a86f0268d48ac8832ec8fe0425c55'} 2022-10-16 02:45:39.590 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|HEADERS: {'Accept-encoding': 'gzip', 'Accept-Charset': 'UTF-8,*', 'X-Emby-Authorization': 'MediaBrowser UserId="e58f615a43264f2a8c2f84a6e66f2b6f",Client="Kodi EmbyCon",Device="imagio",DeviceId="94F948A277EA4B13AC4D0327F4520328",Version="1.10.27"', 'X-MediaBrowser-Token': '148a86f0268d48ac8832ec8fe0425c55', 'User-Agent': 'EmbyCon-1.10.27'} 2022-10-16 02:45:39.602 T:11404 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|use_https: False 2022-10-16 02:45:39.603 T:11404 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|verify_cert: False 2022-10-16 02:45:39.609 T:11404 INFO <general>: EmbyCon.default|DEBUG|About to enter mainEntryPoint() 2022-10-16 02:45:39.610 T:11404 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|===== EmbyCon START ===== 2022-10-16 02:45:39.613 T:11404 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|Running Python: sys.version_info(major=3, minor=8, micro=5, releaselevel='final', serial=0) 2022-10-16 02:45:39.613 T:11404 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|Running EmbyCon: 1.10.27 2022-10-16 02:45:39.613 T:11404 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|Kodi BuildVersion: 19.4 (19.4.0) Git:20220302-e12e66e019 2022-10-16 02:45:39.613 T:11404 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|Kodi Version: 19 2022-10-16 02:45:39.613 T:11404 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|Script argument data: ['plugin://plugin.video.embycon/', '12', '?media_type=Episodes&mode=GET_CONTENT&use_cache=false&name_format=Episode%7cepisode_name_format&url=%7bserver%7d%2femby%2fShows%2fNextUp%2f%3fUserid%3d%7buserid%7d%26Limit%3D500%26Recursive%3dtrue%26Fields%3d%7bfield_filters%7d%26Filters%3dIsUnplayed%2cIsNotFolder%26IsVirtualUnaired%3dfalse%26IsMissing%3dFalse%26IncludeItemTypes%3dEpisode%26ImageTypeLimit%3d1%26format%3djson&reload=', 'resume:false'] 2022-10-16 02:45:39.613 T:11404 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|Parameter string: ?media_type=Episodes&mode=GET_CONTENT&use_cache=false&name_format=Episode%7cepisode_name_format&url=%7bserver%7d%2femby%2fShows%2fNextUp%2f%3fUserid%3d%7buserid%7d%26Limit%3D500%26Recursive%3dtrue%26Fields%3d%7bfield_filters%7d%26Filters%3dIsUnplayed%2cIsNotFolder%26IsVirtualUnaired%3dfalse%26IsMissing%3dFalse%26IncludeItemTypes%3dEpisode%26ImageTypeLimit%3d1%26format%3djson&reload= 2022-10-16 02:45:39.613 T:11404 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|Plugin Path string: plugin://plugin.video.embycon/ 2022-10-16 02:45:39.614 T:11404 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|EmbyCon -> Detected parameters: {'request_path': '/', 'media_type': 'Episodes', 'mode': 'GET_CONTENT', 'use_cache': 'false', 'name_format': 'Episode%7cepisode_name_format', 'url': '%7bserver%7d%2femby%2fShows%2fNextUp%2f%3fUserid%3d%7buserid%7d%26Limit%3D500%26Recursive%3dtrue%26Fields%3d%7bfield_filters%7d%26Filters%3dIsUnplayed%2cIsNotFolder%26IsVirtualUnaired%3dfalse%26IsMissing%3dFalse%26IncludeItemTypes%3dEpisode%26ImageTypeLimit%3d1%26format%3djson', 'reload': ''} 2022-10-16 02:45:39.614 T:11404 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|Script params: {'request_path': '/', 'media_type': 'Episodes', 'mode': 'GET_CONTENT', 'use_cache': 'false', 'name_format': 'Episode%7cepisode_name_format', 'url': '%7bserver%7d%2femby%2fShows%2fNextUp%2f%3fUserid%3d%7buserid%7d%26Limit%3D500%26Recursive%3dtrue%26Fields%3d%7bfield_filters%7d%26Filters%3dIsUnplayed%2cIsNotFolder%26IsVirtualUnaired%3dfalse%26IsMissing%3dFalse%26IncludeItemTypes%3dEpisode%26ImageTypeLimit%3d1%26format%3djson', 'reload': ''} 2022-10-16 02:45:39.614 T:11404 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|EmbyCon -> Mode: GET_CONTENT 2022-10-16 02:45:39.615 T:11404 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|EmbyCon -> URL: {server}/emby/Shows/NextUp/?Userid={userid}&Limit=500&Recursive=true&Fields={field_filters}&Filters=IsUnplayed,IsNotFolder&IsVirtualUnaired=false&IsMissing=False&IncludeItemTypes=Episode&ImageTypeLimit=1&format=json 2022-10-16 02:45:39.615 T:11404 INFO <general>: EmbyCon.resources.lib.dir_functions|DEBUG|== ENTER: getContent == 2022-10-16 02:45:39.615 T:11404 INFO <general>: EmbyCon.resources.lib.dir_functions|DEBUG|URL: {server}/emby/Shows/NextUp/?Userid={userid}&Limit=500&Recursive=true&Fields={field_filters}&Filters=IsUnplayed,IsNotFolder&IsVirtualUnaired=false&IsMissing=False&IncludeItemTypes=Episode&ImageTypeLimit=1&format=json 2022-10-16 02:45:39.615 T:11404 INFO <general>: EmbyCon.resources.lib.dir_functions|DEBUG|MediaType: Episodes 2022-10-16 02:45:39.615 T:11404 INFO <general>: EmbyCon.resources.lib.dir_functions|DEBUG|media_type:episodes content_type:episodes view_type:Episodes 2022-10-16 02:45:39.618 T:11404 INFO <general>: EmbyCon.resources.lib.dir_functions|DEBUG|== ENTER: processDirectory == 2022-10-16 02:45:39.621 T:11404 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|use_https: False 2022-10-16 02:45:39.621 T:11404 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|verify_cert: False 2022-10-16 02:45:39.631 T:11404 INFO <general>: EmbyCon.resources.lib.datamanager|DEBUG|last_content_url : use_cache=False url={server}/emby/Shows/NextUp/?Userid={userid}&Limit=500&Recursive=true&Fields={field_filters}&Filters=IsUnplayed,IsNotFolder&IsVirtualUnaired=false&IsMissing=False&IncludeItemTypes=Episode&ImageTypeLimit=1&format=json 2022-10-16 02:45:39.636 T:11404 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|use_https: False 2022-10-16 02:45:39.636 T:11404 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|verify_cert: False 2022-10-16 02:45:39.637 T:11404 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|EmbyCon DownloadUtils -> Returning saved UserID: e58f615a43264f2a8c2f84a6e66f2b6f 2022-10-16 02:45:39.641 T:11404 INFO <general>: EmbyCon.resources.lib.datamanager|DEBUG|Loading url data from server 2022-10-16 02:45:39.644 T:11404 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|use_https: False 2022-10-16 02:45:39.644 T:11404 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|verify_cert: False 2022-10-16 02:45:39.644 T:11404 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|DownloadUrl : {server}/emby/Shows/NextUp/?Userid={userid}&Limit=500&Recursive=true&Fields={field_filters}&Filters=IsUnplayed,IsNotFolder&IsVirtualUnaired=false&IsMissing=False&IncludeItemTypes=Episode&ImageTypeLimit=1&format=json 2022-10-16 02:45:39.647 T:11404 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|Before: {server}/emby/Shows/NextUp/?Userid={userid}&Limit=500&Recursive=true&Fields={field_filters}&Filters=IsUnplayed,IsNotFolder&IsVirtualUnaired=false&IsMissing=False&IncludeItemTypes=Episode&ImageTypeLimit=1&format=json 2022-10-16 02:45:39.649 T:11404 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|EmbyCon DownloadUtils -> Returning saved UserID: e58f615a43264f2a8c2f84a6e66f2b6f 2022-10-16 02:45:39.652 T:11404 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|After: http://192.168.1.2:8096/emby/Shows/NextUp/?Userid=e58f615a43264f2a8c2f84a6e66f2b6f&Limit=500&Recursive=true&Fields=DateCreated,EpisodeCount,SeasonCount,Path,Genres,Studios,Etag,Taglines,SortName,RecursiveItemCount,ChildCount,ProductionLocations,CriticRating,OfficialRating,CommunityRating,PremiereDate,ProductionYear,AirTime,Status,Tags,MediaStreams,People,Overview&Filters=IsUnplayed,IsNotFolder&IsVirtualUnaired=false&IsMissing=False&IncludeItemTypes=Episode&ImageTypeLimit=1&format=json 2022-10-16 02:45:39.653 T:11404 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|Connection: HTTP 2022-10-16 02:45:39.655 T:11404 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|EmbyCon DownloadUtils -> Returning saved UserID: e58f615a43264f2a8c2f84a6e66f2b6f 2022-10-16 02:45:39.656 T:11404 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|authenticate called 2022-10-16 02:45:39.656 T:11404 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|EmbyCon DownloadUtils -> Returning saved AccessToken: 148a86f0268d48ac8832ec8fe0425c55 2022-10-16 02:45:39.656 T:11404 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|EmbyCon Authentication Header: {'Accept-encoding': 'gzip', 'Accept-Charset': 'UTF-8,*', 'X-Emby-Authorization': 'MediaBrowser UserId="e58f615a43264f2a8c2f84a6e66f2b6f",Client="Kodi EmbyCon",Device="imagio",DeviceId="94F948A277EA4B13AC4D0327F4520328",Version="1.10.27"', 'X-MediaBrowser-Token': '148a86f0268d48ac8832ec8fe0425c55'} 2022-10-16 02:45:39.657 T:11404 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|HEADERS: {'Accept-encoding': 'gzip', 'Accept-Charset': 'UTF-8,*', 'X-Emby-Authorization': 'MediaBrowser UserId="e58f615a43264f2a8c2f84a6e66f2b6f",Client="Kodi EmbyCon",Device="imagio",DeviceId="94F948A277EA4B13AC4D0327F4520328",Version="1.10.27"', 'X-MediaBrowser-Token': '148a86f0268d48ac8832ec8fe0425c55', 'User-Agent': 'EmbyCon-1.10.27'} 2022-10-16 02:45:39.666 T:11452 INFO <general>: EmbyCon.resources.lib.dir_functions|DEBUG|total_records: 38 2022-10-16 02:45:39.666 T:11452 INFO <general>: EmbyCon.resources.lib.dir_functions|DEBUG|Detected content type: mixed 2022-10-16 02:45:39.666 T:11452 INFO <general>: EmbyCon.resources.lib.dir_functions|DEBUG|SETTING_SORT for media type: 2022-10-16 02:45:39.669 T:11452 INFO <general>: EmbyCon.resources.lib.dir_functions|DEBUG|SETTING_SORT preset_sort_order: 2022-10-16 02:45:39.672 T:11452 INFO <general>: EmbyCon.resources.lib.dir_functions|DEBUG|No view id for view type:view- 2022-10-16 02:45:39.673 T:11452 INFO <general>: EmbyCon.resources.lib.functions|DEBUG|===== EmbyCon FINISHED ===== 2022-10-16 02:45:39.673 T:11452 INFO <general>: CPythonInvoker(20, C:\Users\Alex\AppData\Roaming\Kodi\addons\plugin.video.embycon\default.py): script successfully run 2022-10-16 02:45:39.673 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|HTTP response: 500 Internal Server Error 2022-10-16 02:45:39.673 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|GET URL HEADERS: [('Content-Length', '41'), ('Content-Type', 'text/html'), ('Date', 'Sun, 16 Oct 2022 01:45:39 GMT'), ('Server', 'Kestrel'), ('Access-Control-Allow-Headers', 'Accept, Accept-Language, Authorization, Cache-Control, Content-Disposition, Content-Encoding, Content-Language, Content-Length, Content-MD5, Content-Range, Content-Type, Date, Host, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, Origin, OriginToken, Pragma, Range, Slug, Transfer-Encoding, Want-Digest, X-MediaBrowser-Token, X-Emby-Token, X-Emby-Client, X-Emby-Client-Version, X-Emby-Device-Id, X-Emby-Device-Name, X-Emby-Authorization'), ('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, PATCH, OPTIONS'), ('Access-Control-Allow-Origin', '*'), ('Access-Control-Allow-Private-Network', 'true')] 2022-10-16 02:45:39.673 T:5972 ERROR <general>: EmbyCon.resources.lib.downloadutils|ERROR|HTTP response error: 500 Internal Server Error 2022-10-16 02:45:39.673 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|Closing HTTP connection: <http.client.HTTPConnection object at 0x000001AF98F41AC0> There are two URLs in there that are called, but only one response (500): Quote http://192.168.1.2:8096/emby/Users/e58f615a43264f2a8c2f84a6e66f2b6f/Items/Latest?Limit=20&Recursive=true&GroupItems=true&SortBy=DateCreated&Fields=DateCreated,EpisodeCount,SeasonCount,Path,Genres,Studios,Etag,Taglines,SortName,RecursiveItemCount,ChildCount,ProductionLocations,CriticRating,OfficialRating,CommunityRating,PremiereDate,ProductionYear,AirTime,Status,Tags,MediaStreams,People,Overview&SortOrder=Descending&Filters={IsUnplayed}&IncludeItemTypes=Movie&ImageTypeLimit=1&format=json&StartIndex=0&Limit=10 and Quote http://192.168.1.2:8096/emby/Shows/NextUp/?Userid=e58f615a43264f2a8c2f84a6e66f2b6f&Limit=500&Recursive=true&Fields=DateCreated,EpisodeCount,SeasonCount,Path,Genres,Studios,Etag,Taglines,SortName,RecursiveItemCount,ChildCount,ProductionLocations,CriticRating,OfficialRating,CommunityRating,PremiereDate,ProductionYear,AirTime,Status,Tags,MediaStreams,People,Overview&Filters=IsUnplayed,IsNotFolder&IsVirtualUnaired=false&IsMissing=False&IncludeItemTypes=Episode&ImageTypeLimit=1&format=json Ideas? Edited October 16, 2022 by alexr Link to comment Share on other sites More sharing options...
TeamB 2352 Posted October 16, 2022 Share Posted October 16, 2022 /emby/Users/e58f615a43264f2a8c2f84a6e66f2b6f/Items/Latest ?Limit=20 &Recursive=true &GroupItems=true &SortBy=DateCreated &Fields=DateCreated,EpisodeCount,SeasonCount,Path,Genres,Studios,Etag,Taglines,SortName,RecursiveItemCount,ChildCount,ProductionLocations,CriticRating,OfficialRating,CommunityRating,PremiereDate,ProductionYear,AirTime,Status,Tags,MediaStreams,People,Overview &SortOrder=Descending &Filters={IsUnplayed} &IncludeItemTypes=Movie &ImageTypeLimit=1 &format=json &StartIndex=0 &Limit=10 I dont think this is coming from within the EmbyCon addon. I think this is coming from the skin. Try the default skin. Also you could try turning of paging in the EmbyCon addon, it looks like there are 2 Limit= params and I think from memory the url parser in Emby does not like this. Link to comment Share on other sites More sharing options...
alexrw 13 Posted October 16, 2022 Author Share Posted October 16, 2022 7 minutes ago, TeamB said: Also you could try turning of paging in the EmbyCon addon, it looks like there are 2 Limit= params and I think from memory the url parser in Emby does not like this. Where exactly is that setting? 6 minutes ago, TeamB said: I dont think this is coming from within the EmbyCon addon. I think this is coming from the skin The logs suggest it was issued by Embycon, see the string preceding it "INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG": Quote 2022-10-16 02:45:39.577 T:5972 INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG|After: http://192.168.1.2:8096/emby/Users/e58f615a43264f2a8c2f84a6e66f2b6f/Items/Latest?Limit=20&Recursive=true&GroupItems=true&SortBy=DateCreated&Fields=DateCreated,EpisodeCount,SeasonCount,Path,Genres,Studios,Etag,Taglines,SortName,RecursiveItemCount,ChildCount,ProductionLocations,CriticRating,OfficialRating,CommunityRating,PremiereDate,ProductionYear,AirTime,Status,Tags,MediaStreams,People,Overview&SortOrder=Descending&Filters={IsUnplayed}&IncludeItemTypes=Movie&ImageTypeLimit=1&format=json&StartIndex=0&Limit=10 Link to comment Share on other sites More sharing options...
Solution alexrw 13 Posted October 16, 2022 Author Solution Share Posted October 16, 2022 (edited) Ok, pinpointed the bug. See attached. Setting the first one to 0 instead of 10 got rid of the error. So this is clearly a bug you guys should fix (both of those values greater than 0 causes the error in the first post). The server should also not give an error on this. The URL is valid. The server should just take the last one if duplicate parameters are sent (as per the HTTP RFC iirc ...). At the very least it could give a more informative error message. Thanks for spotting it. Edited October 16, 2022 by alexr Link to comment Share on other sites More sharing options...
TeamB 2352 Posted October 16, 2022 Share Posted October 16, 2022 3 hours ago, alexr said: The logs suggest it was issued by Embycon, see the string preceding it "INFO <general>: EmbyCon.resources.lib.downloadutils|DEBUG": yes the action is a function of EmbyCon but the original request, the thing that caused the action is not EmbyCon The way Kodi addons work is they can call function or actions from between addons and also skins, so other addons and Skins can call EmbyCon actions, this is what is happening here I think, the Embuary Skin is calling EmbyCon with a wrong URL to lookup. Did you try not using the Embuary skin? switch to the default skin and see if you still get the errors when play an item. Link to comment Share on other sites More sharing options...
alexrw 13 Posted October 16, 2022 Author Share Posted October 16, 2022 (edited) See my post above your reply (the 10 and 20 limits appear both in the url). The skin is just requesting items for the Next Up widget, but it's not the skin that builds emby URLs, right? (given the skin is agnostic to the source of media) EDIT: Hmm, it may actually be the skin in this case that build the URLs. Edited October 16, 2022 by alexr Link to comment Share on other sites More sharing options...
TeamB 2352 Posted October 16, 2022 Share Posted October 16, 2022 37 minutes ago, alexr said: EDIT: Hmm, it may actually be the skin in this case that build the URLs. Yes it is the skin, the skin is bypassing EmbyCon and supplying the URL in the EmbyCon action call. Over time the Emby API changes and EmbyCon needs to be updated and it has been but I have no control over the URLs being passed in by other addons and Skins. The GET_CONTENT call is intended for internal use only from within the EmbyCon addon and I am not sure I remember why the skin was using it directly. I could just try to block all external calls to this addon action, this would break the call from the skin and stop the error. Link to comment Share on other sites More sharing options...
alexrw 13 Posted October 17, 2022 Author Share Posted October 17, 2022 Yeah, I just noticed the xml files in the skins folder, it has direct URL calls via the embycon addon. I wouldn't alter Embycon if I were you, but I would encourage Emby devs to not issue an error if http query params are in duplicate, as per the HTTP RFC, or at least issue a better error message to help debugging. I just noticed that the Embuary skin is a bit of a ghost town now, nobody has been maintaining it for almost 1.5y. It has issues with Next Up (not populating the node - https://github.com/sualfred/skin.embuary/issues/117) as well as the video stopping and returning to main screen if I pause the video for a minute (e.g. bathroom break) which is annoying. I haven't found a skin that looks as good and is as functional though Link to comment Share on other sites More sharing options...
TeamB 2352 Posted October 17, 2022 Share Posted October 17, 2022 1 hour ago, alexr said: but I would encourage Emby devs to not issue an error if http query params are in duplicate, as per the HTTP RFC, or at least issue a better error message to help debugging. @Luke not really my call but luke might have a take on this. 1 hour ago, alexr said: the video stopping and returning to main screen if I pause the video for a minute that might actually be the EmbyCon addon doing this, look in the EmbyCon settings under events. Link to comment Share on other sites More sharing options...
Luke 37060 Posted October 17, 2022 Share Posted October 17, 2022 Yes he's right regarding the server handling duplicated params. There's room for improvement there. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now