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
      • 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
  • Testing your Apps
  • Debugging Apps
  • Force logout of an App
  • App Health
  • Debugging Data Issues
  • Debugging Services
  • Service Health
  • Deployment
  • Snapshots
  • Backup your App or Service

Was this helpful?

Export as PDF
  1. How to
  2. Security, testing and deployment

Test and debug

PreviousSecurity checklistNextExample apps

Last updated 1 year ago

Was this helpful?

Every action you take in Appfarm Create is instantly saved, meaning; your application is only a description of which UI components, logical building blocks, object classes, etc. are used in your application, as well as where and how they are used. Deployment to the development environment is instant and testing your App is simply a matter of navigating to a URL.

Testing your Apps

All Solutions in Appfarm come shipped with dedicated Development (DEV), Test (TEST), Staging (STAGE), and Production (PROD) environments. What is available in your Solution depends on your Appfarm subscription plan.

While using Appfarm Create to define your applications, all changes are automatically deployed to the Develop environment. Keep the apps client open in a browser tab to see your applications come to life as you use Appfarm Create UI Designer.

Navigate to https://SOLUTION_SHORTNAME-dev.appfarm.app, or use the button in the app bar to open the client for the active App.

If your App has only been enabled for small devices (mobile devices), you might need to open the debug tool in your browser to simulate a mobile screen resolution.

Debugging Apps

When testing your functionality, you will at some point need a way to debug your application logic. Appfarm comes with a set of built-in tools to help you tune your apps, and also diagnose problems.

Have a look at the section for more details. Here you will learn how to use the Developer Tools for Apps, as well as more advanced debugging.

If you want to simulate running the App from another device, such as a mobile or tablet, you could use the browser development tools. We recommend Google Chrome for this purpose. Chrome has a dedicated device button in the top-left section of the console. To open Developer Tools for Chrome, click F12, or navigate to Developer Tools from the settings menu of your browser. The browser built-in Developer Tools may also be used for .

If you are having a production issue: Have anything been deployed recently? If not, the amount of data used in the App or Service combined with the number of users or service executions is probably the issue. If no such thing is suspected, it might be a temporary infrastructure issue (visit , reach out to your point of contact, or email support@appfarm.io) If something has been deployed, you should start with an investigation of new or changed functionality you have deployed. It might also be that a new Appfarm version was included in the last deploy. If the latter is the suspected issue, post the issue in our , reach out to your point of contact, or email support@appfarm.io.

Force logout of an App

When testing Apps with different users, it sometimes occurs that the browser session is logged in with an incorrect user and that you do not have a "Logout" or "Signout" button available in your App.

You may log out 3 different ways:

1) Add a button to your App, and add an action with action node .

2) Navigate to the root (https://SOLUTION-HOSTNAME, for example https://thirtyfiftyinc.appfarm.app) and sign out using the top-left menu. Note that this approach only works if you have access to more than 1 app, otherwise, you will be redirected automatically to the (only) App you have access to.

3) Append /auth/logout to the URL (e.g. https://SOLUTION-HOSTNAME/myapp/auth/logout)

App Health

Debugging Data Issues

But how can you debug which data source is causing the issue? Here are a few steps to help you with this debugging:

Checklist for debugging data issues
  1. Create a copy of your App (E.g. "My App (DEBUG)")

    1. If it opens in Staging, it means that the data services in the production environment are overloaded (many users or services in Prod, exhausting the data service with queries). Measure the time it takes. A rule of thumb: 10 seconds is too much.

    2. Note that if it opens in Staging, but not Production, you should check if there are a lot of heavy services running in parallel in production, or if you have a large data source with Subscribe to Updates that are used as function parameters in runtime properties on other large data sources.

    3. Inspect the number of objects in data sources and sizes in megabytes using dev tools (click a data source to see the number of megabytes). A rule of thumb is that 10.000 objects and 10MB is an upper threshold, but it depends on the usage and number of object class properties as well.

    4. If it does not open at all, you should just continue to the next step and try to locate the data source(s) that is causing the issue.

  2. Locate the data source that is causing the issue:

    1. Disable the first half of the (database connected) Data Sources, in other words, mark them as Initially Disabled (or set Initially Limit Object Count to e.g. 10)

    2. Is the App still not loading? Repeat step 3.1 for the rest of the data sources until the App is loaded. You have now located the issue: It is in one of the last disabled data sources.

    3. Re-enable the last disabled data sources until the App is not loading, and repeat until you have found the data source causing the issue.

    4. Check the number of records in that data source, either by using GraphQL or (simpler), set Limit Object Count to 1, and display the built-in property Total Object Count of that data source. The Total Object Count will hold the number of records in the database that matches the filter criteria (even though only 1 is read due to the Limit Object Count setting).

    1. A scenario that may occur is the following (example): Some old data has stored "ThirtyFiftyInc" in the column "company". That Object Class Property (a string) is deleted (NB: that does not delete the data!). At a later stage, a new Object Class Property, also named "company" is created, but with reference to Company as the data type (ObjectID is the technical datatype behind the _id). When reading the old records, the joins may fail at a database level.

Debugging Services

Service Health

Deployment

Deployment is the task of applying updated versions of your application to various environments. After testing in the DEV environment, you might deploy the new version of your Solution to TEST, STAGE, or PROD environments.

All deployments are done in Appfarm Create. Click Deploy in the main menu.

Appfarm Create features one-click deploy - allowing you to deploy your changes to TEST, STAGE or PROD with one click. You may also roll back to a previous version in all of the environments.

Note: If the deploy button is disabled, there are no changes to deploy.

Snapshots

You may take snapshots of your entire Solution (for example, Apps, Global Data Model - all configuration done in Appfarm Create) at any time. From the Deploy menu, expand the top left section Development, and select the Take Snapshot option. The snapshot will be listed below, and you may roll back to this (or another) snapshot at any time. Note that all changes done after the time of the snapshot will be overwritten.

Backup your App or Service

Make a copy of your App (or Service) if you want to do some major changes. You are now able to experiment and develop on the copied App, without risking unrecoverable damage.

From the Apps list, hover over the App you want to make a copy of, click the more-button (𐄛) and then Make a copy. The App is now duplicated, without any references to the original App.

App Health is found in the top-right menu in Create when you are inside an App. It reveals incorrect or sub-optimal setup of your App, and you should revisit App Health regularly to remove errors and unused functionality. Please see for more info on App Health.

In some cases, your App might not load due to massive amounts of data, performance-heavy on data sources, or corrupt data. Database Connected Data Sources in App Data are loaded before the On App Load action executes, and before the App is displayed.

In the cases where loading initial data fails, you might get a timeout or minimal logging, since it often fails before the Developer Tools for Apps is loaded. Performing in the network tab may reveal this. But in general, if the app fails to load (before the On App Load action executes) without any errors in the log, the error is most likely due to large amounts of data or runtime functions on large data sources.

If you have a Staging environment: Deploy your app to Staging, enable , and see if it opens. If you do not have a Staging environment, you should consider enabling Devtools for Apps in Production for a short time.

Check if the data source has that are functions. If so, tick the option Initially Skip Function Properties. Remove the Limit Object Count / enable the data source, and see if the App loads. If it loads, the reason for the performance issues is one of the function properties. See step 2.2 (function parameters being large data sources with Initially subscribe to updates). But in general, you should not use other data sources as function parameters, if you are dealing with large datasources (>1000 objects)

Optional/Alternative: If the issue is inconsistencies or corrupt data, you will typically see a red error in the log when loading the App. A common error in the log related to this is CastError (read more ). You may need to inspect the data with GraphQL and update or delete the record(s).

If you want to debug services or test them manually, Appfarm comes with a . This has many of the same features as the DevTools for Apps, but it may also be used to trace and se execution log for incoming requests, or the log when a Service is executed by a schedule.

If a Service works when you are executing it manually in the , but not when executed from a Schedule (or when triggered by a third party), the issue is most likely related to the of the Service Account. The Service Account needs to be a member of a Role, with itself, and the used by the Service, and it must have to the Environment.

Service Health is found in the top-right menu in Create when you are inside a Service. It reveals incorrect or sub-optimal setup of your Service. Please see for more info.

this section
Devtools for Apps
DevTools for Services
this section
Developer Tools
statuspage
community
Log out
Devtools for Services
Permissions
advanced debugging
advanced debugging
runtime functions
runtime properties
access to the Service
Object Classes
login access
here