Quantcast
Channel: SharePoint Client Browser for SharePoint Online and SharePoint Server (on-prem)
Viewing all articles
Browse latest Browse all 648

Created Unassigned: Null reference exception on startup [63930]

$
0
0
When launching application I can see message "Loading recent tenants and sites..." then null reference exception is thrown.

here is the log file:

```
Time;Machine;Process;Version;Category;EventId;Level;Correlation;Message
23-08-2015 11:04:59.415;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3;Error while retrieving default browser setting.
23-08-2015 11:04:59.431;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3;System.NullReferenceException: Object reference not set to an instance of an object.
23-08-2015 11:04:59.431;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3; at SPBrowser.Utils.BrowserUtil.GetBrowsers()
23-08-2015 11:04:59.431;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3; at SPBrowser.Utils.BrowserUtil.GetSystemDefaultBrowser()
23-08-2015 11:04:59.431;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3;Object reference not set to an instance of an object.
23-08-2015 11:04:59.431;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3;System.NullReferenceException: Object reference not set to an instance of an object.
23-08-2015 11:04:59.431;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3; at SPBrowser.Utils.BrowserUtil.GetBrowsers()
23-08-2015 11:04:59.431;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3; at SPBrowser.Utils.BrowserUtil.GetBrowser(String name)
23-08-2015 11:04:59.431;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3; at SPBrowser.Configuration..ctor()
23-08-2015 11:04:59.431;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3; at SPBrowser.Configuration.get_Current()
23-08-2015 11:04:59.431;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3; at SPBrowser.Utils.LogUtil.TruncateLogFiles()
23-08-2015 11:04:59.447;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3;Error while retrieving default browser setting.
23-08-2015 11:04:59.447;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3;System.NullReferenceException: Object reference not set to an instance of an object.
23-08-2015 11:04:59.447;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3; at SPBrowser.Utils.BrowserUtil.GetBrowsers()
23-08-2015 11:04:59.447;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3; at SPBrowser.Utils.BrowserUtil.GetSystemDefaultBrowser()
23-08-2015 11:05:13.362;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3;Object reference not set to an instance of an object.
23-08-2015 11:05:13.362;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3;System.NullReferenceException: Object reference not set to an instance of an object.
23-08-2015 11:05:13.362;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3; at SPBrowser.Utils.BrowserUtil.GetBrowsers()
23-08-2015 11:05:13.362;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3; at SPBrowser.Utils.BrowserUtil.GetBrowser(String name)
23-08-2015 11:05:13.362;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3; at SPBrowser.Configuration..ctor()
23-08-2015 11:05:13.362;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3; at SPBrowser.Configuration.get_Current()
23-08-2015 11:05:13.362;SP2013DEV;SPCB.exe;1.7.0.0;General;0;Exception;73cdc001-4954-4e67-bead-b2aeae5b02d3; at SPBrowser.Program.Main(String[] args)

```

I looked into the code for method `GetBrowsers`, trying to run it on my environment and find that it fails under line

```
RegistryKey browserKeyPath = browserKey.OpenSubKey(@"shell\open\command");
var Path = (string)browserKeyPath.GetValue(null).ToString();
```
`browserKeyPath` is null, that's why null reference is thrown. I looked into my regedit and find that I have mystic Tourch browser installed without `shell\open\command` subtree. (see attach). After deleting all works fine. I think it will be good if you can include additional check in your code to prevent such situations.

Thanks!

Viewing all articles
Browse latest Browse all 648

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>