Error since upgrading to 4.1

Posted: April 12, 2019 at 10:38 PM Quote #227420
I am getting these errors now since I upgraded to 4.1. They happen even more when i am debugging the site in visual studio.

System.InvalidOperationException: A second operation started on this context before a previous operation completed. Any instance members are not guaranteed to be thread safe.
   at Microsoft.EntityFrameworkCore.Internal.ConcurrencyDetector.EnterCriticalSection()
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()
   at System.Collections.Generic.List`1.AddEnumerable(IEnumerable`1 enumerable)
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Nop.Services.Catalog.ReviewTypeService.<>c__DisplayClass10_0.<GetProductReviewReviewTypeMappingsByProductReviewId>b__0() in C:\Projects\Main\NopCommerce\lifeseasons.com.4.1\Libraries\Nop.Services\Catalog\ReviewTypeService.cs:line 135
   at Nop.Core.Caching.MemoryCacheManager.Get[T](String key, Func`1 acquire, Nullable`1 cacheTime) in C:\Projects\Main\NopCommerce\lifeseasons.com.4.1\Libraries\Nop.Core\Caching\MemoryCacheManager.cs:line 152
   at Nop.Services.Catalog.ReviewTypeService.GetProductReviewReviewTypeMappingsByProductReviewId(Int32 productReviewId) in C:\Projects\Main\NopCommerce\lifeseasons.com.4.1\Libraries\Nop.Services\Catalog\ReviewTypeService.cs:line 133
   at Nop.Web.Factories.ProductModelFactory.PrepareProductReviewsModel(ProductReviewsModel model, Product product) in C:\Projects\Main\NopCommerce\lifeseasons.com.4.1\Presentation\Nop.Web\Factories\ProductModelFactory.cs:line 1440
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: April 13, 2019 at 3:13 PM Quote #227429
Have you customised the solution or are you using an special plugins ?

Maybe there are tasks running in the background that are acting on the same context you are debugging
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
www.SelectSystems.com.au
Select Systems International is a computer systems technology solution developer and integration service provider.
Posted: April 13, 2019 at 3:22 PM Quote #227431
Looks like there is some issue with "ReviewTypeService.cs" class. Do you have any customization or custom plugin or any third party plugin?

Looking at that might help you.
This post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Need any professional assistance? Drop us your requirements on [email protected] or Skype @ live:nopadvance.sales

https://nopadvance.com
nopCommerce Solution Partner
Posted: April 13, 2019 at 6:43 PM Quote #227445
Thanks for the responses. I have not made any customizations to the core code. It happens randomly whether the call is made from custom plugin, custom thing, or regular core nop code
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: April 14, 2019 at 9:02 PM Quote #227487
Does it always happen "at Nop.Services.Catalog.ReviewTypeService", or does that change in the error message?

Do you have any long running Scheduled Tasks?
This post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
www.noptools.com
Posted: April 15, 2019 at 8:18 AM Quote #227520
it happens in other classes as well, and there are no long running tasks. in fact, on my dev machine, i have all scheduled tasks disabled, and it still happens
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Premium support services
  • Dedicated premium support services provided by core developers are intended for persons who run mission critical websites, work on projects with tight deadlines, or want to get dedicated support.
Professional services
  • Want to open a new store? Want to take your store to the next level? Need a custom extension? We can customize nopCommerce to fit your store perfectly. Request a quote to get started.