question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sync error with Jellyfin and Emby

See original GitHub issue

Bug report

Describe the bug A fresh install of Embystats Beta 20, Beta 19 or Beta 18 will not sync with Jellyfin or Emby. The users, plugins, and library names seem to sync properly, but the libraries always error out no matter what I try. This is using the docker containers.

To Reproduce Steps to reproduce the behavior:

Install Embystats beta 18, 19 or 20 docker version, point to jellyfin or emby, attempt media sync.

Expected behavior Media syncs

Screenshots See log below, but this error seems to be the start of a domino effect: [ERROR] Error while running job LiteDB.LiteException: Index key must be less than 255 bytes.

System (please complete the following information):

  • OS: Host is ubuntu 18.04
  • Browser Chrome
  • Version Beta 20

Additional context

2020-07-28 08:21:44.7168 [INFO] MEDIASYNC-JOB	First delete all existing media and root media libraries from database so we have a clean start. 
2020-07-28 08:21:44.7168 [INFO] MEDIASYNC-JOB	Asking MediaServer for all root folders 
2020-07-28 08:21:44.8680 [INFO] MEDIASYNC-JOB	Found 38 root items, getting ready for processing 
2020-07-28 08:21:44.8680 [INFO] MEDIASYNC-JOB	Lets start processing movies 
2020-07-28 08:21:45.0626 [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-07-28 08:21:45.1425 [ERROR] MEDIASYNC-JOB	Job failed, check logs for more info. 
2020-07-28 08:21:48.2916 [INFO] Connecting to wss://xxx.xxx.xxx.xxx:xxxx/embywebsocket?api_key=xxxxxxxxxxxxxx&deviceId=removed
2020-07-28 08:21:49.2635 [WARN] Failed to process the job 'removed': an exception occurred. Retry attempt 2 of 2 will be performed in 00:01:08. 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)
2020-07-28 08:21:53.1402 [INFO] Connecting to wss://xxx.xxx.xxx.xxx:xxxx/embywebsocket?api_key=xxxxxxxxxxxxxx&deviceId=removed
2020-07-28 08:21:58.1405 [INFO] Connecting to wss://xxx.xxx.xxx.xxx:xxxx/embywebsocket?api_key=xxxxxxxxxxxxxx&deviceId=removed
2020-07-28 08:22:03.1388 [INFO] Connecting to wss://xxx.xxx.xxx.xxx:xxxx/embywebsocket?api_key=xxxxxxxxxxxxxx&deviceId=removed 
2020-07-28 08:22:04.3153 [INFO] SMALLEMBYSYNC-JOB	Starting job 
2020-07-28 08:22:04.5035 [INFO] SMALLEMBYSYNC-JOB	Server info downloaded 
2020-07-28 08:22:04.6465 [INFO] SMALLEMBYSYNC-JOB	Server plugins downloaded 
2020-07-28 08:22:05.2483 [INFO] SMALLEMBYSYNC-JOB	Server users downloaded 
2020-07-28 08:22:05.3558 [ERROR] Error while running job LiteDB.LiteException: Index key must be less than 255 bytes.
   at LiteDB.Engine.IndexService.AddNode(CollectionIndex index, BsonValue key, PageAddress dataBlock, Byte level, IndexNode last)
   at LiteDB.Engine.IndexService.AddNode(CollectionIndex index, BsonValue key, PageAddress dataBlock, IndexNode last)
   at LiteDB.Engine.LiteEngine.InsertDocument(Snapshot snapshot, BsonDocument doc, BsonAutoId autoId, IndexService indexer, DataService data)
   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.MediaServerRepository.<>c__DisplayClass17_0.<UpsertDevices>b__0()
   at EmbyStat.Repositories.BaseRepository.ExecuteQuery(Action query)
   at EmbyStat.Repositories.MediaServerRepository.UpsertDevices(IEnumerable`1 devices)
   at EmbyStat.Services.MediaServerService.GetAndProcessDevices()
   at EmbyStat.Jobs.Jobs.Sync.SmallSyncJob.RunJobAsync()
   at EmbyStat.Jobs.BaseJob.Execute()
2020-07-28 08:22:05.5705 [ERROR] SMALLEMBYSYNC-JOB	Job failed, check logs for more info. ```

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:31 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
mregnicommented, Jul 29, 2020

It is possible that this is already fixed in the code I have locally. We need to retest this when beta.21 is released. I’m doing my best to finish the release this week but can’t promise anything.

1reaction
gerben838665commented, Aug 14, 2020

@mregni, Just tested the new nightly. Embystat seems to sync without any problems for me now. Thanks for implementing the fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sync watch status between Jellyfin and Emby
Hello everyone,. I wanted to know if there's a way of syncing watch status between emby and jellyfin at like every 15/30 mins...
Read more >
Sync library to Trakt.tv (Failed) - Page 3 - General/Windows
Firstly i want to apologize for my earlier frustration and Jellyfin comment. ... a "failed" message after any attempt to sync my watched...
Read more >
Stick with Emby - General/Windows - Emby Community
All I am going to say is Jellyfin is a hot mess. ... to get the premium features like sync/download, and it doesn't...
Read more >
Emby Sync Error - Plugins - Emby Community
I have Emby sync installed on my server but when tried to configure it gives the following error.2017-12-04 08:16:31.551 Error HttpServer: ...
Read more >
Confession from a Former Jellyfin User - Page 8
I absolutely agree Emby is in much better state than jellyfin but that is totally ... sync issues with a bunch of media...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found