UmbracoAzureSearch
UmbracoAzureSearch copied to clipboard
We are unable to drop and reindex in version 1.3.0
We get the error: POST https://dev.forsikringogpension.dk/umbraco/backoffice/api/AzureSearchApi/ReIndex 500 (Internal Server Error) (anonymous) @ angular.min.js?cdv=1723721477:106 o @ angular.min.js?cdv=1723721477:102 g @ angular.min.js?cdv=1723721477:100 i @ angular.min.js?cdv=1723721477:79 (anonymous) @ angular.min.js?cdv=1723721477:80 $eval @ angular.min.js?cdv=1723721477:92 $digest @ angular.min.js?cdv=1723721477:90 $apply @ angular.min.js?cdv=1723721477:92 (anonymous) @ angular-mobile.js?cdv=1723721477:269 dispatch @ jquery.min.js?cdv=1723721477:3 r.handle @ jquery.min.js?cdv=1723721477:3
Indhold af svar 500:
-
Message: "An error has occurred.",…}
-
ExceptionMessage:"Could not find file 'C:\Git17\UmbracoCloud\forsikringogpension.web.cms.umbraco.web\App_Data\MoriyamaAzureSearch\00000006-0000-0000-0000-000000000000\content.json'."
-
ExceptionType:"System.IO.FileNotFoundException"
-
Message:"An error has occurred."
-
StackTrace:" at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
-
↵ at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
-
↵ at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
-
↵ at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
-
↵ at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
-
↵ at Moriyama.AzureSearch.Umbraco.Application.AzureSearchIndexClient.GetIds(String sessionId, String filename)
-
↵ at Moriyama.AzureSearch.Umbraco.Application.AzureSearchIndexClient.ReIndex(String filename, String sessionId, Int32 page)
-
↵ at Moriyama.AzureSearch.Umbraco.Application.AzureSearchIndexClient.ReIndexContent(String sessionId, Int32 page)
-
↵ at Moriyama.AzureSearch.Umbraco.Application.Controllers.AzureSearchApiController.GetReIndexContent(String sessionId, Int32 page)
-
↵ at Moriyama.AzureSearch.Umbraco.Application.Controllers.AzureSearchApiController.ReIndex(ReIndexModel reIndexModel)
Any ideas ? 1.2.6 worked for us.
Have you update via nuget? Have you update both the core and the UI project?
Yes both versions are 1.3.0 and upgraded via nuget. Could the problem be that we are using authentication via azure ad ?
On Tue, Sep 25, 2018 at 9:23 AM darrenferguson [email protected] wrote:
Have you update via nuget? Have you update both the core and the UI project?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/darrenferguson/UmbracoAzureSearch/issues/36#issuecomment-424234971, or mute the thread https://github.com/notifications/unsubscribe-auth/ACLg_1ahqCzfwmE24EBlnhD9AnmqOiuWks5uedoHgaJpZM4W2jcD .
--
Med venlig hilsen / Kind regards
JEE CONSULT – Leverer til tiden og som forventet
Nicolai Hamilton Jee
Owner/Developer
Mobil (+45) 60 888 222
www.jeeconsult.dk
It seems that it gets a session id and tries to find that folder but the folder does not exist. It tries to get a session id using var sessionKey = Security.CurrentUser.Key.ToString(); It does that in the GetStatus method in the AzureSearchApiController. This sessionid is passed on through the system to the GetIds in the AzureSearchIndexClient This is the line that fails: var ids = JsonConvert.DeserializeObject<int[]>(System.IO.File.ReadAllText(file)); private int[] GetIds(string sessionId, string filename) { var path = Path.Combine(_path, @"App_Data\MoriyamaAzureSearch" + sessionId); var file = Path.Combine(path, filename);
var ids = JsonConvert.DeserializeObject<int[]>(System.IO.File.ReadAllText(file));
return ids;
}
It worked in version 1.2.6, but not any more. I can create the missing folder but it is empty so nothing gets indexed.
Should this folder exist or ? I hope you can help us.
We've released a new version on nuget that deals with the issue that you are facing.
Please let us know if it resolves the problem!
It works 👍