You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Evoq runs the File Crawler search provider (a Scheduler task) to index file contents. This provider is based on the StandardFolderProvider class. We are seeing following error now:
This is actually a NullReferenceException when the Search API calls the StandardFolderProvider.GetFileUrl(IFileInfo) method:
This happens because the EncryptParameter(string) method calls the PortalController.Instance.GetCurrentPortalSettings() method, which is known to give a NRE in the context of a Scheduler task (as in #2606).
In this particular case, we can avoid this issue by calling the EncryptParameter(string, string) overload (passing the encryption key), which we can obtain safely by using the PortalSettings instance available in GetFileUrl(IFileInfo) (line 178 in first screenshot).
Steps to reproduce
The steps to reproduce are simply to run the "Search: File Crawler" task, which is specific to Evoq, but actually any search provider based on the StandardFolderProvider will crash.
Error information
2020-06-11 17:35:40.353-03:00 [DNN-DEV-02][D:9][T:73][ERROR] DotNetNuke.Services.FileSystem.FileManager - System.NullReferenceException: Object reference not set to an instance of an object.
at DotNetNuke.Common.Utilities.UrlUtils.EncryptParameter(String value)
at DotNetNuke.Services.FileSystem.StandardFolderProvider.GetFileUrl(IFileInfo file)
at DotNetNuke.Services.FileSystem.FileManager.GetUrl(IFileInfo file)
2020-06-11 17:35:40.376-03:00 [DNN-DEV-02][D:9][T:73][ERROR] DotNetNuke.Services.Exceptions.Exceptions - DotNetNuke.Services.Exceptions.BasePortalException: File Crawler Unable to Finish, Error: The underlying system threw an exception. ---> DotNetNuke.Services.FileSystem.FolderProviderException: The underlying system threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at DotNetNuke.Common.Utilities.UrlUtils.EncryptParameter(String value)
at DotNetNuke.Services.FileSystem.StandardFolderProvider.GetFileUrl(IFileInfo file)
at DotNetNuke.Services.FileSystem.FileManager.GetUrl(IFileInfo file)
--- End of inner exception stack trace ---
at DotNetNuke.Services.FileSystem.FileManager.GetUrl(IFileInfo file)
at DotNetNuke.Professional.SearchCrawler.Results.FileResultController.GetDocUrl(SearchResult searchResult)
at DotNetNuke.Services.Search.Controllers.SearchControllerImpl.GetSecurityTrimmedResults(SearchQuery searchQuery, LuceneQuery luceneQuery)
at DotNetNuke.Services.Search.Controllers.SearchControllerImpl.GetResults(SearchQuery searchQuery)
at DotNetNuke.Services.Search.Controllers.SearchControllerImpl.SiteSearch(SearchQuery searchQuery)
at DotNetNuke.Professional.SearchCrawler.FileCrawling.FileCrawlerController.GetLastIndexedFileModificationDate(IFolderInfo folder)
at DotNetNuke.Professional.SearchCrawler.FileCrawling.FileCrawlerController.IndexDirectory(ISearchCrawlerPortalContext searchCrawlerPortalContext, IFolderInfo folderInfo)
at DotNetNuke.Professional.SearchCrawler.FileCrawling.FileCrawlerController.IndexPortalDirectory(ISearchCrawlerPortalContext searchCrawlerPortalContext)
at DotNetNuke.Professional.SearchCrawler.FileCrawling.FileCrawlerController.IndexPortalDirectories(ISearchCrawlerContext searchCrawlerContext)
at DotNetNuke.Professional.SearchCrawler.FileCrawler.FileCrawler.FileCrawlerExecution()
--- End of inner exception stack trace ---
Affected version
10.00.00 alpha build (in development)
09.06.01 latest supported release
The text was updated successfully, but these errors were encountered:
Description of bug
Evoq runs the File Crawler search provider (a Scheduler task) to index file contents. This provider is based on the
StandardFolderProvider
class. We are seeing following error now:This is actually a
NullReferenceException
when the Search API calls theStandardFolderProvider.GetFileUrl(IFileInfo)
method:This happens because the
EncryptParameter(string)
method calls thePortalController.Instance.GetCurrentPortalSettings()
method, which is known to give a NRE in the context of a Scheduler task (as in #2606).In this particular case, we can avoid this issue by calling the
EncryptParameter(string, string)
overload (passing the encryption key), which we can obtain safely by using thePortalSettings
instance available inGetFileUrl(IFileInfo)
(line 178 in first screenshot).Steps to reproduce
The steps to reproduce are simply to run the "Search: File Crawler" task, which is specific to Evoq, but actually any search provider based on the
StandardFolderProvider
will crash.Error information
Affected version
The text was updated successfully, but these errors were encountered: