Alvao Service - an error "Error in detection evaluation System.InvalidOperationException: Sequence contains no elements" is displayed in the log
This article is about product releases
ALVAO Asset Management 11.1 and higher
Symptoms
Log from the Alvao service contains an error:
Alvao.Service.Tasks.Implementation.TaskPlanner.RestartLogic Error
System.InvalidOperationException: Sequence contains no elements
at System.Linq.ThrowHelper.ThrowNoElementsException()
at Dapper.SqlMapper.ThrowZeroRows(Row row) in /_/Dapper/SqlMapper.cs:line 1167
at Dapper.SqlMapper.QueryRowImpl[T](IDbConnection cnn, Row row, CommandDefinition& command, Type effectiveType) in /_/Dapper/SqlMapper.cs:line 1205
at Dapper.SqlMapper.QueryFirst[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 754
at Alvao.Service.Repository.Implementation.DetectionRepository.GetDetectOptsById(Int32 detectId)
at Alvao.Service.Models.Detection.CompareObjectBase.CompareAndUpdate(IDetectionRepository detectionRepository, tblDetect detect, Int32 personId)
at Alvao.Service.Models.Detection.HwData.CheckAndUpdate()
at Alvao.Service.Models.Detection.HwData.UpdateTreeByDetect()
at Alvao.Service.Services.Implementation.DetectionsService.EvaluateDetections(CancellationToken cancellationToken)
at Alvao.Service.Tasks.Implementation.EvaluateDetectTask.Action(CancellationToken cancellationToken)
at Alvao.Service.Tasks.PeriodicAfterPreviousTask.RunAsync(CancellationToken cancellationToken)
Cause
The cause is a bug in ALVAO products.
Solution
Fixed in release 11.1.1464 - 11.1/FIX4 (2023-08-03)
Workaround
Run the script from the attachment on the Alvao database - it will delete invalid detections in the database.
Note: Alvao service will schedule new detections in place of the removed detections
Steps to reproduce this behavior
Issue number
T145616ALVAO