Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Cannot recreate deleted Asset SubFolder



  • Hi,

    On my proget instance, I manually deleted an Asset subfolder named "Federation" (I was testing some curl commands). When I re-ran the command to upload a file to that same folder that it failed with a 500 error.

    Some things I tried:

    • Attempted to manually re-create the folder via the webpage and it silently fails.
    • Changed the name of the folder I was uploading to from Federation to NotFederation and it works find. So it is something particulay that folder.
    • Looked in asset folder and the Federation folder was still there... tried deleting it and running verify and it was recreated

    Is there some way to delete the folder from existence in SQL? I looked through some tables and see that the folder is mentioned in the assets table and is marked deleted with a date. Looking for a quick fix... I should upgrade to a newer version but I am afraid my database is already in a bad state.

    this exception is in the logs (it happened before or after I tried messing with the folders on disk)

    Verify Builds feed
    Message: Unhandled exception in execution #14241: Invalid length parameter passed to the LEFT or SUBSTRING function.
    Details: Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid length parameter passed to the LEFT or SUBSTRING function.
    at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__207_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke()
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    --- End of stack trace from previous location ---
    at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
    --- End of stack trace from previous location ---
    at Inedo.Data.DatabaseContext.DbResult.CreateAsync(DbCommand command, DatabaseContext context, DateTimeOffset startTime, Stopwatch stopwatch)
    at Inedo.Data.DatabaseContext.ExecuteInternalAsync(String storedProcName, GenericDbParameter[] parameters)
    at Inedo.Data.SqlServerDatabaseContext.ExecuteInternalAsync(String storedProcName, GenericDbParameter[] parameters)
    at Inedo.ProGet.Data.DB.Context.Assets_GetItemFromPathAsync(Nullable1 Feed_Id, String AssetPath_Text, Nullable1 IncludeDeleted_Indicator, Nullable1 AllowCaseInsensitiveMatch_Indicator, String CanonicalAssetPath_Text, String Inherited_CacheConfiguration_XML) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E258482\Src\ProGetCoreEx\InedoLib.Analyzers\InedoLib.Analyzers.DatabaseContextGenerator\DB.cs:line 4238 at Inedo.ProGet.Feeds.Assets.AssetFeed.EnsureDirectoryAsync(String fullPath, Nullable1 created, Nullable1 modified, IEnumerable1 userMetadata) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp_E258482\Src\ProGetCoreEx\Feeds\Assets\AssetFeed.cs:line 644
    at Inedo.ProGet.Feeds.Assets.AssetFeed.<>c__DisplayClass49_0.<<VerifyFeedAsync>g__checkDirAsync|1>d.MoveNext() in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp_E258482\Src\ProGetCoreEx\Feeds\Assets\AssetFeed.cs:line 510
    --- End of stack trace from previous location ---
    at Inedo.ProGet.Feeds.Assets.AssetFeed.<>c__DisplayClass49_0.<<VerifyFeedAsync>g__checkDirAsync|1>d.MoveNext() in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp_E258482\Src\ProGetCoreEx\Feeds\Assets\AssetFeed.cs:line 423
    --- End of stack trace from previous location ---
    at Inedo.ProGet.Feeds.Assets.AssetFeed.<>c__DisplayClass49_0.<<VerifyFeedAsync>g__checkDirAsync|1>d.MoveNext() in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp_E258482\Src\ProGetCoreEx\Feeds\Assets\AssetFeed.cs:line 538
    --- End of stack trace from previous location ---
    at Inedo.ProGet.Feeds.Assets.AssetFeed.VerifyFeedAsync(IFeedVerificationContext context, CancellationToken cancellationToken) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp_E258482\Src\ProGetCoreEx\Feeds\Assets\AssetFeed.cs:line 415
    at Inedo.ProGet.Executions.VerifyFeedExecution.ExecuteAsync(IManualExecutionContext context) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp_E258482\Src\ProGetCoreEx\Executions\VerifyFeedExecution.cs:line 46
    at Inedo.ProGet.Executions.VerifyFeedExecution.ExecuteAsync(IManualExecutionContext context) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp_E258482\Src\ProGetCoreEx\Executions\VerifyFeedExecution.cs:line 53
    at Inedo.ProGet.Service.Executions.ActiveManualExecution.ExecuteAsync() in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp_E258482\Src\ProGet.Service\Executions\ActiveManualExecution.cs:line 40
    ClientConnectionId:3f737d61-2674-45d8-820d-105e0e88dc25
    Error Number:537,State:3,Class:16


  • inedo-engineer

    Hi @norm-ross_1437 ,

    I'm not sure what version of ProGet you're using, but this sounds familiar and I'm almost certain we fixed this specific case a while ago. So I would try to upgrade.

    I don't realy recommend playing around with data in the tables....

    Best,
    Alana


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation