Additional text found in JSON string

Hi Markus,

For the past day or two I’ve been encountering this error using the dev branch on almost every task sonarr tries to run:

“Additional text found in JSON string after finishing deserializing object.” I can send you the the full log, but here are a couple of the errors:


Message
Request Failed: The DataMapper was unable to load the following field: ‘Quality’ value: ‘{“Quality”:{“Id”:6,“Name”:“Bluray720p”,“Weight”:8},“Proper”:false}’. Additional text found in JSON string after finishing deserializing object.

Exception
Marr.Data.DataMappingException: The DataMapper was unable to load the following field: ‘Quality’ value: ‘{“Quality”:{“Id”:6,“Name”:“Bluray720p”,“Weight”:8},“Proper”:false}’. Additional text found in JSON string after finishing deserializing object. —> Newtonsoft.Json.JsonSerializationException: Additional text found in JSON string after finishing deserializing object.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at NzbDrone.Core.Datastore.Converters.EmbeddedDocumentConverter.FromDB(ConverterContext context) in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Core\Datastore\Converters\EmbeddedDocumentConverter.cs:line 36
at Marr.Data.Mapping.MappingHelper.LoadExistingEntity(ColumnMapCollection mappings, DbDataReader reader, Object ent, Boolean useAltName) in m:\BuildAgent\work\328d72309b633a8\src\Marr.Data\Mapping\MappingHelper.cs:line 58
— End of inner exception stack trace —
at Marr.Data.Mapping.MappingHelper.LoadExistingEntity(ColumnMapCollection mappings, DbDataReader reader, Object ent, Boolean useAltName) in m:\BuildAgent\work\328d72309b633a8\src\Marr.Data\Mapping\MappingHelper.cs:line 79
at Marr.Data.Mapping.MappingHelper.CreateAndLoadEntity[T](ColumnMapCollection mappings, DbDataReader reader, Boolean useAltName) in m:\BuildAgent\work\328d72309b633a8\src\Marr.Data\Mapping\MappingHelper.cs:line 25
at Marr.Data.DataMapper.Query[T](String sql, ICollection1 entityList, Boolean useAltName) in m:\BuildAgent\work\328d72309b633a8\src\Marr.Data\DataMapper.cs:line 577 at Marr.Data.QGen.QueryBuilder1.ToList() in m:\BuildAgent\work\328d72309b633a8\src\Marr.Data\QGen\QueryBuilder.cs:line 279
at Marr.Data.QGen.SortBuilder1.ToList() in m:\BuildAgent\work\328d72309b633a8\src\Marr.Data\QGen\SortBuilder.cs:line 176 at NzbDrone.Core.History.HistoryRepository.Grabbed() in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Core\History\HistoryRepository.cs:line 63 at NzbDrone.Core.History.HistoryService.Grabbed() in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Core\History\HistoryService.cs:line 72 at NzbDrone.Core.Download.DownloadTrackingService.<GetQueuedDownloads>b__4() in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Core\Download\DownloadTrackingService.cs:line 82 at NzbDrone.Common.Cache.Cached1.Get(String key, Func1 function, Nullable1 lifeTime) in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Common\Cache\Cached.cs:line 87
at NzbDrone.Core.Download.DownloadTrackingService.GetQueuedDownloads() in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Core\Download\DownloadTrackingService.cs:line 80
at NzbDrone.Core.Queue.QueueService.GetQueue() in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Core\Queue\QueueService.cs:line 24
at NzbDrone.Api.Queue.QueueModule.GetQueueItems() in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Api\Queue\QueueModule.cs:line 32
at NzbDrone.Api.NzbDroneRestModule1.ToListResource[TModel](Func1 function) in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Api\NzbDroneRestModule.cs:line 37
at NzbDrone.Api.Queue.QueueModule.GetQueue() in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Api\Queue\QueueModule.cs:line 27
at NzbDrone.Api.REST.RestModule1.<set_GetResourceAll>b__c(Object options) in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Api\REST\RestModule.cs:line 111 at CallSite.Target(Closure , CallSite , Func2 , Object )
at Nancy.Routing.Route.<>c__DisplayClass4.b__3(Object parameters, CancellationToken context)


Message
An error has occurred while importing folder: C:\downloads\complete\TV\The.Daily.Show.2014.10.27.Wendy.Davis.720p.HDTV.x264-LMAO: The DataMapper was unable to load the following field: ‘Quality’ value: ‘{
“quality”: {
“id”: 4,
“name”: “HDTV-720p”,
“weight”: 4
},
“proper”: false
}’. Additional text found in JSON string after finishing deserializing object.

Exception
Marr.Data.DataMappingException: The DataMapper was unable to load the following field: ‘Quality’ value: ‘{
“quality”: {
“id”: 4,
“name”: “HDTV-720p”,
“weight”: 4
},
“proper”: false
}’. Additional text found in JSON string after finishing deserializing object. —> Newtonsoft.Json.JsonSerializationException: Additional text found in JSON string after finishing deserializing object.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at NzbDrone.Core.Datastore.Converters.EmbeddedDocumentConverter.FromDB(ConverterContext context) in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Core\Datastore\Converters\EmbeddedDocumentConverter.cs:line 36
at Marr.Data.Mapping.MappingHelper.LoadExistingEntity(ColumnMapCollection mappings, DbDataReader reader, Object ent, Boolean useAltName) in m:\BuildAgent\work\328d72309b633a8\src\Marr.Data\Mapping\MappingHelper.cs:line 58
— End of inner exception stack trace —
at Marr.Data.Mapping.MappingHelper.LoadExistingEntity(ColumnMapCollection mappings, DbDataReader reader, Object ent, Boolean useAltName) in m:\BuildAgent\work\328d72309b633a8\src\Marr.Data\Mapping\MappingHelper.cs:line 79
at Marr.Data.Mapping.MappingHelper.CreateAndLoadEntity[T](ColumnMapCollection mappings, DbDataReader reader, Boolean useAltName) in m:\BuildAgent\work\328d72309b633a8\src\Marr.Data\Mapping\MappingHelper.cs:line 25
at Marr.Data.DataMapper.Query[T](String sql, ICollection1 entityList, Boolean useAltName) in m:\BuildAgent\work\328d72309b633a8\src\Marr.Data\DataMapper.cs:line 577 at Marr.Data.QGen.QueryBuilder1.ToList() in m:\BuildAgent\work\328d72309b633a8\src\Marr.Data\QGen\QueryBuilder.cs:line 279
at Marr.Data.QGen.SortBuilder1.ToList() in m:\BuildAgent\work\328d72309b633a8\src\Marr.Data\QGen\SortBuilder.cs:line 176 at NzbDrone.Core.MediaFiles.MediaFileRepository.GetFilesBySeries(Int32 seriesId) in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\MediaFileRepository.cs:line 25 at NzbDrone.Core.MediaFiles.MediaFileService.FilterExistingFiles(List1 files, Series series) in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\MediaFileService.cs:line 80
at NzbDrone.Core.MediaFiles.EpisodeImport.ImportDecisionMaker.GetImportDecisions(List`1 videoFiles, Series series, Boolean sceneSource, QualityModel quality) in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportDecisionMaker.cs:line 47
at NzbDrone.Core.MediaFiles.DownloadedEpisodesImportService.ProcessFolder(DirectoryInfo directoryInfo) in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\DownloadedEpisodesImportService.cs:line 157
at NzbDrone.Core.MediaFiles.DownloadedEpisodesImportService.ProcessFolder(String path) in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\DownloadedEpisodesImportService.cs:line 194

Which version?
Which OS?
If Linux, which version of mono?

Sorry, was in a hurry earlier.

Win 8.1 pro and version 2.0.0.2117 but was having the same problem on 2.0.0.2172.

Just realized I had a typo on that last post. Version 2.0.0.2177.

Would you be able to zip up your DB and PM me a link to grab it? https://github.com/NzbDrone/NzbDrone/wiki/Backup-and-Restore

A link to dropbox/google drive/etc would be great.

Something in the field is corrupt, I’d like to see what it is.

PM Sent.

Thanks for looking into this issue.

Thanks, the issue was a bad database migration and due to the fact that your install hadn’t updated in almost a year. When it finally updated on the 29th (we made some changes to prevent bad branch names from blocking updates) it didn’t migrate properly.

I manually ran the migrations and re-uploading it for you, just [restore] (https://github.com/Sonarr/Sonarr/wiki/Backup-and-Restore) it and you should be back to normal.

Thanks, Markus. Everything is working great now.