Appfarm Documentation
Getting startedDocumentationCommunityAppfarm Create
  • Overview
  • Getting Started
    • What is Appfarm?
    • Key concepts
    • Quickstart
      • Speed intro
      • Step-by-step guide
    • Appfarm Showroom
    • FAQ
  • Appcademy
    • Learning paths
    • Appfarm Fundamentals
      • Intro Course
        • 1. Intro to No-Code and Appfarm
        • 2. Navigation in Appfarm Create
        • 3. What is Apps?
        • 4. Intro to UI Editor
        • 5. Data Model
        • 6. App Data
        • 7. Actions
        • 8. Tips and Tricks
        • 9. Intro to practical walkthrough
        • 10. Create a details view of a Project
        • 11. Create a Custom List
        • 12. Swipe and Delete
        • 13. Functionality for simple Create of Data
        • 14. Upload and Download Photos
        • 15. Input Dialog with Validation and Save
        • 16. Dashboard
        • 17. Summary
        • Quiz
      • User Interface Fundamentals
        • Container - Sectioning, Styling and Repeating
        • Conditional Styles
        • Motions
        • Responsive Design
        • Step-by-step workflow
        • Featured UI Components
        • Quiz
      • App Data Fundamentals
        • Data Source Filtering
        • App Variables and Runtime Properties
        • URL Parameters
        • Quiz
      • Actions & Logic Fundamentals
        • Event Handlers
        • Featured Action Nodes
        • Context Parameters
        • Quiz
      • Services Fundamentals
        • Introduction to Services
        • Setting up a Service
        • Scheduling a Service
      • Integration Fundamentals
        • The web request action node
        • Fetch data from an endpoint
        • Map data to a data source
        • Modify the response
        • Nested data mapping
        • Path parameters
        • Authentication
        • Send data to an endpoint
        • Quiz
      • User handling and permissions
        • Users and roles
        • Permissions
        • Creating users
        • Extending the User object class
        • Updating and deleting users
        • Unauthenticated access
        • Quiz
    • Appfarm Professional
      • User Interfaces
        • Featured UI Components
        • Concepts and Use Cases
      • Data Structures & Data Handling
        • Data Features
        • Search & Filters
        • Featured Action Nodes
        • GraphQL
      • Logic & Flow
        • Logical Concepts
        • Date and Time Handling
        • Featured Action Nodes
        • Exception Handling
      • Login & Configuration
        • Login and Authentication
        • Settings, Configuration and Languages
      • Security & Operations
        • Security and Permissions
        • Deployment
        • Schedules and Logs
        • Debugging and App Health
      • Performance & Optimization
        • Optimizing Performance
        • Enhancing Functionality
    • Appfarm Sales Representative
    • Appfarm Developer Forum
      • Session 1: Data Modeling in Appfarm Create
      • Session 2: App Data in Appfarm Create
      • Session 3: Services in Appfarm Create
      • Session 4: Optimizing Performance
    • Background
      • Databases
        • Data modeling 101
        • Database normalization
  • Library
    • UI components
      • Advanced bar chart
      • Advanced bubble chart
      • Advanced combined chart
      • Advanced gantt chart
      • Advanced heatmap chart
      • Advanced line/area chart
      • Advanced pie chart
      • Advanced scatter plot chart
      • Advanced solid gauge chart
      • Animated component
      • Avatar
      • Avatar group
      • Basic bar chart
      • Basic gauge chart
      • Basic line chart
      • Basic pie chart
      • Bottom navigation
      • Button
      • Checkbox
      • Chip group
      • Circular progress
      • Coded component
        • Coded component examples
      • Container
      • Date & time picker
      • Drawable canvas
      • Floating action button
      • Icon
      • Icon button
      • Iframe
      • Image
      • Linear progress
      • List
      • Map
      • Menu list
      • Multi select
      • PDF reader
      • Popover
      • Radio buttons
      • Rich text editor
      • Rich text
      • Select
      • Slider
      • Speed dial
      • Switch
      • Table
      • Tabs
      • Text
      • Text edit
      • View container
      • Visibility group
    • Action nodes
      • Aggregate data
      • Advanced search
      • Auth operations
      • Block
      • Catch exception
      • Copy to clipboard
      • Create file archive
      • Create file object
      • Create object
      • Create user account
      • Delete objects
      • Delete user account
      • Duplicate objects
      • End execution
      • Exit block
      • Exit loop
      • Export data
      • Foreach
      • Generate document
      • If
      • Import data
      • Invalidate cache
      • Log in
      • Log to console
      • Log out
      • Next iteration
      • Navigate
      • Open/close popover
      • Open confirm dialog
      • Open print dialog
      • Open snackbar
      • Open Unsplash dialog
      • Open URL
      • Persist objects
      • Push notifications
      • Read objects
      • Request permissions
      • Run code
      • Run other action
      • Run service
      • Scan barcode/QR code
      • Send email
      • Send SMS
      • Set client language
      • Set data source attributes
      • Set selection
      • Set theme
      • Set user account image
      • Show install app prompt
      • Sleep
      • Sort objects
      • Throw exception
      • Toggle drawer
      • Update object
      • Update secret
      • Update user account
      • Web request
      • While
  • Reference
    • Appfarm Create
      • Appfarm Commander
      • Blue dots
      • Copy & Paste
      • Farmer's Market
      • Find references
      • Find usage
      • Keyboard shortcuts
      • Undo/Redo
      • User preferences
    • Platform concepts
      • Conditions
      • Data bindings
      • Date and time
      • Event handlers
      • Filters
      • Functions
      • Markdown
      • Objects
      • Operators
      • Value processor
    • Dashboard
    • Apps
      • UI
        • Views
          • Dialog
          • Drawer
        • Layout designer
        • Component properties
        • Shareable UI components
      • Data
        • App variables
        • Data sources
        • Calendar data sources
      • Actions
      • App settings
      • App size
      • App health
    • Services
      • Service Endpoints
      • Service settings
      • Service health
      • API explorer
    • Data model
      • Object classes
      • Object class properties
      • Enumerated types
      • GraphQL
        • Queries
        • Mutations
      • Data Extract API
      • Time series data
    • Operations
      • Deploy
      • Schedules
      • Logs
    • Resources
      • Themes
      • Files
      • Fonts
      • Internationalization
    • Configuration
      • Environments
      • Login
        • Custom auth providers
    • Security
      • Users
      • Service accounts
      • Roles
      • Secrets
      • Permissions
        • Conditional Permissions
    • Appfarm Client
      • Developer tools for Apps
      • Developer tools for Services
      • Warnings and errors
  • How to
    • Data modeling
      • Many-to-many relationships
      • Use naming conventions
      • Offline data handling
      • Data silos and White labelling
    • User interface
      • Manage a many-to-many relationship with a Chip group
      • Configure drag and drop
      • Build a drag-and-drop calendar
      • Design a responsive layout
      • Work with flexbox
      • Use Mapbox as a map layer
      • Understand charts
    • Logic and flow
      • Event Log Design
      • Configure advanced search
    • Themes and styling
      • Change the active theme
      • Add custom email templates
    • Enhance your app
      • Add deep links
      • Add keyboard shortcuts
      • Add link previews for social media
      • Apply SEO best practices
      • Change the active language
      • Generate a PDF from a Container
    • Integrations
      • Integrate with external systems
      • Integrate with OpenAI
      • Integrate with Google Analytics (GA4)
      • Configure a custom email account
      • Integrate with a payment provider
      • Integrate with Signicat
      • Integrate directly with an external database
      • Retrieve a Bearer token from Google Cloud
      • Fetch data from BigQuery
      • Retrieve access token from Microsoft Entra ID
    • Workflow automation
      • Update an OAuth 2.0 access token from a service
    • Authentication and access control
      • Add users and assign roles
      • Configure unauthenticated access
      • Implement third-party authentication
    • Security, testing and deployment
      • Add a custom domain
      • Install an app on a device
      • Get ready for Production
      • Optimize performance
      • Security checklist
      • Test and debug
    • Example apps
      • Create an Instagram clone
        • The end result
        • Designing the feed
        • Create new post
        • Add a like-button
        • Add comment-functionality
  • Solution administration
    • Subscription and billing
    • Dedicated tier benefits
    • Guide to GDPR
      • Key principles
      • How Appfarm protects personal data
      • How you can protect your clients’ data
      • Glossary
    • Appfarm and the EU AI Act
  • Policies
    • Appfarm Policies
    • Data Processors
    • Privacy Policy
Powered by GitBook
On this page
  • Warnings
  • Running full formula recalculation on Self after just recalculated all formulas
  • Replaced data in dataSource, but did not recalculate dependencies
  • The created object does not match the filter of the Data Source it was created in
  • Errors
  • Create object failed - Cannot create object in non-empty dataSource with cardinality one
  • AuthorizationError: Missing required permissions to...
  • EnvironmentAuthorizationError - User Accounts accounts cannot be updated from current environment - Check Environment settings
  • ForEach: Unable to find dataSource for iteration
  • InvalidEmailError: Email for validation is Nil
  • No objects found for deletion
  • Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource
  • SimpleWebRequest Error: Invalid mapping - non-integer path for Array
  • Invariant failed
  • Error running function: Cannot read properties of undefined (reading 'length')
  • Object or array was returned in function value. Expected primitive type
  • Proxy error / ECONNREFUSED
  • Proxy error - api-service unavailable
  • Navigate - Could not find specified view / Could not find specified subview
  • Eval timeout - function took too long to execute (FunctionEvalTimeoutError)
  • Error - At least one object for modification is not in the datasource
  • CastError: Cast to ObjectId failed for value ...
  • Action Node failed: Persist Objects -> MongoServerError: WriteConflict error
  • Unable to load initial data for app (RequestTimeoutError)

Was this helpful?

Export as PDF
  1. Reference
  2. Appfarm Client

Warnings and errors

PreviousDeveloper tools for ServicesNextData modeling

Last updated 9 months ago

Was this helpful?

There are a range of warnings and errors that you may encounter in the while debugging your apps.

Warnings

Warnings are notices which you should review. You should potentially take action if your app is suffering from degraded performance.

Running full formula recalculation on Self after just recalculated all formulas

This warning occurs when an Update/Create/Delete or Set Selection action node has been run, forcing another data source to recalculate one of its runtime properties (function properties), a short time after it was last done.

Example: Data source Order has a runtime property Is transferred (a function, returning trueif the property Transferred Date has value). An action updates Transferred Date twice. This warning will appear.

This warning can be ignored in most cases. It might be worth investigating if you notice a performance issue when recalculating formulas (runtime properties as functions) on large data sources.

Replaced data in dataSource, but did not recalculate dependencies

This warning is typically seen when performing web requests and a mapped data source is populated with data. The populated data source is runtime only, and when this is populated using a web request, an optimization is in place to ensure that potential dependencies are not recalculated. A dependency in this case is a deep data binding.

Example: A web request populates data source Orders (runtime). If you try to display Orders (runtime).Customer.Name in a view, Customer.Name will not be updated when Orders (runtime) is repopulated. However, if you add Customer as a on the Orders (runtime), you can safely reference Orders (runtime).Customer.Name.

This warning could be ignored in most cases. If you are using deep data bindings on the populated data source, make sure to utilize .

The created object does not match the filter of the Data Source it was created in

This warning appears when you have a Filter on a Database Connected Data Source, and you perform a Create Object into it - but the created object does not match the filter of the Data Source. The object is successfully created, but is then immediately removed from the Data Source.

Example: A Data Source Open Tickets with filter Ticket.Status = Open. A Create Object creates a new Ticket into this Data Source, but the Status is set to Completed. Thus, a Completed ticket is created into the database, but that completed Ticket does not exist in the Data Source Open Tickets.

Errors

Create object failed - Cannot create object in non-empty dataSource with cardinality one

This error occurs when you have a runtime-only data source with cardinality one. You try to create a new object in the data source, but an object already exists in the data source.

Example: You have an action Create project creating a new Project in the data source Project (runtime). It works the first time, but fails the second time.

There are two ways to solve this issue:

Option 1 (recommended): In the Create Objects action node, select the Replace Existing Object checkbox.

Option 2: Use a Delete Objects action node on the runtime data source before running the Create Objects action node.

AuthorizationError: Missing required permissions to...

The following errors may occur when creating or updating user accounts from an app.

  • AuthorizationError: Missing required permissions to assign roles

  • AuthorizationError: Missing required permissions to delete roles

  • AuthorizationError: Missing required permissions to update account

  • AuthorizationError: Missing required permissions to create account

These errors indicate that the logged-in user's role(s) do not have sufficient privileges to perform the operation. When performing user account operations in an app, Owners, Maintainers, and Developers role privileges are not valid.

EnvironmentAuthorizationError - User Accounts accounts cannot be updated from current environment - Check Environment settings

The same cause also applies to the following error messages:

  • User Accounts accounts cannot be created from current environment - Check Environment settings

  • User Accounts accounts cannot be deleted from current environment - Check Environment settings.

These errors can occur in the Development, Test or Staging environments.

ForEach: Unable to find dataSource for iteration

Set a valid value in the Selection property of the Foreach action node such as All objects, Selected object(s) or Filtered selection.

InvalidEmailError: Email for validation is Nil

Example: You read data into a User (runtime) data source, resulting in 0 objects. You try to run Send email with the recipient User (runtime).Email.

Your business logic is not set up correctly. Make sure the data source selected in the Recipient property contains an object, and that the email property of this object has a value.

No objects found for deletion

Your business logic is not set up correctly. Make sure the Delete objects action node has a valid filter or selection.

Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource

The recipient of the web request (the other application) needs to add *.appfarm.app (or your custom domain, if applicable) to their list of accepted domains in their 'Access-Control-Allow-Origin' settings.

SimpleWebRequest Error: Invalid mapping - non-integer path for Array

Invariant failed

This error message is related to drag-and-drop.

Error running function: Cannot read properties of undefined (reading 'length')

Functions may exist in Runtime Properties in App Data, inside an Action (e.g a Condition) or in User Interfaces.

If this error message e.g. appears in a Persist Action Node, it's probably caused by a Runtime Only Property (Function) on a Data Source. If it appears just when navigating to a View, it's caused by a function (calculated text, visible condition etc.) inside that View.

Example: A function return companies[0].name can give this error message: What if companies is an empty list? Then this function will fail with this error message. The function should handle this scenario and be set up such as this: if (companies.length>0) return ...

Go through Runtime Properties (Functions) on your Data Sources. If this message occurs when the App loads, it's probably related to a Database Connected Data Source. Check for functions which could result in errors, and handle this by adding IFs as in the above example.

Object or array was returned in function value. Expected primitive type

This error occurs when a Function returns a data type which is not a simple data type. A simple data type is an Integer, Boolean, String, Float, ID etc. Typically, this occurs when the function returns an Object or an Array.

Example: An Update Object Action Node updates a Datetime property using the following function:

let myDate = moment().add(2,'days')
return myDate

myDate is an Object of type moment, and not a simple data type. In the example above, the Function should return a Datetime data type.

Solution: The return value needs to be changed to a simple data type. In this case, the moment.js library has a toJSON() method that converts it to a Datetime.

let myDate = moment().add(2,'days')
return myDate.toJSON()

This issue is solved by converting the return value of the function to a simple data type. In many cases, the issue is that you are returning an object, and you may often apply .toJSON() to the return value.

Proxy error / ECONNREFUSED

This error message may occur when trying to access an App, the GraphQL Editor (https://<yoursolution>.appfarm.app/api/graphql/) or Swagger (the Services tool found in https://<yoursolution>.appfarm.app/api/services/).

The most frequent occurrence of this error is in the Dev-client for your Apps (when testing your App in Develop environment), and you have a large solution. In this case, the auto-deploy may cause a minor delay for the Dev-client to reload. The issue should only last for a few seconds. The exact same issue may occur for the Swagger client when testing your Services in the Dev environment.

This issue normally resolves itself after 5-30 seconds

Example error messages:

  • Proxy error (only): This may occur when the client is suspended or disabled. For example, if your solution has been suspended and the Dev client is disabled.

  • {"code":503, "message":"Proxy error - service", "err":{"errno":-111, "code":"ECONNREFUSED","syscall":"connect","address":"NN.NN.NNN.NN", "port":5000}}

  • {"code":503, "message":"Proxy error - client unavailable", "err":{"errno":-111, "code":"ECONNREFUSED","syscall":"connect","address":"NN.NN.NNN.NN", "port":5000}}

Proxy error - api-service unavailable

Navigate - Could not find specified view / Could not find specified subview

These errors are usually caused by one of these reasons.

  • The action tries to open a view that does not exist. This can be caused by a typo in a data bound viewId or an inconsistency between actual views and the navigate action node.

  • The View exists, but is not loaded since it is corrupt and contains an error causing the parsing and inflation of the view to fail. These parsing errors should be shown in Dev Tools from the App Validation menu.

  • The navigate is run in an On App Load event handler, and is run prior to the client receiveing all metadata. Note that the On App Load event is run after the App has loaded app description, data model, actions, functions and initial data, but prior to loading all layout / views.

Eval timeout - function took too long to execute (FunctionEvalTimeoutError)

This error may be seen in Apps, but is more typical in Services.

Evaluation and calculation of functions has a execution limit of 2000 milliseconds. That applies to e.g. a Result Parser in a Web Request, an If-statement using the Function Editor, or a Runtime Property or Object Class Property of type Function.

If you have a single function or result parser consuming more than 2000 ms, you need to optimize the function, or process smaller amounts of data inside it.

Error - At least one object for modification is not in the datasource

This error typically occurs in Development environments when performing Update Object on Database Connected Data Sources, and there is an inconsistency between the data source content on the client ("in the App") and on the server. When developing in Appfarm Create, the client tries automatic deploy of all "UI related changes". But whenever a change is done on the data level (a new data source, a new object class property put in use in your UI), you will need to manually refresh your development client to get new data. Otherwise, errors such as this may occur.

CastError: Cast to ObjectId failed for value ...

This error is caused by inconsistencies in the data, which may occur in the cases where old data is stored in column names previously deleted, but now "re-established" with a new datatype.

Action Node failed: Persist Objects -> MongoServerError: WriteConflict error

Full error message: Action Node failed: Persist Objects -> MongoServerError: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.

This error occurs when simultaneous operations towards the same records in the database happen at once: One transaction has not been released yet when another transaction towards the same record(s) hits the database.

It is typically seen when a Service Endpoint is being triggered in parallel from multiple parties, operating on the same data records. You may toggle the No Concurrency flag on the Service Endpoint to avoid the problem.

Unable to load initial data for app (RequestTimeoutError)

This error message occurs if too much data is read for the database connected data sources defined for your app, or if you have circular dependencies in your App Data filters.

Go to Permissions > Accounts/Roles to verify that you have the correct permissions in place. Note that your own user must be member of a custom role in order to create, update or delete users from an app - even in the Development environment. Also, verify that create, update or delete users is under Environments. Read more .

accounts are global resources and changes to user accounts in any environment will affect production. To prevent unintended user changes, operations are disabled by default in Development, Test, and Staging. Additionally, the settings are automatically reset every night.

Verify that create, update or delete users is under Environments.

A is missing a value for the Selection property. This error can also be seen in Appfarm Create with a red dot on the property.

A has an invalid Recipient property.

A results in no objects being deleted, since either the data source is empty, or the expression results in no objects for deletion.

It might also be that you have a using Selected object(s), and the data source has no selected objects.

This error occurs when you have a with Send from Client selected. When using send from client, the browser's CORS (Cross-Origin Resource Sharing) policies are triggered.

A returns an array of objects, and the result mapping is not set up correctly.

In Result Mapping, to map all objects from the response, make sure to set the Data Source property to a runtime-only data source with cardinality Many. If you receive an array of objects and only want to map the first item, you can use dot notation to access the first object, for example Orders.0.OrderNumber to only map the order number of the first order. See for more information.

Make sure any functionality is configured correctly.

This error may also occur in a Prod environment when not sufficient resources are available. For example, if one or more performance-heavy services are running, and the auto-scaling has reached its limit. A solution to this may be to improve the performance of the Service (it) or to adjust the Schedule (if more Services are running in parallel). It might be that the limits should be adjusted as well if there is nothing to optimize (Appfarm needs to be contacted).

This error occurs if you have not enabled API Services from , and you try to access , or try to execute a Service Endpoint from a third-party tool or schedule.

Go to and tich Enable API Services.

Read more about how to debug and fix this issue in the Debugging Data Issues section .

An example of the first scenario (too much data): You have a data source Orders with filter Read All, and 10.000.000 orders exist in the database. This amount of records will not be able to load before a timeout is encountered. You must limit the amount of data read into one or more of the data sources. Please see for information on debugging data issues.

An example of the second scenario (circular dependencies): You have a data source Orders and a data source Companies. Orders has a filter Company exists in Companies.ID, and Companies has a filter ID exists in Orders.Company. None of them may be read first since both are waiting for each other. These kinds of issues should be detected by the tool.

Foreach action node
Send email action node
Delete objects action node
filter
Delete objects action node
Web request action node
Web request action node
Web request
drag-and-drop
optimize
App Health
developer tools
User
Service Developer Tools
user account manipulation
enabled for the environment
Environment Config
Environment Config
enabled for the environment
here
this article
reference data source
reference data sources
here