Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] LUIS Authoring adding example throws exception #18041

Closed
nazimkov opened this issue Jan 19, 2021 · 15 comments
Closed

[BUG] LUIS Authoring adding example throws exception #18041

nazimkov opened this issue Jan 19, 2021 · 15 comments
Labels
Client This issue points to a problem in the data-plane of the library. Cognitive - LUIS customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@nazimkov
Copy link

Describe the bug
The adding example operation Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring.Examples.AddWithHttpMessagesAsync method throws Microsoft.Rest.SerializationException exception. With message:

Unable to deserialize the response.
JSON integer 2148095092 is too large or small for an Int32. Path 'ExampleId', line 1, position 23.

Seems like an issue with response deserialization to LabelExampleResponse class, caused by the type of ExampleId property. The actual response content is:

{"ExampleId":2148095092,"UtteranceText":"test example"}

The ExampleId value 2148095092 > 2147483647 (Int32.MaxValue)

Expected behavior
Executes successfully.

Actual behavior (include Exception or Stack Trace)

Microsoft.Rest.SerializationException
Unable to deserialize the response.
JSON integer 2148095092 is too large or small for an Int32. Path 'ExampleId', line 1, position 23

   at Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring.Examples.<AddWithHttpMessagesAsync>d__5.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring.ExamplesExtensions.<AddAsync>d__0.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at LuisApplicationSettingsBug.Program.<Main>d__1.MoveNext() in 

To Reproduce

var luisAppId = new Guid("590e74a6-4bb4-4729-8c78-7c53d7068750");
const string intentName = "B5578F30-59AA-4801-9A27-C73BB3C1C4FE";
const string versionId = "8.Rc";
using (var localClient = CreateClient(localApiKey))
{
    var example = new ExampleLabelObject("test example", null, intentName
    try
    {
        var exampleResult = await localClient.Examples.AddAsync(luisAppId, versionId, example);
    }
    catch (Exception ex)
    {
        Console.Error.WriteLine(ex.Message);
        throw;
    }
}

Environment:

  • LUIS region: WestUS
  • Name and version of the Library package used: Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring 3.2.0-preview.3 reproduces also on versions: 3.1.0, 2.0.0
  • Hosting platform or OS and .NET runtime version: 5.0.102
  • IDE and version: Visual Studio 2019
@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 19, 2021
@jsquire jsquire added Client This issue points to a problem in the data-plane of the library. Cognitive - LUIS needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Attention Workflow: This issue is responsible by Azure service team. labels Jan 19, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jan 19, 2021
@ghost
Copy link

ghost commented Jan 19, 2021

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @cahann, @kayousef.

Issue Details

Describe the bug
The adding example operation Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring.Examples.AddWithHttpMessagesAsync method throws Microsoft.Rest.SerializationException exception. With message:

Unable to deserialize the response.
JSON integer 2148095092 is too large or small for an Int32. Path 'ExampleId', line 1, position 23.

Seems like an issue with response deserialization to LabelExampleResponse class, caused by the type of ExampleId property. The actual response content is:

{"ExampleId":2148095092,"UtteranceText":"test example"}

The ExampleId value 2148095092 > 2147483647 (Int32.MaxValue)

Expected behavior
Executes successfully.

Actual behavior (include Exception or Stack Trace)

Microsoft.Rest.SerializationException
Unable to deserialize the response.
JSON integer 2148095092 is too large or small for an Int32. Path 'ExampleId', line 1, position 23

   at Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring.Examples.<AddWithHttpMessagesAsync>d__5.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring.ExamplesExtensions.<AddAsync>d__0.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at LuisApplicationSettingsBug.Program.<Main>d__1.MoveNext() in 

To Reproduce

var luisAppId = new Guid("590e74a6-4bb4-4729-8c78-7c53d7068750");
const string intentName = "B5578F30-59AA-4801-9A27-C73BB3C1C4FE";
const string versionId = "8.Rc";
using (var localClient = CreateClient(localApiKey))
{
    var example = new ExampleLabelObject("test example", null, intentName
    try
    {
        var exampleResult = await localClient.Examples.AddAsync(luisAppId, versionId, example);
    }
    catch (Exception ex)
    {
        Console.Error.WriteLine(ex.Message);
        throw;
    }
}

Environment:

  • LUIS region: WestUS
  • Name and version of the Library package used: Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring 3.2.0-preview.3 reproduces also on versions: 3.1.0, 2.0.0
  • Hosting platform or OS and .NET runtime version: 5.0.102
  • IDE and version: Visual Studio 2019
Author: nazimkov
Assignees: -
Labels:

Client, Cognitive - LUIS, Service Attention, customer-reported, needs-team-attention, needs-triage, question

Milestone: -

@jsquire
Copy link
Member

jsquire commented Jan 19, 2021

Thank you for your feedback. Tagging and routing to the team best able to assist.

@nathanaelk
Copy link

Hi! Any update on this?

@cahann
Copy link
Member

cahann commented Jan 22, 2021

Issue detected and planned to be fixed in a couple of weeks, will update the issue with the exact ETA 1st week of Feb.

@MahmoudYounes
Copy link
Contributor

MahmoudYounes commented Feb 28, 2021

Bug is resolved. please use authoring sdk v3.2.0-preview.4

@nazimkov
Copy link
Author

Hi @MahmoudYounes, thank you for the fix. Any plans on updating stable(not preview) SDK version?

@cahann
Copy link
Member

cahann commented Mar 18, 2021

@nazimkov we are waiting for more customer feedback on the preview capabilties so out tentitive date for the stable version is around July timeframe.

@kinosong
Copy link

List examples have the same issue too.

var examples = await _client.Examples.ListAsync(appId, version);

Newtonsoft.Json.JsonReaderException
HResult=0x80131500
Message=JSON integer 4100645187 is too large or small for an Int32. Path '[0].id', line 1, position 17.
Source=Newtonsoft.Json
StackTrace:
at Newtonsoft.Json.JsonTextReader.ParseReadNumber(ReadType readType, Char firstChar, Int32 initialPosition)

@kinosong
Copy link

already using authoring sdk v3.2.0-preview.4

@nazimkov
Copy link
Author

+1 LabeledUtterance stil use int for Id
image

openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-net that referenced this issue Mar 1, 2022
Modified billing information and updated examples (Azure#18041)

Co-authored-by: Daniel Rocha <daroch@microsoft.com>
@planty
Copy link

planty commented Apr 19, 2022

What is the status of this bug?
We have just started to receive the same error this evening, and it was working fine earlier today (5 hours ago).
We are using authoring resources in West Europe , and are now receiving the following error when using the Client.Examples.BatchAsync method (Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring v3.1.0):

Microsoft.Rest.SerializationException: Unable to deserialize the response.
 ---> Newtonsoft.Json.JsonReaderException: JSON integer 2147569261 is too large or small for an Int32. Path '[0].value.ExampleId', line 1, position 33.

We have 3 environments, all authoring resources are in West Europe, and all 3 are failing - this is causing an issue for our live production software.

We have been using LUIS for the past few years, why would we have only started seeing this bug today?

@jpingen
Copy link

jpingen commented Jun 21, 2022

Any update on this @cahann , @kayousef?
This issue still reproduces on v3.2.0-preview.4, and is currently blocking us as well.

@cahann
Copy link
Member

cahann commented Jun 27, 2022

@moabba do you have any comments on this issue ? Did we publish a stable version with the GA of the v3 authoring APIs?

PwnzorBot4000 added a commit to PwnzorBot4000/azure-rest-api-specs that referenced this issue Sep 16, 2022
This change attempts to fix some error cases related to issue 18041 Azure/azure-sdk-for-net#18041
@ziyadss
Copy link
Contributor

ziyadss commented Oct 6, 2022

Released version 3.2.0-preview.5 that fully addresses the bug.

@JimSuplizio
Copy link
Member

Hi @nazimkov, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.

@JimSuplizio JimSuplizio closed this as not planned Won't fix, can't repro, duplicate, stale Mar 5, 2024
@Azure Azure locked and limited conversation to collaborators Mar 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Cognitive - LUIS customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

10 participants