Search the Community
Showing results for tags 'websocket'.
-
Missing primary images, ffprobe errors, web socket errors (4.8.0.51)
JeffJ0 posted a topic in Android Server
Hello, I am running the 4.8.0.51 beta server (also same issues in 4.7.14.0). I find that some photo (Home photos & videos content) folders are missing primary images. The sub-folders have them (except in one case) but the parent folder doesn't. I tried scanning library, refreshing metadata (all options) but no luck. I'm having to manually add them. Secondly, some videos that were working before seems to fail ffprobe during thumbnail extraction. Here are some errors from the logs: http://192.168.1.228:8096/emby/Items/4956/Refresh?Recursive=true&ImageRefreshMode=FullRefresh&MetadataRefreshMode=FullRefresh&ReplaceAllImages=false&ReplaceAllMetadata=false&X-Emby-Client=Emby for Android&X-Emby-Device-Name=P2EEA&X-Emby-Device-Id=b5f89d57f1f0bfcf&X-Emby-Client-Version=3.3.29&X-Emby-Token=x_secret4_x&X-Emby-Language=en-gb 2023-10-04 20:48:30.505 Error Server: Error processing web socket message *** Error Report *** Version: 4.8.0.51 Command line: /data/app/com.emby.embyserver-Xwj5T-xShY4fmIWpdyZIXA==/base.apk Operating system: Android 10 (REL) SDK:29 BuildId:QP1A.191105.004 Incremental:eng.ren.20210414.163131 Patch-Level: 2019-12-05 Framework: Mono 6.12.0 (2020-02/c633fe92383) 4.0.50524.0 OS/Process: Arm/Arm Runtime: mscorlib.dll Processor count: 4 Data path: /storage/emulated/0/Android/data/com.emby.embyserver/files Application path: /data/user/0/com.emby.embyserver Fingerprint: google/sailfish/sailfish:10/QP1A.191105.004/:userdebug/test-keys Model: H6 - Allwinner/Allwinner Hardware: H6/H6/sun50iw9p1/exdroid SupportedAbis: armeabi-v7a, armeabi System.IndexOutOfRangeException: System.IndexOutOfRangeException: Index was outside the bounds of the array. at ServiceStack.Text.Json.JsonTypeSerializer.ParseString (System.ReadOnlySpan`1[T] json, System.Int32& index) [0x00049] in <bb3ab23d1feb49c79196f0d2a277ae01>:0 at ServiceStack.Text.Json.JsonTypeSerializer.EatValue (System.ReadOnlySpan`1[T] value, System.Int32& i) [0x0008e] in <bb3ab23d1feb49c79196f0d2a277ae01>:0 at ServiceStack.Text.Common.DeserializeTypeRefJson.StringToType (System.ReadOnlySpan`1[T] strType, ServiceStack.Text.TypeConfig typeConfig, ServiceStack.EmptyCtorDelegate ctorFn, System.Collections.Generic.KeyValuePair`2[System.String,ServiceStack.Text.Common.TypeAccessor][] typeAccessors) [0x00114] in <bb3ab23d1feb49c79196f0d2a277ae01>:0 at ServiceStack.Text.Common.DeserializeType`1+StringToTypeContext[TSerializer].DeserializeJson (System.ReadOnlySpan`1[T] value) [0x00000] in <bb3ab23d1feb49c79196f0d2a277ae01>:0 at (wrapper unbox) ServiceStack.Text.Common.DeserializeType`1+StringToTypeContext[ServiceStack.Text.Json.JsonTypeSerializer].DeserializeJson(System.ReadOnlySpan`1<char>) at ServiceStack.Text.Json.JsonReader+<>c__DisplayClass3_0.<GetParseSpanFn>b__0 (System.ReadOnlySpan`1[T] v) [0x0000b] in <bb3ab23d1feb49c79196f0d2a277ae01>:0 at ServiceStack.Text.JsonSerializer.DeserializeFromSpan (System.Type type, System.ReadOnlySpan`1[T] value) [0x0000f] in <bb3ab23d1feb49c79196f0d2a277ae01>:0 at Emby.Common.Implementations.Serialization.JsonSerializer.DeserializeFromSpan (System.ReadOnlySpan`1[T] json, System.Type type) [0x00000] in <f99fe759b9d24ddb9acc763f5aa5f567>:0 at Emby.Server.Implementations.HttpServer.WebSocketConnection.OnReceiveInternal (System.ReadOnlySpan`1[T] message) [0x00029] in <f99fe759b9d24ddb9acc763f5aa5f567>:0 Source: ServiceStack.Text TargetSite: System.ReadOnlySpan`1[System.Char] ParseString(System.ReadOnlySpan`1[System.Char], Int32 ByRef) 2023-10-04 20:50:21.278 Warn Server: AUTH-ERROR: 192.168.1.216 - Access token is invalid or expired. 2023-10-04 21:51:43.823 Info MediaProbeManager: ProcessRun 'ffprobe' Execute: /data/data/com.emby.embyserver/files/ffmpeg/ffprobe -i file:"/storage/5AB9-3C31/Media/Videos/Videos/2021/04-Apr/20210403_103000.MOV" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data 2023-10-04 21:51:44.734 Info MediaProbeManager: ProcessRun 'ffprobe' Process exited with code 0 - Succeeded 2023-10-04 21:51:44.783 Error App: Error in ffprobe *** Error Report *** Version: 4.8.0.51 Command line: /data/app/com.emby.embyserver-Xwj5T-xShY4fmIWpdyZIXA==/base.apk Operating system: Android 10 (REL) SDK:29 BuildId:QP1A.191105.004 Incremental:eng.ren.20210414.163131 Patch-Level: 2019-12-05 Framework: Mono 6.12.0 (2020-02/c633fe92383) 4.0.50524.0 OS/Process: Arm/Arm Runtime: mscorlib.dll Processor count: 4 Data path: /storage/emulated/0/Android/data/com.emby.embyserver/files Application path: /data/user/0/com.emby.embyserver Fingerprint: google/sailfish/sailfish:10/QP1A.191105.004/:userdebug/test-keys Model: H6 - Allwinner/Allwinner Hardware: H6/H6/sun50iw9p1/exdroid SupportedAbis: armeabi-v7a, armeabi Emby.Server.MediaEncoding.Unified.Ffmpeg.FfRunException: Emby.Server.MediaEncoding.Unified.Ffmpeg.FfRunException: ffprobe failed - streams and format are both null: -i file:"/storage/5AB9-3C31/Media/Videos/Videos/2021/04-Apr/20210403_103000.MOV" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data ffprobe version 5.1-emby_2023_06_25 Copyright (c) 2007-2022 the FFmpeg developers and softworkz for Emby LLC built with Android (9352603, based on r450784d1) clang version 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6) [mov,mp4,m4a,3gp,3g2,mj2 @ 0xee771000] moov atom not found file:/storage/5AB9-3C31/Media/Videos/Videos/2021/04-Apr/20210403_103000.MOV: Invalid data found when processing input { } at Emby.Server.MediaEncoding.Probing.MediaProbeManager.GetMediaInfoInternal (System.String inputPath, System.String primaryPath, MediaBrowser.Model.MediaInfo.MediaProtocol protocol, System.String userAgent, System.Boolean extractChapters, System.String probeSizeArgument, System.Boolean isAudio, System.Threading.CancellationToken cancellationToken) [0x00224] in <6fcfe4a870074ef984b116511d2cc2b3>:0 at Emby.Providers.MediaInfo.FFProbeVideoInfo.ProbeVideo[T] (MediaBrowser.Controller.Providers.MetadataResult`1[T] metadataResult, MediaBrowser.Controller.Providers.MetadataRefreshOptions options, MediaBrowser.Model.Configuration.LibraryOptions libraryOptions, System.Threading.CancellationToken cancellationToken) [0x0026b] in <83a9cb2cc28d42849fdee2426cb071f8>:0 at Emby.Providers.Manager.MetadataService`2[TItemType,TIdType].RunCustomProvider (MediaBrowser.Controller.Providers.ICustomMetadataProvider`1[TItemType] provider, MediaBrowser.Controller.Providers.MetadataResult`1[T] itemResult, System.String logName, MediaBrowser.Controller.Providers.MetadataRefreshOptions options, MediaBrowser.Model.Configuration.LibraryOptions libraryOptions, Emby.Providers.Manager.RefreshResult refreshResult, System.Threading.CancellationToken cancellationToken) [0x000df] in <83a9cb2cc28d42849fdee2426cb071f8>:0 Source: mscorlib TargetSite: Void Throw() 2023-10-04 20:53:28.323 Info Server: http/1.1 Response 204 to host5. Time: 478ms. POST http://192.168.1.228:8096/emby/Items/39?X-Emby-Client=Emby for Android&X-Emby-Device-Name=P25T_EEA&X-Emby-Device-Id=b5f89d57f1f0bfcf&X-Emby-Client-Version=3.3.29&X-Emby-Token=x_secret4_x&X-Emby-Language=en-gb&reqformat=json 2023-10-04 20:57:42.723 Info App: Sqlite: 284 - automatic index on LastWatchedEpisodes(SeriesPresentationUniqueKey) 2023-10-04 21:00:16.915 Info HttpServer: WS http://192.168.1.228:8096/embywebsocket?api_key=7c2c8941b19245d582d7e633f94fefb4&deviceId=b5e89d57f1f0bfcf. UserAgent: Mozilla/5.0 (Linux; Android 12; P25T_EEA Build/SQ1D.211205.016.A5; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Safari/537.36 2023-10-04 21:00:26.286 Error Server: Error processing request *** Error Report *** Version: 4.8.0.51 Command line: /data/app/com.emby.embyserver-Xwj5T-xShY4fmIWpdyZIXA==/base.apk Operating system: Android 10 (REL) SDK:29 BuildId:QP1A.191105.004 Incremental:eng.ren.20210414.163131 Patch-Level: 2019-12-05 Framework: Mono 6.12.0 (2020-02/c633fe92383) 4.0.50524.0 OS/Process: Arm/Arm Runtime: mscorlib.dll Processor count: 4 Data path: /storage/emulated/0/Android/data/com.emby.embyserver/files Application path: /data/user/0/com.emby.embyserver Fingerprint: google/sailfish/sailfish:10/QP1A.191105.004/:userdebug/test-keys Model: H6 - Allwinner/Allwinner Hardware: H6/H6/sun50iw9p1/exdroid SupportedAbis: armeabi-v7a, armeabi System.ArgumentException: System.ArgumentException: Invalid path at System.IO.Path.GetDirectoryName (System.String path) [0x0000d] in <1b39a03c32ec46258a7821e202e0269f>:0 at Emby.Server.Implementations.IO.ManagedFileSystem.GetDirectoryName (System.String path) [0x00028] in <f99fe759b9d24ddb9acc763f5aa5f567>:0 at Emby.Server.Implementations.IO.ManagedFileSystem.ToFileSystemMetadata (System.String path) [0x0001f] in <f99fe759b9d24ddb9acc763f5aa5f567>:0 at System.Linq.Enumerable+SelectEnumerableIterator`2[TSource,TResult].ToList () [0x0001b] in <2b518444249345309542daed2e208536>:0 at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0001f] in <2b518444249345309542daed2e208536>:0 at Emby.Server.Implementations.IO.ManagedFileSystem.NormalizeDuplicates (MediaBrowser.Model.IO.FileSystemMetadata[] paths, System.Boolean checkSubPaths) [0x00122] in <f99fe759b9d24ddb9acc763f5aa5f567>:0 at Emby.Server.Implementations.IO.ManagedFileSystem.CreateCommonFolderList () [0x000a8] in <f99fe759b9d24ddb9acc763f5aa5f567>:0 at Emby.Server.Implementations.IO.ManagedFileSystem.get_CommonFolders () [0x00000] in <f99fe759b9d24ddb9acc763f5aa5f567>:0 at Emby.Api.EnvironmentService.GetDrives () [0x00000] in <d35fa6c16bd7430f8124efeed3028a50>:0 at Emby.Api.EnvironmentService.Get (Emby.Api.GetDrives request) [0x00000] in <d35fa6c16bd7430f8124efeed3028a50>:0 at (wrapper dynamic-method) System.Object.lambda_method(System.Runtime.CompilerServices.Closure,object,object) at Emby.Server.Implementations.Services.ServiceController.Execute (Emby.Server.Implementations.HttpServer.HttpListenerHost appHost, System.Object requestDto, MediaBrowser.Model.Services.IRequest req, System.Type serviceType) [0x0008c] in <f99fe759b9d24ddb9acc763f5aa5f567>:0 at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync (Emby.Server.Implementations.HttpServer.HttpListenerHost httpHost, MediaBrowser.Controller.IServerApplicationHost appHost, MediaBrowser.Model.Services.IRequest httpReq, MediaBrowser.Model.Services.IResponse httpRes, MediaBrowser.Model.IO.IStreamHelper streamHelper, Emby.Server.Implementations.Services.RestPath restPath, System.String responseContentType, System.Threading.CancellationToken cancellationToken) [0x001d1] in <f99fe759b9d24ddb9acc763f5aa5f567>:0 at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler (MediaBrowser.Model.Services.IRequest httpReq, System.ReadOnlyMemory`1[T] urlString, System.ReadOnlyMemory`1[T] localPath, System.Threading.CancellationToken cancellationToken) [0x00b9c] in <f99fe759b9d24ddb9acc763f5aa5f567>:0 Source: mscorlib TargetSite: Void Throw() Thanks -
Hey guys, first of all: Emby for Kodi is the reason why i came to emby. Great app, much appreciated. @@Angelblue05 @@sualfred I'm still testing a lot of stuff but i found some errors in my kodi.log. Every five seconds it gives me a never ending loop of these: NOTICE: EMBY.entrypoint.service -> [ onNotification/plugin.video.emby/WebSocketRestarting ] NOTICE: Emby.emby.core.ws_client -> ERROR:: Handshake Status 503 Debug logging within emby for kodi will add these two lines: NOTICE: EMBY.helper.utils -> DEBUG:: ---[ event: plugin.video.emby/WebSocketRestarting ] "[{}]" NOTICE: EMBY.entrypoint.service -> DEBUG:: [ plugin.video.emby: WebSocketRestarting ] {} The http error code 503 comes from my haproxy, which does SNI and SSL-offloading (e.g. by emby.domain.com) on port 443 and will return a 503, if you use none or a non existent hostname in your request. Making emby server and emby.domain.com my the default (fallback), the websocket will work with haproxy. For obvious reasons i don't want to use my emby server as 'default backend' on any request on port 443. Haproxy logs show, that the request is: "GET /embywebsocket?api_key=<removed>&device_id=<removed> HTTP/1.1" (See update at the end) Unfortunately i could not figure a way to make haproxy or emby for kodi show me the whole request with the hostname, so one can only guess, that is might not be the hostname but maybe only the ip address? While searching about this, i only found this locked topic, from which i didn't get any helping hints. I understand there was a fix in the websockets request in 2017 which added a slash before the 'embywebsocket': https://emby.media/community/index.php?/topic/50062-web-sockets-and-reverse-proxy/ Since i can see the get request with the leading slash, i figure this can't be the reason for the 503. Of cause i'd like to rule out a configuration error on the haproxy side. Since streaming and database updates seem to work as long with the workaround using emby server as default backend for SNI, in my opinion this has to be a websocket request specific problem. So my first question would be: Does anybody have this working with reverse proxy and SNI (without emby as default backend)? On the other hand i'm not sure what the websocket is used for. I figured it might be the 'send message' feature from server to client or the 'inform about new content' over 'server is restarting' and so on. Which features depend on a websocket to the emby server? Is it 'required'? I'd also like to look further into this, but i can't seem to find the full websocket request in any log. Is there a way to see the whole request somewhere in emby for kodi? I'm running: - emby for kodi 4.1.19 - Libreelec 9.2.2 with Kodi 18.6 - Emby server 4.4.2.0 Thanks for your help or hints in advance. Steve UPDATE: I figured how to make haproxy capture the sent host headers from the http request and log them. The problems seems to be that an additonal colon from the appending port remains inside the host header (e.g. emby.domain.com: ). This seems to be the reason why haproxy can't find the hostname. Is this a bug inside Kodi for Emby? I use 'manual server' with 'https://emby.domain.com:443'.This still only happens with the websockets request. Can someone tell, how this request does handle the host header differently from the other requests? SOLUTION: Emby for Kodi does SNI correctly. It turned out i had my haproxy configuration wrong. It was redirecting to emby server based on the host header within the http request, but it should have redirected by the SNI within the tcp request. I set it to sni and now it works perfect. Thanks for pointing me back to the haproxy logs and sorry for wasting your time @@Luke.
-
TLDR How does the server tell a client to re-render library content? A few example use-cases are: client searches for library media, server dynamically adds media to library, client never receives library updates until they type the next word client views a library item, server dynamically downloads subtitles for library item, client never receives subtitle updates until they press back and view the library item again Things I've tried: POST /Library/Media/Updated only downloads metadata for parameters in the request body POST /Sessions/{Id}/Message/LibraryChanged command but the clients never receive a websocket message, the only time I've witnesses the client receive a LibraryChanged message is a full minute after a library scan is completed, would be nice to manually send this command immediately after the library scan Issues I've come across: Roku clients never receive updates of any kind from the server, most likely related to using roku's native remote control api which is restricted to same subnet ip addresses
-
I remember some time ago when I was able to send remote control commands to the Roku app from a server outside the network via websockets. From what I understand is, currently it's not possible to do this anymore since the new Roku remote control API implementation. I'm aware of the port forwarding solution, but that's an impossible feat to teach Mom; she won't even attempt it. lol I was wondering if there's any other way to get this to work again. Maybe revert the websocket removal in the next release or a plugin of some sort? Any advise to point me in the right direction would be groovy smoothie. Thank you!
-
Checked the WebSocket wiki page. It shows to connect to a WebSocket you will require an API key and device ID I'm trying to get the device ID as soon as any user logs in to the server. Till now I got no response after WebSocket connection. here's my python code websocket.enableTrace(True) host = "xxx.xx.xx.xx" port = 8096 api_key = "xxxxxx" device_id = "xxxx" ws = websocket.create_connection("ws://{}:{}/embywebsocket?api_key={}&deviceId={}".format(host, port, api_key, device_id)) result = ws.recv() print('Result: {}'.format(result)) result = ws.recv() print('Result: {}'.format(result)) # Trying something from community... ws.send(json.dumps([json.dumps({'msg': 'connect', 'version': '1', 'support': ['1', 'pre2', 'pre1']})])) result = ws.recv() print('Result: {}'.format(result)) Result: --- request header --- GET /embywebsocket?api_key=xxxxxxxx&deviceId=a7650139abe6b220 HTTP/1.1 Upgrade: websocket Connection: Upgrade Host: xxx.xx.xx.xx:8096 Origin: http://xxx.xx.xx.xx:8096 Sec-WebSocket-Key: mHuOCG3yyL41uB7gk7fK8g== Sec-WebSocket-Version: 13 ----------------------- --- response header --- HTTP/1.1 101 Switching Protocols Connection: Upgrade Upgrade: websocket Sec-WebSocket-Accept: Ta03Qfon0bEHLCQKG+0BtGNZXjQ= ----------------------- send: b'\x8a\x80\x93\tf\xe1' send: b'\x8a\x80\x13\xf8qB' send: b'\x8a\x80\xa3\xf3\xa1b' send: b'\x8a\x80\xa9\x87\xad\x9e' send: b'\x8a\x80@\x19\xa7\xa7' These send messages came after some time of no response. These are not proper Hex codes. IDK what they are. Requesting EMBY gurus to help me on this. I think I don't even know much about WebSockets
-
Hello, I didn't see a post about this, so I thought I would ask. I'm pretty sure this has something to do with fedora, because the webplayer works fine at home on chrome/firefix/qutebrowser on arch (client side), however I'm currently on a fresh install of fedora (client side) and when I try to play a move in chrome or firefox, it hangs and in the js console I get a message about websocket problems. I added a few things to my apache config to try and fix this, but I went from a 404, to a 500 and then to a "Invalid Socket response" message. I'm wondering if I just forgot to install some library on the client side that is causing the browsers not to run the web player correctly. I checked the emby server logs and everything on the server end seems to be in order, emby even thinks the transaction was successful and shows the movie currently being played even though the web player stalled out in the browser. Nothing is showing up in the apache logs ether, so the proxypass I have set up is working fine. So my question is, could I be missing some libraries that chrome/firefox needs in order to properly talk over a webshell? I will be happy to provide the logs I mentions if you would like, but I don't know that it will be necessary as both (emby server and apache error logs) are clean.
- 5 replies
-
- web player
- websocket
-
(and 3 more)
Tagged with:
-
I'm working on expanding an existing python library that uses the HTTP api to interact with emby to use websockets where possible to allow for faster updates with less polling. Looking through the websockets documentation and in doing some testing I can't seem to find a way to initiate a single websocket connection that would give me events for all devices currently active in emby. Am I missing something or this the intended usage? Thus far the best workflow I can come up with is query the api for currently active device and then open a websocket connection for each active device. Any insight is appreciated. Thanks.
-
I found a few locked threads from people who have encountered the same issue that I have. Collections/movie sets are not updating with Kodi when they are added, edited or deleted in Emby. According to those posts, this is a known issue that happens with some servers not sending the websocket messages. Has the cause been identified and is there a fix coming for this? Is there any way other than the manual DB reset from the Kodi-Emby Add-on? That takes 45 minutes.
- 7 replies
-
- kodi
- collections
-
(and 2 more)
Tagged with:
-
Hi there, I'm running latest emby on my linux server, everything (more or less) seems to work fine, but my logs show some erros, see below and attachment, what can I do, what is going wrong? thx emby1.log