Azure-Samples / azure-search-openai-demo-csharp

A sample app for the Retrieval-Augmented Generation pattern running in Azure, using Azure Cognitive Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.
MIT License
551 stars 345 forks source link

Error Creating Index #328

Closed robvet closed 1 week ago

robvet commented 3 weeks ago

Please provide us with the following information: Cannot successfully index a PDF document after provisioning the application.

This issue is for a: (mark with an x)

- [ x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Freshly provision the application and attempt to upload a pdf file.

Any log messages given by the failure

UI Error Message:

System.Net.Http.HttpRequestException: net_http_message_not_success_statuscode_reason, 400, Bad Request at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() at SharedWebComponents.Services.ApiClient.UploadDocumentsAsync(IReadOnlyList`1 files, Int64 maxAllowedSize, String cookie)

Underlying Error (App Insights) Message:

The antiforgery token could not be decrypted. The key {fadc1d55-bf1a-40ee-a0c2-cebe7f949163} was not found in the key ring. For more information go to https://aka.ms/aspnet/dataprotectionwarning
Exception type System.Security.Cryptography.CryptographicException
Failed method Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore

Expected/desired behavior

The ability to successfully upload a pdf document and index it with Azure AI Search.

OS and Version?

Window 11, Visual Studio 2022. Updates are current.

Versions

??

Mention any other details that might be useful

Puzzled. Uploaded this issue yesterday, but did not find it today (6/11/24). Hoping you're not closing it without replying. As a customer-facing architect for Microsoft, I highly recommend this application to customers on a continual basis for learning and reference. I would expect the courtesy of a reply. Thanks!


Thanks! We'll be in touch soon.

LittleLittleCloud commented 2 weeks ago

The antiforgery token could not be decrypted. The key {fadc1d55-bf1a-40ee-a0c2-cebe7f949163} was not found in the key ring.

Maybe try clean cookie and cache and retry? That might caused by an outdated client app

robvet commented 1 week ago

Interestingly, the problem worked itself out. Must have been cached.

Thanks!