Functions troubleshooting common issues

Prev Next

Who can use Functions

As of r338, Functions is in Production Early Access. To request access, contact your Customer Success manager.

Read more in the Community thread here.


Troubleshooting common issues

Function returns an error in the app, but the test passes

Symptoms

  • Function test with static inputs succeeds
  • Function called from the app returns an error or null

Root cause

The input from the app does not match the expected data type or format.

Solution

  1. In the app trigger, add a Show Message action with the input variable value before calling the function.
  2. Verify the input matches the expected type (text, number, datetime).
  3. Check for null (empty) values and add validation in the app trigger if needed.

Function is used in 50+ apps and needs a new input

Symptoms

You need to add a new required input but do not want to update 50 apps manually.

Root cause

Functions does not support bulk updates for function calls across apps. As of r351, Functions does not have explicit versioning. When you publish a new app version, the newly-published version uses a snapshot of the function's logic as it existed at the time of publish.

Solution

Add the input and iteratively update and re-publish the apps to use the latest function logic.

App uses an older snapshot of the function despite being re-published

Symptoms

Function logic does not match the expected results based on the timing of the app version published.

Apparent root cause

Copying and pasting triggers, widgets, or steps from a published app version into a dev app can cause snapshot function references to be used. Once this happens, if there were no prior dev references to that function, all future uses of that function in the app continue using the same snapshot version.

Pro tip: In the app trigger action Run Function, click the 3-dot button next to the selected function and select View Function to check if the app references a snapshot of the function.

Solution

Delete trigger actions using the problematic function and re-add the function. This forces the app to use a fresh reference of the function.


Additional Resources


Did you find what you were looking for?

You can also head to community.tulip.co to post your question or see if others have solved a similar topic!