cBot crash after start in the could (System.IO.FileNotFoundException)
Created at 12 Mar 2025, 06:59
CH
cBot crash after start in the could (System.IO.FileNotFoundException)
12 Mar 2025, 06:59
My local cBot filename was "1Londoner 28.02" but as I suppose this name caused problems as shows in logs below. After start, the cBot status in the mobile and desktop cTrader was “running” but in fact it was not running.
Solution: changing name to string without “.” (dot) fixed the issue.
12/03/2025 06:35:22.119 cTrader.Automate.Domain.Exceptions.AlgoMetadataUnavailableException
---> System.IO.FileNotFoundException: Could not find file '/opt/console/1Londoner 28.algo'.
File name: '/opt/console/1Londoner 28.algo'
at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
The error occurred while cbot creating ()
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.File.Open(String path, FileMode mode, FileAccess access, FileShare share)
at Core.Framework.Extension.Implementation.FileManagement.FileService.OpenReadWithShare(String fullFileName)
at cTrader.Automate.Infrastructure.Common.Types.AlgoFileLoader.GetAlgoInfo(AutomateId automateId)
--- End of inner exception stack trace ---
at cTrader.Automate.Domain.Types.AutomateTypeExtensions.GetTypeMetadata(IAutomateType this)
at cTrader.Automate.Memento.AlgoInstanceMementoFactory.CreateMementoInternal(IAutomateType automateType, SymbolPersistenceId symbolPersistenceId, FramePeriod framePeriod, AlgoInstanceParametersMemento parametersMemento)
at cTrader.Automate.Memento.AlgoInstanceMementoFactory.CreateDetachedMemento(IAutomateType automateType, AutomateRuntimeType runtimeType)
at cTrader.Automate.AutomateAlgoTypeInstanceRepository.CreateDetached(IAutomateType automateType, AutomateRuntimeType runtimeType)
at cTrader.Console.Infrastructure.Application.ConsoleRealtimeInstanceManager.CreateAutomateTypeInstance(String algoFileName)
at cTrader.Console.Infrastructure.Application.ConsoleAlgoTypeInstanceManager.CreateInstanceAsync(String algoFileName)
12/03/2025 06:19:37.115 at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
The error occurred while cbot creating ()
at System.IO.File.Open(String path, FileMode mode, FileAccess access, FileShare share)
at Core.Framework.Extension.Implementation.FileManagement.FileService.OpenReadWithShare(String fullFileName)
at cTrader.Automate.Infrastructure.Common.Types.AlgoFileLoader.GetAlgoInfo(AutomateId automateId)
at cTrader.Automate.Memento.AlgoInstanceMementoFactory.CreateMementoInternal(IAutomateType automateType, SymbolPersistenceId symbolPersistenceId, FramePeriod framePeriod, AlgoInstanceParametersMemento parametersMemento)
at cTrader.Automate.Memento.AlgoInstanceMementoFactory.CreateDetachedMemento(IAutomateType automateType, AutomateRuntimeType runtimeType)
at cTrader.Automate.AutomateAlgoTypeInstanceRepository.CreateDetached(IAutomateType automateType, AutomateRuntimeType runtimeType)
at cTrader.Console.Infrastructure.Application.ConsoleRealtimeInstanceManager.CreateAutomateTypeInstance(String algoFileName)
at cTrader.Console.Infrastructure.Application.ConsoleAlgoTypeInstanceManager.CreateInstanceAsync(String algoFileName)
12/03/2025 06:19:37.115 at cTrader.Automate.Domain.Types.AutomateTypeExtensions.GetTypeMetadata(IAutomateType this)
cTrader.Automate.Domain.Exceptions.AlgoMetadataUnavailableException
---> System.IO.FileNotFoundException: Could not find file '/opt/console/1Londoner 28.algo'.
File name: '/opt/console/1Londoner 28.algo'
--- End of inner exception stack trace ---
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at Core.Framework.Extension.Implementation.FileManagement.FileService.OpenReadWithShare(String fullFileName)
at cTrader.Console.Infrastructure.Application.ConsoleRealtimeInstanceManager.CreateAutomateTypeInstance(String algoFileName)
at cTrader.Automate.Domain.Types.AutomateTypeExtensions.GetTypeMetadata(IAutomateType this)
at cTrader.Automate.Memento.AlgoInstanceMementoFactory.CreateMementoInternal(IAutomateType automateType, SymbolPersistenceId symbolPersistenceId, FramePeriod framePeriod, AlgoInstanceParametersMemento parametersMemento)
at cTrader.Automate.Memento.AlgoInstanceMementoFactory.CreateDetachedMemento(IAutomateType automateType, AutomateRuntimeType runtimeType)
The error occurred while cbot creating ()
cTrader.Automate.Domain.Exceptions.AlgoMetadataUnavailableException
---> System.IO.FileNotFoundException: Could not find file '/opt/console/1Londoner 28.algo'.
File name: '/opt/console/1Londoner 28.algo'
at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.File.Open(String path, FileMode mode, FileAccess access, FileShare share)
at cTrader.Automate.AutomateAlgoTypeInstanceRepository.CreateDetached(IAutomateType automateType, AutomateRuntimeType runtimeType)
at cTrader.Automate.Infrastructure.Common.Types.AlgoFileLoader.GetAlgoInfo(AutomateId automateId)
--- End of inner exception stack trace ---
at cTrader.Console.Infrastructure.Application.ConsoleAlgoTypeInstanceManager.CreateInstanceAsync(String algoFileName)