-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArgumentNullException: Value cannot be null #508
Comments
I suspect that it's tied to a bug we discovered in a previous version of SPE; perhaps when the home item does not exist. You indicated that it was v3.0. Can you install v3.3? |
Given it works for you on production server I wonder if (before we go ahead with further investigation) you could verify which version of Windows PowerShell you have? You can check it using the If your indicated version of Windows PowerShell is 2.0 - it might be the cause of the problem. I would suggest that you update to at least version 3 or even better 4. |
Windows PS was on v2.0. I upgraded to v3.0, and it works great now. Thank you! |
Great! Enjoy! :) |
From what I see in the error it seems Sitecore attempts to open the PowerShell MAML - help file as it was a Sheer control and that problem was rectified in version 3.1 in issue #317 - while the error reported in that issue was manifesting itself in the logs only - yours seems to be showing much more violently - looking at your stack trace I suspect it might be due to Visual Studio inserting itself in the mix. If that indeed is the case - you should be able to alleviate the error by deleting the |
I removed Cognifide.PowerShell.dll-Help.xml, and the "Failed to load XML control" error no longer appears in the log. However, the "ArgumentNullException: Value cannot be null" problem remained. I also reinstalled PSE 3.3, and the problem remained. |
I wonder about one additional thing. Did you have at any point SPE 2.x installed on those environments? If that is the case - did you perform the actions outlined in this blog post? |
Since I didn't see anything SPE related in your stack trace as well I've gone online to seek if I could see anything from your stack trace and found this blog post. I wonder if this is not the cause of your problem? Also this. |
Thanks Adam, I will look into those ideas... |
I don't think I had installed SPE v2.n, but in any case, I walked through that article, and confirmed that none of those folders existed. Disabling Page Inspector resolved the "ArgumentNullException: Value cannot be null" error. SPE now opens up cleanly. However, it just churns and churns, even on the simplest of commands (i.e. get-host)... it never completes execution. No errors displayed, or recorded in the log:| It's interesting to note that the log shows this activity when I issue "get-host" command from console: ...and it shows this activity when I issue "get-host" command from SPE: ...but only the console replies with the expected result. SPE does not reply. |
OK. So it seems like we've solved the main problem with the environment. Regarding the churning - there have been some changes in the way ISE retrieves results from 3.2 to 3.3 - I wonder if cleaning your browser cache just in case something got cached improves anything? As to the differences in the log - that is very much an intended behaviour. Console talks to the server using WebService over AJAX, whereas ISE urilizes a different method and Sheer infrastructure. |
I'm up and running now. I cleared all temp files from browser, OS, and restarted. Perhaps that was overkill, but I'm happy to have it fixed! Thank you very much!!! |
Glad to hear that! |
Quick note on something mentioned in the original post - I'm still getting these errors talking about domain dictionary mismatches. I'm on version 3.3 (only version installed on the machine) and using PS 4.0 but can't figure out why the fonts are not part of a particular dictionary domain. ERROR Cannot find dictionary domain for the dictionaty entry '/sitecore/system/Modules/PowerShell/Fonts/monospace'('{A1861BC6-98EF-4949-9E45-2A482B35B577}'). Thoughts? |
Context: Windows 7, Sitecore.NET 7.2 (rev. 141226), SPE 3.0
SPE works on our Win 2008 R2 servers, but I'm having trouble locally on Win 7. Installation and reinstallation of SPE is clean, and PS console works, but, as soon as I try to open PS ISE, I get this:
[ArgumentNullException: Value cannot be null.
Parameter name: key]
System.Collections.Generic.Dictionary
2.FindEntry(TKey key) +14312893 System.Collections.Generic.Dictionary
2.TryGetValue(TKey key, TValue& value) +20Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.SelectionMappingRenderTraceListener.GetLiteralTraceData(LiteralControl literal, TraceData& data) +71
Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.SelectionMappingRenderTraceListener.GetTraceData(Object renderedObject) +223
Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.SelectionMappingRenderTraceListener.EndRendering(TextWriter writer, Object renderedObject) +47
System.Web.UI.RenderTraceListenerList.EndRendering(TextWriter writer, Object renderedObject) +90
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +12389839
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
Sitecore.Web.UI.XmlControls.GenericControl.DoRender(HtmlTextWriter output) +357
Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output) +376
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
Sitecore.Web.UI.Sheer.ClientPage.OptimizeControlTree(Control control) +177
Sitecore.Web.UI.Sheer.ClientPage.OptimizeControlTree(Control control) +357
Sitecore.Web.UI.Sheer.ClientPage.OptimizeControlTree(Control control) +357
Sitecore.Web.UI.Sheer.ClientPage.OptimizeControlTree(Control control) +357
Sitecore.Web.UI.Sheer.ClientPage.OptimizeControlTree(Control control) +357
Sitecore.Web.UI.Sheer.ClientPage.OptimizeControlTree(Control control) +357
Sitecore.Web.UI.Sheer.ClientPage.OptimizeControlTree(Control control) +357
Sitecore.Web.UI.Sheer.ClientPage.OptimizeControlTree(Control control) +357
Sitecore.Web.UI.Sheer.ClientPage.OptimizeControlTree(Control control) +357
Sitecore.Web.UI.Sheer.ClientPage.OptimizeControlTree(Control control) +357
Sitecore.Web.UI.Sheer.ClientPage.OptimizeControlTree(Control control) +357
Sitecore.Web.UI.Sheer.ClientPage.OptimizeControlTree(Control control) +357
Sitecore.Web.UI.Sheer.ClientPage.OptimizeControlTree(Control control) +357
Sitecore.Web.UI.Sheer.ClientPage.SaveViewState() +27
System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +446
System.Web.UI.Page.SaveAllState() +723
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4860
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34249
I also see this error in the server log, but it's during server startup, so I'm not sure if it's related:
32688 16:25:14 ERROR Failed to load XML control: <>\src\cms\website\sitecore modules\PowerShell\Assets\Cognifide.PowerShell.dll-Help.xml
Exception: System.Xml.XmlException
Message: There is no Unicode byte order mark. Cannot switch to Unicode.
Source: System.Xml
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.CheckEncoding(String newEncodingName)
at System.Xml.XmlTextReaderImpl.ParseXmlDeclaration(Boolean isTextDecl)
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlReader.MoveToContent()
at Sitecore.Web.UI.XmlControls.FolderControlSource.IsXmlControl(String controlFile)
I'm also seeing a few of these in the log:
ManagedPoolThread #7 16:27:59 ERROR Cannot find dictionary domain for the dictionaty entry '/sitecore/system/Modules/PowerShell/Fonts/Consolas'('{1910AC65-194F-4629-A353-191976AC8F53}').
The text was updated successfully, but these errors were encountered: