5

Having problems when uploading a Sitecore Package from one environment to the next. Both environments have the same version level (Sitecore XP 8.1U3 / EXM 3.3).

Screen error message reads:

[NullReferenceException: Object reference not set to an instance of an object.]
   Sitecore.UIUtil.GetBrowserClassString() +347
   Sitecore.Shell.Controls.Standard.FormPageXmlControl.OnLoad(EventArgs e) +1154
   System.Web.UI.Control.LoadRecursive() +67
   System.Web.UI.Control.LoadRecursive() +164
   System.Web.UI.Control.LoadRecursive() +164
   System.Web.UI.Control.LoadRecursive() +164
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4497

Sitecore Log Output:

3028 15:10:20 INFO  File has been uploaded: D:\inetpub\wwwroot\Sitecore\Data\packages\ClientMailCoreSpeakApplication.zip
ManagedPoolThread #5 15:10:25 INFO  Job started: Install
ManagedPoolThread #5 15:10:25 INFO  Installing package: D:\inetpub\wwwroot\Sitecore\Data\packages\ClientMailCoreSpeakApplication.zip
ManagedPoolThread #5 15:10:56 INFO  Installation was aborted at entry: items/core/sitecore/client/Applications/Client Mail/{B1F6C86A-4F1D-4A60-8949-EC945ABE0675}/en/1/xml
ManagedPoolThread #5 15:10:56 INFO  Installation was aborted
ManagedPoolThread #5 15:10:56 INFO  Job ended: Install (units processed: )

Note that the Sitecore log does NOT show the 500 error displayed to the browser.

enter image description here

Process:

  1. Upload Package File - Successful.
  2. Click through to Name and License Dialog - Successful.
  3. Clicking the Install button immediately throws an error.

Package Contains:

Contains Sitecore items meant for the core database to install a new Speak Application.

  • Some additional info: 1) This works fine in another, different environment. 2) The next screen that should popup in place of the error is the "Overwrite/Merge screen" – Pete Navarra Oct 12 '16 at 19:59
  • Which browser do you use while uploading the package? – Tamás Tárnok Oct 19 '16 at 8:29
5

Given this works for you on other environments with (presumably) the same code, the problem is most likely somewhere in the databases or files not in version control (including tokenized files).

Whenever I see a NullReferenceException without any obvious clue as to what was null, I go straight to the source code.

Sitecore.UIUtil.GetBrowserClassString(), the method throwing the null-ref exception, has the following source code:

public static string GetBrowserClassString()
{
  string str = string.Empty;
  if (UIUtil.IsIE())
    str = str + " ie" + " ie" + (object) UIUtil.GetBrowserMajorVersion();
  else if (UIUtil.IsFirefox())
    str = str + " ff" + " ff" + (object) Client.Device.Capabilities.Browser.MajorVersion;
  else if (UIUtil.IsWebkit())
    str = str + " ff" + " wk" + " wk" + (object) Client.Device.Capabilities.Browser.MajorVersion;
  return str.Trim();
}

The most likely part of that code that could reasonably be null (thanks to statics and value types) is Client.Device. Perhaps you have some site in <sites> misconfigured, or one of the devices in /sitecore/layout/devices is missing or misconfigured (for example, the Capabilities object might be null if your Sitecore instance has something odd in the Capabilities Type field).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.