openbullet / OpenBullet2

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

ApplicationDBcontext errors still happening for me with newest version of OB2 #370

Open EduardoProjects opened 3 years ago

EduardoProjects commented 3 years ago

So im still having errors and I dont know what to do. If you could give me some tips on what to do to fix this problem that would be great

fail: Microsoft.EntityFrameworkCore.Update[10000]
      An exception occurred in the database while saving changes for context type 'OpenBullet2.ApplicationDbContext'.
      System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
         at System.Collections.Generic.Dictionary`2.ValueCollection.Enumerator.MoveNext()
         at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.EntityReferenceMap.GetEntriesForState(Boolean added, Boolean modified, Boolean deleted, Boolean unchanged, Boolean hasDependentTypes, Boolean returnAdded, Boolean returnModified, Boolean returnDeleted, Boolean returnUnchanged)+MoveNext()
         at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.GetEntriesToSave(Boolean cascadeChanges)
         at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(DbContext _, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
         at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
      System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
         at System.Collections.Generic.Dictionary`2.ValueCollection.Enumerator.MoveNext()
         at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.EntityReferenceMap.GetEntriesForState(Boolean added, Boolean modified, Boolean deleted, Boolean unchanged, Boolean hasDependentTypes, Boolean returnAdded, Boolean returnModified, Boolean returnDeleted, Boolean returnUnchanged)+MoveNext()
         at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.GetEntriesToSave(Boolean cascadeChanges)
         at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(DbContext _, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
         at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)

Thats the error I keep getting when I run the config. It also keep showing banned and stuff like that. image My wordlist and proxies arent the problem. I know its something else but I just dont know how to fix it

openbullet commented 3 years ago

You can't do anything to fix this problem, it's a bug in OB2 itself. I will investigate once again to try and find where it's still happening. I thought I managed to fix every instance of this but apparently I did not. Also I'm pretty sure the bans and tochecks don't have much to do with this error, could you please follow this guide and find out more? https://discourse.openbullet.dev/t/how-to-debug-ban-error-issues-in-a-job/3055

openbullet commented 3 years ago

@EduardoProjects please refrain from posting such screenshots, next time I block you from the repository, this software should not be used to commit criminal activity.

EduardoProjects commented 3 years ago

@EduardoProjects please refrain from posting such screenshots, next time I block you from the repository, this software should not be used to commit criminal activity.

My apologies didn't know that. Won't do it again. Sorry.

openbullet commented 3 years ago

Try with 0.1.21 maybe this problem was related to something that got fixed. Let me know if it still happens.

EduardoProjects commented 3 years ago

Try with 0.1.21 maybe this problem was related to something that got fixed. Let me know if it still happens.

Im still getting the same error when I run my job:

fail: Microsoft.EntityFrameworkCore.Query[10100]
      An exception occurred while iterating over the results of a query for context type 'OpenBullet2.ApplicationDbContext'.
      System.InvalidOperationException: A second operation was started on this context before a previous operation completed. This is usually caused by different threads concurrently using the same instance of DbContext. For more information on how to avoid threading issues with DbContext, see https://go.microsoft.com/fwlink/?linkid=2097913.
         at Microsoft.EntityFrameworkCore.Internal.ConcurrencyDetector.EnterCriticalSection()
         at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable1.AsyncEnumerator.MoveNextAsync()
      System.InvalidOperationException: A second operation was started on this context before a previous operation completed. This is usually caused by different threads concurrently using the same instance of DbContext. For more information on how to avoid threading issues with DbContext, see https://go.microsoft.com/fwlink/?linkid=2097913.
         at Microsoft.EntityFrameworkCore.Internal.ConcurrencyDetector.EnterCriticalSection()
         at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable1.AsyncEnumerator.MoveNextAsync()
JReming85 commented 3 years ago

Maybe try deleting your wordlists and re-adding them.

EduardoProjects commented 3 years ago

Maybe try deleting your wordlists and re-adding them.

Still doesn't work. I've tried everything possible and it never works

openbullet commented 3 years ago

Maybe try to reduce the worker threads according to this guide https://discourse.openbullet.dev/t/making-your-openbullet-2-instance-more-stable/2111