mregni / EmbyStat

Multiplatform statistics server for Emby server
MIT License
286 stars 21 forks source link

Null reference exception on Media sync #1155

Closed mregni closed 4 years ago

mregni commented 4 years ago

ok started and configured but the media sync it is not working.

2020-04-08 11:43:59.0486 [INFO] SYSTEM Booting up server on port 6555 2020-04-08 11:44:00.4750 [INFO] Starting Hangfire Server using job storage: 'Hangfire.MemoryStorage.MemoryStorage' 2020-04-08 11:44:00.4805 [INFO] Using the following options for Hangfire Server: Worker count: 1 Listening queues: 'main' Shutdown timeout: 1.00:00:00 Schedule polling interval: 00:00:05 2020-04-08 11:44:00.7264 [INFO] Server main server:1:44697e41 successfully announced in 214.9319 ms 2020-04-08 11:44:00.7353 [INFO] Server main server:1:44697e41 is starting the registered dispatchers: ServerWatchdog, ServerJobCancellationWatcher, ExpirationManager, CountersAggregator, Worker, DelayedJobScheduler, RecurringJobScheduler... 2020-04-08 11:44:00.7782 [INFO] Server main server:1:44697e41 all the dispatchers started 2020-04-08 11:44:27.0562 [INFO] SERVER-API jellyfin server found at: 172.17.0.5 2020-04-08 11:45:10.6953 [INFO] Connecting to wss://xxx.xxx.xxx.xxx:xxxx/embywebsocket?api_key=xxxxxxxxxxxxxx&deviceId=2abd8caa-ffdf-4c36-92e9-dce5a46b58e3 2020-04-08 11:45:15.6922 [INFO] Connecting to wss://xxx.xxx.xxx.xxx:xxxx/embywebsocket?api_key=xxxxxxxxxxxxxx&deviceId=2abd8caa-ffdf-4c36-92e9-dce5a46b58e3 2020-04-08 11:45:16.0956 [INFO] SMALLEMBYSYNC-JOB Starting job 2020-04-08 11:45:16.2790 [INFO] SMALLEMBYSYNC-JOB Server info downloaded 2020-04-08 11:45:16.4306 [INFO] SMALLEMBYSYNC-JOB Server plugins downloaded 2020-04-08 11:45:16.6946 [INFO] SMALLEMBYSYNC-JOB Server users downloaded 2020-04-08 11:45:17.8280 [INFO] SMALLEMBYSYNC-JOB Server devices downloaded 2020-04-08 11:45:18.0891 [INFO] SMALLEMBYSYNC-JOB Job finished after 1 minute. 2020-04-08 11:45:18.5938 [INFO] MEDIASYNC-JOB Starting job 2020-04-08 11:45:18.7084 [INFO] MEDIASYNC-JOB First delete all existing media and root media libraries from database so we have a clean start. 2020-04-08 11:45:18.7110 [INFO] MEDIASYNC-JOB Asking MediaServer for all root folders 2020-04-08 11:45:18.8380 [INFO] MEDIASYNC-JOB Found 6 root items, getting ready for processing 2020-04-08 11:45:18.8452 [INFO] MEDIASYNC-JOB Lets start processing movies 2020-04-08 11:45:18.9566 [ERROR] Error while running job System.NullReferenceException: Object reference not set to an instance of an object. at EmbyStat.Clients.Base.Http.BaseHttpClient.GetMovieCount(String parentId) at EmbyStat.Clients.Jellyfin.Http.JellyfinHttpClient.EmbyStat.Clients.Base.Http.IHttpClient.GetMovieCount(String parentId) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.ProcessMoviesAsync(IReadOnlyList1 libraries, CancellationToken cancellationToken) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.RunJobAsync() at EmbyStat.Jobs.BaseJob.Execute() 2020-04-08 11:45:19.0125 [ERROR] MEDIASYNC-JOB Job failed, check logs for more info. 2020-04-08 11:45:20.1230 [WARN] Failed to process the job 'd1fe433c-87bd-4440-ac94-4c7d6c8a4e90': an exception occurred. Retry attempt 1 of 2 will be performed in 00:00:36. System.NullReferenceException: Object reference not set to an instance of an object. at EmbyStat.Clients.Base.Http.BaseHttpClient.GetMovieCount(String parentId) at EmbyStat.Clients.Jellyfin.Http.JellyfinHttpClient.EmbyStat.Clients.Base.Http.IHttpClient.GetMovieCount(String parentId) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.ProcessMoviesAsync(IReadOnlyList1 libraries, CancellationToken cancellationToken) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.RunJobAsync() at EmbyStat.Jobs.BaseJob.Execute() at EmbyStat.Jobs.BaseJob.Execute() at System.Runtime.CompilerServices.TaskAwaiter.GetResult() 2020-04-08 11:45:20.7157 [INFO] Connecting to wss://xxx.xxx.xxx.xxx:xxxx/embywebsocket?api_key=xxxxxxxxxxxxxx&deviceId=2abd8caa-ffdf-4c36-92e9-dce5a46b58e3 2020-04-08 11:45:25.6871 [INFO] Connecting to wss://xxx.xxx.xxx.xxx:xxxx/embywebsocket?api_key=xxxxxxxxxxxxxx&deviceId=2abd8caa-ffdf-4c36-92e9-dce5a46b58e3 2020-04-08 11:45:30.6921 [INFO] Connecting to wss://xxx.xxx.xxx.xxx:xxxx/embywebsocket?api_key=xxxxxxxxxxxxxx&deviceId=2abd8caa-ffdf-4c36-92e9-dce5a46b58e3 2020-04-08 11:45:35.6872 [INFO] Connecting to wss://xxx.xxx.xxx.xxx:xxxx/embywebsocket?api_key=xxxxxxxxxxxxxx&deviceId=2abd8caa-ffdf-4c36-92e9-dce5a46b58e3 2020-04-08 11:45:35.8272 [INFO] MEDIASYNC-JOB Starting job 2020-04-08 11:45:35.9284 [INFO] MEDIASYNC-JOB First delete all existing media and root media libraries from database so we have a clean start. 2020-04-08 11:45:35.9284 [INFO] MEDIASYNC-JOB Asking MediaServer for all root folders 2020-04-08 11:45:35.9773 [INFO] MEDIASYNC-JOB Found 6 root items, getting ready for processing 2020-04-08 11:45:35.9790 [INFO] MEDIASYNC-JOB Lets start processing movies 2020-04-08 11:45:36.0092 [ERROR] Error while running job System.NullReferenceException: Object reference not set to an instance of an object. at EmbyStat.Clients.Base.Http.BaseHttpClient.GetMovieCount(String parentId) at EmbyStat.Clients.Jellyfin.Http.JellyfinHttpClient.EmbyStat.Clients.Base.Http.IHttpClient.GetMovieCount(String parentId) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.ProcessMoviesAsync(IReadOnlyList1 libraries, CancellationToken cancellationToken) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.RunJobAsync() at EmbyStat.Jobs.BaseJob.Execute() 2020-04-08 11:45:36.0432 [ERROR] MEDIASYNC-JOB Job failed, check logs for more info. 2020-04-08 11:45:36.7765 [WARN] Failed to process the job '14dc8978-c7bb-4d65-80d9-61d5de6c51cd': an exception occurred. Retry attempt 1 of 2 will be performed in 00:00:44. System.NullReferenceException: Object reference not set to an instance of an object. at EmbyStat.Clients.Base.Http.BaseHttpClient.GetMovieCount(String parentId) at EmbyStat.Clients.Jellyfin.Http.JellyfinHttpClient.EmbyStat.Clients.Base.Http.IHttpClient.GetMovieCount(String parentId) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.ProcessMoviesAsync(IReadOnlyList1 libraries, CancellationToken cancellationToken) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.RunJobAsync() at EmbyStat.Jobs.BaseJob.Execute() at EmbyStat.Jobs.BaseJob.Execute() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2020-04-08 11:45:40.6876 [INFO] Connecting to wss://xxx.xxx.xxx.xxx:xxxx/embywebsocket?api_key=xxxxxxxxxxxxxx&deviceId=2abd8caa-ffdf-4c36-92e9-dce5a46b58e3 2020-04-08 11:45:45.6866 [INFO] Connecting to wss://xxx.xxx.xxx.xxx:xxxx/embywebsocket?api_key=xxxxxxxxxxxxxx&deviceId=2abd8caa-ffdf-4c36-92e9-dce5a46b58e3 2020-04-08 11:45:50.6895 [INFO] Connecting to wss://xxx.xxx.xxx.xxx:xxxx/embywebsocket?api_key=xxxxxxxxxxxxxx&deviceId=2abd8caa-ffdf-4c36-92e9-dce5a46b58e3 2020-04-08 11:45:55.7509 [INFO] Connecting to wss://xxx.xxx.xxx.xxx:xxxx/embywebsocket?api_key=xxxxxxxxxxxxxx&deviceId=2abd8caa-ffdf-4c36-92e9-dce5a46b58e3 2020-04-08 11:46:00.6894 [INFO] Connecting to wss://xxx.xxx.xxx.xxx:xxxx/embywebsocket?api_key=xxxxxxxxxxxxxx&deviceId=2abd8caa-ffdf-4c36-92e9-dce5a46b58e3 2020-04-08 11:46:05.6876 [INFO] Connecting to wss://xxx.xxx.xxx.xxx:xxxx/embywebsocket?api_key=xxxxxxxxxxxxxx&deviceId=2abd8caa-ffdf-4c36-92e9-dce5a46b58e3 2020-04-08 11:46:06.8518 [INFO] MEDIASYNC-JOB Starting job 2020-04-08 11:46:06.9256 [INFO] MEDIASYNC-JOB First delete all existing media and root media libraries from database so we have a clean start. 2020-04-08 11:46:06.9275 [INFO] MEDIASYNC-JOB Asking MediaServer for all root folders 2020-04-08 11:46:06.9672 [INFO] MEDIASYNC-JOB Found 6 root items, getting ready for processing 2020-04-08 11:46:06.9672 [INFO] MEDIASYNC-JOB Lets start processing movies 2020-04-08 11:46:07.0123 [ERROR] Error while running job System.NullReferenceException: Object reference not set to an instance of an object. at EmbyStat.Clients.Base.Http.BaseHttpClient.GetMovieCount(String parentId) at EmbyStat.Clients.Jellyfin.Http.JellyfinHttpClient.EmbyStat.Clients.Base.Http.IHttpClient.GetMovieCount(String parentId) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.ProcessMoviesAsync(IReadOnlyList1 libraries, CancellationToken cancellationToken) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.RunJobAsync() at EmbyStat.Jobs.BaseJob.Execute() 2020-04-08 11:46:07.0813 [ERROR] MEDIASYNC-JOB Job failed, check logs for more info. 2020-04-08 11:46:07.6671 [WARN] Failed to process the job 'd1fe433c-87bd-4440-ac94-4c7d6c8a4e90': an exception occurred. Retry attempt 2 of 2 will be performed in 00:00:38. System.NullReferenceException: Object reference not set to an instance of an object. at EmbyStat.Clients.Base.Http.BaseHttpClient.GetMovieCount(String parentId) at EmbyStat.Clients.Jellyfin.Http.JellyfinHttpClient.EmbyStat.Clients.Base.Http.IHttpClient.GetMovieCount(String parentId) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.ProcessMoviesAsync(IReadOnlyList1 libraries, CancellationToken cancellationToken) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.RunJobAsync() at EmbyStat.Jobs.BaseJob.Execute() at EmbyStat.Jobs.BaseJob.Execute() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2020-04-08 11:46:07.7107 [INFO] MEDIASYNC-JOB Starting job 2020-04-08 11:46:07.7718 [INFO] MEDIASYNC-JOB First delete all existing media and root media libraries from database so we have a clean start. 2020-04-08 11:46:07.7718 [INFO] MEDIASYNC-JOB Asking MediaServer for all root folders 2020-04-08 11:46:07.8243 [INFO] MEDIASYNC-JOB Found 6 root items, getting ready for processing 2020-04-08 11:46:07.8243 [INFO] MEDIASYNC-JOB Lets start processing movies 2020-04-08 11:46:07.8619 [ERROR] Error while running job System.NullReferenceException: Object reference not set to an instance of an object. at EmbyStat.Clients.Base.Http.BaseHttpClient.GetMovieCount(String parentId) at EmbyStat.Clients.Jellyfin.Http.JellyfinHttpClient.EmbyStat.Clients.Base.Http.IHttpClient.GetMovieCount(String parentId) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.ProcessMoviesAsync(IReadOnlyList1 libraries, CancellationToken cancellationToken) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.RunJobAsync() at EmbyStat.Jobs.BaseJob.Execute() 2020-04-08 11:46:07.8953 [ERROR] MEDIASYNC-JOB Job failed, check logs for more info. 2020-04-08 11:46:08.6235 [WARN] Failed to process the job '0f980538-c525-4305-bb8c-0c0b56b0bd69': an exception occurred. Retry attempt 1 of 2 will be performed in 00:00:17. System.NullReferenceException: Object reference not set to an instance of an object. at EmbyStat.Clients.Base.Http.BaseHttpClient.GetMovieCount(String parentId) at EmbyStat.Clients.Jellyfin.Http.JellyfinHttpClient.EmbyStat.Clients.Base.Http.IHttpClient.GetMovieCount(String parentId) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.ProcessMoviesAsync(IReadOnlyList1 libraries, CancellationToken cancellationToken) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.RunJobAsync() at EmbyStat.Jobs.BaseJob.Execute() at EmbyStat.Jobs.BaseJob.Execute() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2020-04-08 11:46:10.6897 [INFO] Connecting to wss://xxx.xxx.xxx.xxx:xxxx/embywebsocket?api_key=xxxxxxxxxxxxxx&deviceId=2abd8caa-ffdf-4c36-92e9-dce5a46b58e3 2020-04-08 11:46:15.6891 [INFO] Connecting to wss://xxx.xxx.xxx.xxx:xxxx/embywebsocket?api_key=xxxxxxxxxxxxxx&deviceId=2abd8caa-ffdf-4c36-92e9-dce5a46b58e3

Originally posted by @spupuz in https://github.com/mregni/EmbyStat/issues/1039#issuecomment-610861806

mregni commented 4 years ago

Extra logging => https://github.com/mregni/EmbyStat/issues/1039#issuecomment-611040842

yangkghjh commented 4 years ago

Same issue here.

Logs:

2020-04-12 04:39:36.8085 [INFO] MEDIASYNC-JOB   Starting job 
2020-04-12 04:39:37.0052 [INFO] MEDIASYNC-JOB   First delete all existing media and root media libraries from database so we have a clean start. 
2020-04-12 04:39:37.0070 [INFO] MEDIASYNC-JOB   Asking MediaServer for all root folders 
2020-04-12 04:39:37.1888 [INFO] MEDIASYNC-JOB   Found 3 root items, getting ready for processing 
2020-04-12 04:39:37.1906 [INFO] MEDIASYNC-JOB   Lets start processing movies 
2020-04-12 04:39:37.2251 [ERROR] Error while running job System.NullReferenceException: Object reference not set to an instance of an object.
   at EmbyStat.Clients.Base.Http.BaseHttpClient.GetMovieCount(String parentId)
   at EmbyStat.Clients.Jellyfin.Http.JellyfinHttpClient.EmbyStat.Clients.Base.Http.IHttpClient.GetMovieCount(String parentId)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.ProcessMoviesAsync(IReadOnlyList`1 libraries, CancellationToken cancellationToken)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.RunJobAsync()
   at EmbyStat.Jobs.BaseJob.Execute()
2020-04-12 04:39:37.3834 [ERROR] MEDIASYNC-JOB  Job failed, check logs for more info. 
2020-04-12 04:39:37.8243 [WARN] Failed to process the job 'ff9936b6-cfcc-4fa9-b025-c8e55877faff': an exception occurred. Retry attempt 2 of 2 will be performed in 00:00:16. System.NullReferenceException: Object reference not set to an instance of an object.
   at EmbyStat.Clients.Base.Http.BaseHttpClient.GetMovieCount(String parentId)
   at EmbyStat.Clients.Jellyfin.Http.JellyfinHttpClient.EmbyStat.Clients.Base.Http.IHttpClient.GetMovieCount(String parentId)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.ProcessMoviesAsync(IReadOnlyList`1 libraries, CancellationToken cancellationToken)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.RunJobAsync()
   at EmbyStat.Jobs.BaseJob.Execute()
   at EmbyStat.Jobs.BaseJob.Execute()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
spupuz commented 4 years ago

does a new docker version has come up? i still have the same problem and i'm still on version v0.2.0-beta.18.

mregni commented 4 years ago

Just released beta.19 so feel free to test it. I hope it's fixed :)

spupuz commented 4 years ago

same issue:

2020-04-21 13:17:05.0720 [INFO] SYSTEM Booting up server on port 6555 2020-04-21 13:17:06.3883 [INFO] Starting Hangfire Server using job storage: 'Hangfire.MemoryStorage.MemoryStorage' 2020-04-21 13:17:06.3931 [INFO] Using the following options for Hangfire Server: Worker count: 1 Listening queues: 'main' Shutdown timeout: 1.00:00:00 Schedule polling interval: 00:00:05 2020-04-21 13:17:06.6451 [INFO] Server main server:1:9058824b successfully announced in 219.6576 ms 2020-04-21 13:17:06.6665 [INFO] Server main server:1:9058824b is starting the registered dispatchers: ServerWatchdog, ServerJobCancellationWatcher, ExpirationManager, CountersAggregator, Worker, DelayedJobScheduler, RecurringJobScheduler... 2020-04-21 13:17:06.7013 [INFO] Server main server:1:9058824b all the dispatchers started 2020-04-21 13:17:28.7969 [INFO] SERVER-API jellyfin server found at: 172.17.0.2 2020-04-21 13:18:12.0451 [INFO] SERVER-API jellyfin server found at: 172.17.0.2 2020-04-21 13:18:36.7966 [INFO] SMALLEMBYSYNC-JOB Starting job 2020-04-21 13:18:36.8898 [INFO] SMALLEMBYSYNC-JOB Server info downloaded 2020-04-21 13:18:36.9501 [INFO] SMALLEMBYSYNC-JOB Server plugins downloaded 2020-04-21 13:18:37.0774 [INFO] SMALLEMBYSYNC-JOB Server users downloaded 2020-04-21 13:18:37.4886 [INFO] SMALLEMBYSYNC-JOB Server devices downloaded 2020-04-21 13:18:37.5162 [INFO] SMALLEMBYSYNC-JOB Job finished after 1 minute. 2020-04-21 13:18:37.6991 [INFO] MEDIASYNC-JOB Starting job 2020-04-21 13:18:37.7327 [INFO] MEDIASYNC-JOB First delete all existing media and root media libraries from database so we have a clean start. 2020-04-21 13:18:37.7349 [INFO] MEDIASYNC-JOB Asking MediaServer for all root folders 2020-04-21 13:18:37.8201 [INFO] MEDIASYNC-JOB Found 6 root items, getting ready for processing 2020-04-21 13:18:37.8285 [INFO] MEDIASYNC-JOB Lets start processing movies 2020-04-21 13:18:37.8949 [WARN] MEDIASYNC-JOB 0 movies found in parent with id f137a2dd21bbc1b99aa5c0f6bf02a805. Propably means something is wrong with the HTTP call. 2020-04-21 13:18:37.9004 [WARN] MEDIASYNC-JOB 0 movies found in parent with id 52f1cc5cfe5ba8c9452cebe7bca9e026. Propably means something is wrong with the HTTP call. 2020-04-21 13:18:37.9080 [WARN] MEDIASYNC-JOB 0 movies found in parent with id bcc9abb958bc0a1350581cbef4d3bcbc. Propably means something is wrong with the HTTP call. 2020-04-21 13:18:37.9136 [INFO] MEDIASYNC-JOB Lets start processing show 2020-04-21 13:18:37.9136 [INFO] MEDIASYNC-JOB Logging in on the Tvdb API. 2020-04-21 13:18:38.6670 [ERROR] Error while running job System.NullReferenceException: Object reference not set to an instance of an object. at EmbyStat.Clients.Base.Http.BaseHttpClient.GetShows(String parentId) at EmbyStat.Clients.Jellyfin.Http.JellyfinHttpClient.EmbyStat.Clients.Base.Http.IHttpClient.GetShows(String libraryId) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.PerformShowSyncAsync(IReadOnlyList1 showsThatNeedAnUpdate, Library library, DateTime updateStartTime) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.ProcessShowsAsync(IEnumerable1 libraries, CancellationToken cancellationToken) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.RunJobAsync() at EmbyStat.Jobs.BaseJob.Execute() 2020-04-21 13:18:38.7477 [WARN] MEDIASYNC-JOB Job failed, check logs for more info. 2020-04-21 13:18:39.2690 [WARN] Failed to process the job '8b761318-7f2a-4b01-8e7e-fdb68e0fbd24': an exception occurred. Retry attempt 1 of 2 will be performed in 00:00:18. System.NullReferenceException: Object reference not set to an instance of an object. at EmbyStat.Clients.Base.Http.BaseHttpClient.GetShows(String parentId) at EmbyStat.Clients.Jellyfin.Http.JellyfinHttpClient.EmbyStat.Clients.Base.Http.IHttpClient.GetShows(String libraryId) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.PerformShowSyncAsync(IReadOnlyList1 showsThatNeedAnUpdate, Library library, DateTime updateStartTime) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.ProcessShowsAsync(IEnumerable1 libraries, CancellationToken cancellationToken) at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.RunJobAsync() at EmbyStat.Jobs.BaseJob.Execute() at EmbyStat.Jobs.BaseJob.Execute() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

muadxili commented 4 years ago

hi, same probleme with beta 19 ( linuxserver docker image)

G-Dewd commented 4 years ago

same problem here, using linuxserver/embystat docker image

bbalz commented 4 years ago

Same issue here but windows with beta 19.

mregni commented 4 years ago

Mmmm, sounds like EmbyStat can't find any shows with a certain parent id. Can you run EmbyStat with --log-level 1 so I get some more debug information?

cavemandaveman commented 4 years ago

I'm having the same issue. Here is the debug log:

2020-05-08 16:11:09.2526 [INFO] MEDIASYNC-JOB   Starting job 
2020-05-08 16:11:09.3056 [DEBUG] BASE-HTTP-CLIENT   External call: [POST]https://myhost.com//System/Ping 
2020-05-08 16:11:09.9088 [DEBUG] BASE-HTTP-CLIENT   Ping returned: Jellyfin Server 
2020-05-08 16:11:09.9099 [INFO] MEDIASYNC-JOB   First delete all existing media and root media libraries from database so we have a clean start. 
2020-05-08 16:11:09.9169 [INFO] MEDIASYNC-JOB   Asking MediaServer for all root folders 
2020-05-08 16:11:09.9169 [DEBUG] BASE-HTTP-CLIENT   External call: [GET]https://myhost.com/Library/MediaFolders 
2020-05-08 16:11:10.1129 [INFO] MEDIASYNC-JOB   Found 5 root items, getting ready for processing 
2020-05-08 16:11:10.1288 [INFO] MEDIASYNC-JOB   Lets start processing movies 
2020-05-08 16:11:10.2079 [DEBUG] BASE-HTTP-CLIENT   External call: [GET]https://myhost.com/Items 
2020-05-08 16:11:10.2552 [DEBUG] BASE-HTTP-CLIENT   Call failed => StatusCode:InternalServerError, Content:Object reference not set to an instance of an object. 
2020-05-08 16:11:10.2582 [WARN] MEDIASYNC-JOB   0 movies found in parent with id p96312dd21bblmq71aa5c0f6bf02o320. Propably means something is wrong with the HTTP call. 
2020-05-08 16:11:10.2582 [DEBUG] BASE-HTTP-CLIENT   External call: [GET]https://myhost.com/Items 
2020-05-08 16:11:10.2832 [DEBUG] BASE-HTTP-CLIENT   Call failed => StatusCode:InternalServerError, Content:Object reference not set to an instance of an object. 
2020-05-08 16:11:10.2832 [WARN] MEDIASYNC-JOB   0 movies found in parent with id 45a2726d3c50e769e6t31e4184e4wppq. Propably means something is wrong with the HTTP call. 
2020-05-08 16:11:10.2940 [INFO] MEDIASYNC-JOB   Lets start processing show 
2020-05-08 16:11:10.2940 [INFO] MEDIASYNC-JOB   Logging in on the Tvdb API. 
2020-05-08 16:11:10.2940 [DEBUG] THETVDB-CLIENT Logging in on theTVDB API with key: ANAPIKEY 
2020-05-08 16:11:10.7192 [DEBUG] BASE-HTTP-CLIENT   External call: [GET]https://myhost.com/Items 
2020-05-08 16:11:10.7578 [DEBUG] BASE-HTTP-CLIENT   Call failed => StatusCode:InternalServerError, Content:Object reference not set to an instance of an object. 
2020-05-08 16:11:10.7612 [ERROR] Error while running job System.NullReferenceException: Object reference not set to an instance of an object.
   at EmbyStat.Clients.Base.Http.BaseHttpClient.GetShows(String parentId)
   at EmbyStat.Clients.Jellyfin.Http.JellyfinHttpClient.EmbyStat.Clients.Base.Http.IHttpClient.GetShows(String libraryId)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.PerformShowSyncAsync(IReadOnlyList`1 showsThatNeedAnUpdate, Library library, DateTime updateStartTime)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.ProcessShowsAsync(IEnumerable`1 libraries, CancellationToken cancellationToken)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.RunJobAsync()
   at EmbyStat.Jobs.BaseJob.Execute()
2020-05-08 16:11:10.8364 [WARN] MEDIASYNC-JOB   Job failed, check logs for more info. 
2020-05-08 16:11:11.2345 [WARN] Failed to process the job '9pls35d7-2e62-4da4-3wng-133a239dzv83': an exception occurred. Retry attempt 1 of 2 will be performed in 00:00:37. System.NullReferenceException: Object reference not set to an instance of an object.
   at EmbyStat.Clients.Base.Http.BaseHttpClient.GetShows(String parentId)
   at EmbyStat.Clients.Jellyfin.Http.JellyfinHttpClient.EmbyStat.Clients.Base.Http.IHttpClient.GetShows(String libraryId)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.PerformShowSyncAsync(IReadOnlyList`1 showsThatNeedAnUpdate, Library library, DateTime updateStartTime)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.ProcessShowsAsync(IEnumerable`1 libraries, CancellationToken cancellationToken)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.RunJobAsync()
   at EmbyStat.Jobs.BaseJob.Execute()
   at EmbyStat.Jobs.BaseJob.Execute()
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()

The retry attempts show the same errors

muadxili commented 4 years ago

Hello, still the same problem despite the beta 20 update (linuxserver / embystat: 0.2.0-beta.20-ls22)

11:16:40 20-05-20 JOB CONTROLLER => MEDIASYNC-JOB job queued 11:16:51 20-05-20 MEDIASYNC-JOB => Starting job 11:16:51 20-05-20 MEDIASYNC-JOB => First delete all existing media and root media libraries from database so we have a clean start. 11:16:51 20-05-20 MEDIASYNC-JOB => Asking MediaServer for all root folders 11:16:51 20-05-20 MEDIASYNC-JOB => Found 5 root items, getting ready for processing 11:16:51 20-05-20 MEDIASYNC-JOB => Lets start processing movies 11:16:51 20-05-20 MEDIASYNC-JOB => 0 movies found in parent with id f137a2dd21bbc1b99aa5c0f6bf02a805. Propably means something is wrong with the HTTP call. 11:16:51 20-05-20 MEDIASYNC-JOB => Lets start processing show 11:16:51 20-05-20 MEDIASYNC-JOB => Logging in on the Tvdb API.

spupuz commented 4 years ago

yes same for me

mregni commented 4 years ago

Something is still happening with the Show sync.

I'll have a look, thanks for the logs. Going to add some more debug logging as well to that part of the code.

Eldorados commented 4 years ago

Just wondering if there has been any movement on this? Having the same issues as above, if there is new logging I can post mine up

mregni commented 4 years ago

At the moment not because I disabled the show pages completely. Currently working on getting the tv shows pages back in the new React UI. So you can reinstall the beta.22 if you want but it will not have a fixed for your original problem. I'm working on it in for beta.23

Eldorados commented 4 years ago

Ok thanks, I'll keep an eye out!

mregni commented 4 years ago

Can someone check if this is still a problem now with the new beta.23 release? I fixed an issue with the user id (there was still a hardcoded user id in the code)

Eldorados commented 4 years ago

I followed the chat in the other issue and swapped over to the nightly build, once you cleared up the user id stuff I was able to sync

Just pulled in beta 23 and seems to be working well

cavemandaveman commented 4 years ago

Beta 23 still does not work for me:

2020-08-21 17:53:07.5530 [ERROR] Error while running job System.ArgumentNullException: Value cannot be null. (Parameter 'entity')
   at LiteDB.BsonMapper.ToDocument(Type type, Object entity)
   at LiteDB.BsonMapper.ToDocument[T](T entity)
   at LiteDB.LiteCollection`1.GetBsonDocs(IEnumerable`1 documents)+MoveNext()
   at LiteDB.Engine.LiteEngine.<>c__DisplayClass30_0.<Upsert>b__0(TransactionService transaction)
   at LiteDB.Engine.LiteEngine.AutoTransaction[T](Func`2 fn)
   at LiteDB.Engine.LiteEngine.Upsert(String collection, IEnumerable`1 docs, BsonAutoId autoId)
   at LiteDB.SharedEngine.Upsert(String collection, IEnumerable`1 docs, BsonAutoId autoId)
   at LiteDB.LiteCollection`1.Upsert(IEnumerable`1 entities)
   at EmbyStat.Repositories.MovieRepository.<>c__DisplayClass1_0.<UpsertRange>b__0()
   at EmbyStat.Repositories.BaseRepository.ExecuteQuery(Action query)
   at EmbyStat.Repositories.MovieRepository.UpsertRange(IEnumerable`1 movies)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.ProcessMoviesAsync(IReadOnlyList`1 libraries, CancellationToken cancellationToken)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.RunJobAsync()
   at EmbyStat.Jobs.BaseJob.Execute()
2020-08-21 17:53:07.5709 [WARN] MEDIA-SYNC      Job failed, check logs for more info. 
2020-08-21 17:53:07.7705 [ERROR] Failed to process the job '04cdad8e-0290-4d12-98e8-8928b62d6856': an exception occurred. System.ArgumentNullException: Value cannot be null. (Parameter 'entity')
   at LiteDB.BsonMapper.ToDocument(Type type, Object entity)
   at LiteDB.BsonMapper.ToDocument[T](T entity)
   at LiteDB.LiteCollection`1.GetBsonDocs(IEnumerable`1 documents)+MoveNext()
   at LiteDB.Engine.LiteEngine.<>c__DisplayClass30_0.<Upsert>b__0(TransactionService transaction)
   at LiteDB.Engine.LiteEngine.AutoTransaction[T](Func`2 fn)
   at LiteDB.Engine.LiteEngine.Upsert(String collection, IEnumerable`1 docs, BsonAutoId autoId)
   at LiteDB.SharedEngine.Upsert(String collection, IEnumerable`1 docs, BsonAutoId autoId)
   at LiteDB.LiteCollection`1.Upsert(IEnumerable`1 entities)
   at EmbyStat.Repositories.MovieRepository.<>c__DisplayClass1_0.<UpsertRange>b__0()
   at EmbyStat.Repositories.BaseRepository.ExecuteQuery(Action query)
   at EmbyStat.Repositories.MovieRepository.UpsertRange(IEnumerable`1 movies)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.ProcessMoviesAsync(IReadOnlyList`1 libraries, CancellationToken cancellationToken)
   at EmbyStat.Jobs.Jobs.Sync.MediaSyncJob.RunJobAsync()
   at EmbyStat.Jobs.BaseJob.Execute()
   at EmbyStat.Jobs.BaseJob.Execute()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
mregni commented 4 years ago

@cavemandaveman, can you create a new issue for your bug because it does not seem to be linked with the original one. Going to close this one for now