Bump ... I'm seeing this error in the Umbraco Dashboard of a 30,000+ node site running on Umbraco v4.7.0 (Assembly 1.0.4090.38107). So far I haven't been able to trace it back to its origin. However, considering I only see the error on the Dashboard and not on my website I think it's coming from Umbraco.
I think I have fixed the issue. Did a bit of searching on stackoverflow and found the following http://stackoverflow.com/a/7207539 so i just trawled through the uComponents code and where i found newJavaScriptSerializer(); I added code and to set the MaxJsonLength to int32.max however ideally could pull from web.config. Also I reckon it probably only needs changing in one place which is in uComponents.Core.Modules in class ItemInfoService. Anyways if anyone wants a patched 2.1.0.0 dll just email me.
I have tried that and I am still getting the error when changing between sections in the Umbraco UI. The code breaks on line 77 of ItemInfoService.cs with an invalid cast:
System.InvalidCastException was unhandled by user code
Message=Specified cast is not valid.
Source=System.Core
StackTrace:
at System.Linq.Enumerable.d__b1`1.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at uComponents.Core.Modules.ItemInfoService.ProcessRequest(HttpApplication app) in C:\Users\Jeavon.CRUMPLED-LAN\Documents\Visual Studio 2010\Projects\uComponents\branches\v3.1\uComponents.Core\Modules\ItemInfoService.cs:line 80
at uComponents.Core.Modules.uComponentsModule.b__0(Object sender, EventArgs e) in C:\Users\Jeavon.CRUMPLED-LAN\Documents\Visual Studio 2010\Projects\uComponents\branches\v3.1\uComponents.Core\Modules\uComponentsModule.cs:line 52
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
InnerException:
Closer inspection reveals that it is trying to convert NAN
Problem is I can't work out what (data type, etc....) is calling the service.....
Given the number of items you have in the array i would suspect that is Multi node tree picker? Do you have it and have some items been removed that are still being referenced by the tree picker that may give you NaN?
We don't actually have a MNTP on the site I am looking at. Even more odd, switching to Content, Media doen't trigger the error, switching to Users triggers the error with 4 entires (3 x -1 and 1 x NAN), switching to settings and developer has 7 entires (all NAN) and members has 3 (all NAN).
Not sure how I've missed this thread (since I'm subscribed to the uComponents forum)
Tim raised a CodePlex bug for this issue today - I've put in a patch not to try to cast the object[] to int[], as it was pointless (even though I'd thought that would fix it in a previous release).
I still have no idea why NaNs are being passed into the ItemInfoService - obviously it's from the JavaScript, just not sure of the root cause ... if anyone can figure it out (and patch it up) ... I'll beer them many beers at CG12! :-)
I spent quite some time trying to trace the original source of the NaN's to no avail. I thought maybe the different numbers of entries depending on the section clicked on might have been a clue, but alas no joy as yet.
I'll add to the mounting pile of beers if anyone can figure it out. :-)
Ok, so increasing the jsonSerialization/maxJsonLength to ~ fifty million did the trick on this particular site - but this'll come back and bite us suddenly one day, I'm guessing?
At /umbraco/uComponents/Items/range
Any idea why?
Total error:
At /umbraco/uComponents/Items/range (Referred by: http://localhost:62625/umbraco/umbraco.aspx#ssws):
Used within uWebshop with a lot of nodes.
It is most likely something to do with this exception: "The length of the string exceeds the value set on the maxJsonLength property." See more in this post http://our.umbraco.org/projects/backoffice-extensions/ucomponents/questionssuggestions/19716-The-length-of-the-string-exceeds-the-value-set-on-the-maxJsonLength-property
Unfortunately no I haven’t found a solution for this problem.
Bump ... I'm seeing this error in the Umbraco Dashboard of a 30,000+ node site running on Umbraco v4.7.0 (Assembly 1.0.4090.38107). So far I haven't been able to trace it back to its origin. However, considering I only see the error on the Dashboard and not on my website I think it's coming from Umbraco.
Hi, I am now seeing this issue on a couple of sites, it is coming from the Umbraco UI and not the website.
Umbraco v 4.7.1.1 (Assembly version: 1.0.4393.24044) and uComponents v3.0.1
I have increased the maxJsonLength property but that hasn't made any difference, did anyone manage to trace it?
Nope - didn't find a resolution. As I remember we started filtering out those errors from out log...
Best regards
Emil
Guys,
I have started seeing this as well its in 4.7.1.1 site with uComponents version 2.1.0.0
Regards
Ismail
Guys,
I think I have fixed the issue. Did a bit of searching on stackoverflow and found the following http://stackoverflow.com/a/7207539 so i just trawled through the uComponents code and where i found newJavaScriptSerializer(); I added code and to set the MaxJsonLength to int32.max however ideally could pull from web.config. Also I reckon it probably only needs changing in one place which is in uComponents.Core.Modules in class ItemInfoService. Anyways if anyone wants a patched 2.1.0.0 dll just email me.
Regards
Ismail
Hi Ismail,
I have tried that and I am still getting the error when changing between sections in the Umbraco UI. The code breaks on line 77 of ItemInfoService.cs with an invalid cast:
Closer inspection reveals that it is trying to convert NAN
Problem is I can't work out what (data type, etc....) is calling the service.....
Regards,
Jeavon
Interesting findings guys. Let us know if you find the final answer.
Best regards
Emil
Jeavon,
Given the number of items you have in the array i would suspect that is Multi node tree picker? Do you have it and have some items been removed that are still being referenced by the tree picker that may give you NaN?
Regards
Ismail
Hi Ismail,
We don't actually have a MNTP on the site I am looking at. Even more odd, switching to Content, Media doen't trigger the error, switching to Users triggers the error with 4 entires (3 x -1 and 1 x NAN), switching to settings and developer has 7 entires (all NAN) and members has 3 (all NAN).
Members:
Users:
Confused now....
Regards,
Jeavon
Not sure how I've missed this thread (since I'm subscribed to the uComponents forum)
Tim raised a CodePlex bug for this issue today - I've put in a patch not to try to cast the object[] to int[], as it was pointless (even though I'd thought that would fix it in a previous release).
I still have no idea why NaNs are being passed into the ItemInfoService - obviously it's from the JavaScript, just not sure of the root cause ... if anyone can figure it out (and patch it up) ... I'll beer them many beers at CG12! :-)
Cheers, Lee.
Hey Lee,
I spent quite some time trying to trace the original source of the NaN's to no avail. I thought maybe the different numbers of entries depending on the section clicked on might have been a clue, but alas no joy as yet.
I'll add to the mounting pile of beers if anyone can figure it out. :-)
Cheers, Jeavon
I am now seeing this on a 4.7.1.1 site - does anyone have at least a way to get the MNTP datatypes to work again?
/Chriztian
Ok, so increasing the jsonSerialization/maxJsonLength to ~ fifty million did the trick on this particular site - but this'll come back and bite us suddenly one day, I'm guessing?
/Chriztian
Hi Chriztian, which version of uComponents? I thought I'd fixed this in v3.0.3.
It's v3.0.2, so I guess that explains it.
Thanks !
/Chriztian
Phfewww... glad it wasn't another ugly bug! :-)
Thanks, Lee.
is working on a reply...