Question

OData returning error to only specific users

  • 21 November 2023
  • 7 replies
  • 109 views

Userlevel 1

This past weekend, we just upgraded to Acumatica 2023 R1 (23.111.0019). We have an Excel app that retrieves some information from a Generic Inquiry through an OData request. It uses a specific account we created just for OData, so disregarding who is using it, it ends up submitting the request using this OData account.

We’re aware of a known issue related to OData on our new version of Acumatica, but the error mentioned in the post is not exactly what we’re receiving as a response. And OData requests are actually working for some users.


Everything has been working fine until after the upgrade, when we realized that the Excel app stopped working only for some users. We haven’t found a cause for this but we’re sure it’s not related to IP filters or individual account rights. For the users not able to use it, it returns the following error:

{

  "odata.error":{

    "code":"","message":{

      "lang":"en-US","value":"An error has occurred."

    },"innererror":{

      "message":"en-us\r\nParameter name: locale","type":"System.ArgumentOutOfRangeException","stacktrace":"   at PX.Api.Shared.WebApi.HttpRequestMessageExtensions.SetLocaleScope(HttpRequestMessage request)\r\n   at PX.Api.OData.Controllers.GenericInquiryController.<Get>d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__1`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()\r\n--- End of stack trace from prev

ious location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilter

AsyncCore>d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()"

    }

  }

}

 

Any idea of what could be causing this to only specific users and how we could fix it?

 

Thanks in advance


7 replies

Badge +11

From the error, it looks like it would have something to do with the locale of a parameter. This would make the most sense (to me) for a date parameter.

This would also make sense given that user’s could have different locale settings on their machines depending upon their preference.

Try checking the Windows Time & Language preferences for these users and see if anything is awry.

(Windows 11)

 

Userlevel 1

Hi Daryl,

Thanks for your suggestion. Unfortunately I was not able to find any discrepancies on this matter on the computers I checked where we’re having these problems.

Badge +11

Does the GI you're exposing have parameters?

Userlevel 1

It doesn’t. We already tried including and removing parameters in the GI. It didn’t seem to affect, returning the same error response.

Userlevel 1
Badge

I have the same error. Has anything been figured out?

Userlevel 7
Badge

Hi @jchavez were you able to find a solution? Thank you!

Userlevel 7
Badge +4

@jchavez Could you maybe share your OData query?
Are all users using the same Excel version? OS?
Was there an office/excel update recently that could cause this? Windows Update?
Are you able to get results using POSTMAN on those user’s computers?

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved