openbullet / OpenBullet2

OpenBullet reinvented
https://docs.openbullet.dev/
MIT License
1.8k stars 482 forks source link

[Bug]: Error delete Wordlists #1035

Closed KE4NaS closed 4 months ago

KE4NaS commented 4 months ago

Version of the software

0.3.0

Operating system

Windows 10

Browser / Native

Chrome 126

What happened?

I loaded a wordlist formed a line of text and started a job, when it finished I deleted the job and went to delete the loaded wordlist and checked but it shows this error


Error message: The process cannot access the file 'C:\OpenBullet2\UserData\Wordlists\error.txt' because it is being used by another process.
Error details: at System.IO.FileSystem.DeleteFile(String fullPath)
   at OpenBullet2.Core.Repositories.HybridWordlistRepository.DeleteAsync(WordlistEntity entity, Boolean deleteFile, CancellationToken cancellationToken) in /code/OpenBullet2.Core/Repositories/HybridWordlistRepository.cs:line 80
   at OpenBullet2.Web.Controllers.WordlistController.Delete(Int32 id, Boolean alsoDeleteFile)
   at lambda_method20646(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at OpenBullet2.Web.Exceptions.AuthTokenVerificationMiddleware.InvokeAsync(HttpContext context)
   at OpenBullet2.Web.Middleware.ExceptionMiddleware.InvokeAsync(HttpContext context)```

### Relevant LoliCode if needed

_No response_
openbullet commented 4 months ago

Try to close OpenBullet 2 (even the console) and see if it was the process that was using the file. Otherwise, check if you have the file open in a text editor or something like it.

KE4NaS commented 4 months ago

I can no longer reproduce the problem I think it was a momentary error so I am closing the issues