Functions Outputs stopped working on our test system

I’m afraid to play around with them on Live in case the same thing happens, but randomly our Functions on the test system stopped working for any that have an output variable. I can’t create new ones with output variables either; they save fine but when ran through Schedule Epicor Function it errors in system monitor with a generic message: “System.ArgumentException: Unknown parameter: ‘PriceBreaks’.” or whatever the variable name we gave it was.

Anyone run into this before? Hasn’t been an issue in the past - the only thing that might have happened since last developing on our test environment was refreshing it with our Live environment. But currently our live environment runs functions nightly, with outputs, and it works fine.

I see a few posts about functions being janky and doing this, weird thing is they are all recent from what I can see. I’m on 2022.2 though. I tried recreating them from scratch, and even did a new function with 1 input 1 output and the same error occurs.

Have you tried turning it off and on again… as the ole IT joke goes?

1 Like

We are saving money by having our test environment on the same app server / task agent / sql server as our live environment… So I will have to wait to try that one until after hours haha. (also, that means I’m not allowed to make our BPMs do an infinite loop anymore)

Wasn’t sure if there was some setup that I did a long time ago that I’ve forgotten about and it got wiped/changed when moving live to test.

It should still be a separate app server you stop that app server all together

You’re right, app server I should be able to at least try. We usually go nuclear and do reboots when things break lol

go do it GIF

1 Like

No dice for now. Going to try a full reboot of servers next time I can and read the darkest depths of the user guide for functions…

For anyone else interested in the future to match up error messages:

Not seeing anything on event viewer for it.

Definitely something strange going on. I bumped it up to production library and the REST side of it works fine. May just use REST as a workaround until I can fix this error.

Its just a limitation of scheduling functions. There are a bunch of other posts about it floating around.

Weird part about it is our live system works fine right now and hasn’t had any issues. Our test system worked fine as well, until some time between October and yesterday to my knowledge. It’s a sudden blanket failure across all functions new or old on our test system, for any with an output.

I only see two relative posts that seem to have the same issue; one remained unsolved while the other had the solution as “there are bugs”. Now I just need to track down which bug I happen to have and how I can get it running again.

Didn’t get a chance to restart the server so it will likely be on the backburner today.

We’ve seen this it’s some sort of cache. Reboot usually fixes it or IIS Reset

Hi Logan,
The workaround is to create a wrapper function without output params, and schedule it to call the main function. That works for us.

// Function: "CallMainFuncName"
try
{
  //discard results
  var result = this.ThisLib.MainFuncName();
}
catch(Exception ex)
{
  throw new Ice.BLException(ex.ToString());
}

This is ridiculous. The function scheduler freaks out with outputs?

The solution is to remove the outputs?!

Or wrap in another function with no outputs - which is similar: ignore the outputs.

I guess I could also call the EFx from a Flow and schedule the Flow.

Strange.

Anyone reported this? I’m about to go check. Not seeing it anywhere on EpicCare.

Occasionally there is a bug with parameters.

The solution is to export the library and edit the json if it’s totally screwed, or sometimes just reimport as is.

See it rarely but it has happened a few times to me.

Haven’t been able to pinpoint the exact issue to report.

1 Like

I have submitted it to EpicCare.

:crossed_fingers:

Or…run the function from an external scheduler. :person_shrugging:

Bonus: You have a lot of options to recover and to notify when failures occur.

films generation GIF

1 Like

I wish I would have remembered to update this with our solution - but I would agree it is some sort of cached data. I believe a full restart with a full IIS reset as suggested fixed it for us but I’m not 100% sure at this point.


We have also done a bunch of refreshes of our test server with the live server so it could be a table’s data I suppose, but I tend to live on the side of “Jose is usually right” when perusing this site.

I agree with @NateS . Time to start looking for work elsewhere. You should be able to enjoy your work.

1 Like

By crashing the production server?