Errors
Troubleshooting for error messages from the Form.io client and server.
General Error Troubleshooting
Environment did not respond to a CORS request properly
When encountering CORS issues with an environment, first check that the API server is running. Test this by opening a browser and appending /status to the API server URL within your browser.
https://yourenvironment.com/status
The URL should return metadata about the environment. If data is not returned, it is likely the deployment failed. Review the server logs to determine what went wrong.
Unknown Component - Premium Components
The "Unknown Component" error indicates a lack of access to the Form.io Premium Components library. Premium Components are distributed via NPM, and require a special library license.
To resolve the error, confirm the Premium Components library is being included in the environment and that the correct license is in place. Please refer to the Premium Component documentation for instructions on including Premium Components in an application.
For assistance with verifying license eligibility, contact help@form.io
Script Execution Timed Out
When you encounter a "Script Execution Timed Out" error in Form.io, it means that your script exceeded the allowed execution time set by the FORMIO_VM_TIMEOUT
environment variable.
The FORMIO_VM_TIMEOUT
environment variable in Form.io is used to define the maximum execution time (in milliseconds) for scripts running in Form.io
Purpose
Form.io uses a secure VM to execute custom logic, such as:
Custom validation
Custom conditions
Custom API calls
Logic in Calculated Values
The FORMIO_VM_TIMEOUT
variable ensures that scripts do not run indefinitely, helping prevent performance issues and potential security risks (like infinite loops).
Default Value
If not explicitly set, Form.io applies a default timeout of 500ms However, this can be adjusted by modifying the API Enterprise Server ENV variable
How to Set It
You can define this variable in your environment configuration
Considerations
Setting a very low timeout may cause scripts to fail prematurely.
A high timeout increases the risk of performance bottlenecks.
Invalid Alias - Form Error
An alias is the unique API identifier of a Form or Resource. The Invalid Alias occurs when a form is rendered and typically happens when something is wrong with how the alias has been defined or utilized within your Form.io environment or application.
Below are common scenarios when this error can occur and tips on resolving the problem:
An embedded form has been deleted from the Form.io Project.
Update the Form Embed URL to an active form
Create a new form using the same API Path name
Restore the Form from your Database if the Form was unintentionally deleted
The Form Name or Path has been changed since it was embedded in the application
Update to the latest embed URL endpoint
Revert the Form path/name to its original state
Error occurs when viewing the Login page of the FormView Pro application. The FormView Pro application utilizes the 'Login Form' that is created with a project as the Authentication form into the application. Invalid Alias error will occur if the Login Form is deleted or if the path/name has been altered.
Using a reserved name subdomain
This error message usually indicates the Login URL contains a reserved name that is not permitted. Rename your Subdomain within your Stage Settings to resolve the issue. Click here for a full list of reserved names
License Error Troubleshooting
License utilization is disabled
License utilization is disabled
"License utilization is disabled" means that you have exceeded the allotted servers within your license scope. The License Administrator can manage this by navigating to the License Management page.
There are two ways the License Admin can access their licenses. The first is by clicking the username at the top right of the page and then clicking the License Management button.
The second option is to navigate to the main Portal page and click the License Management button on the left-hand sidebar.
In the License Management section, the admin can view all of the API Servers associated with the license and disable the ones that are not in use while enabling the servers you wish to be active. Click here for more information on managing your License Key(s)
Could not read license. (Listening on port 80)
This error message usually indicates the wrong API Server version tag was pulled into the environment. It is not recommended to pull in the 'Latest' tag as this tag is often an RC version of a server Form.io is currently working on. Verify you are using the most updated, non-rc version of our server.
Server is in restricted method mode
If the server is in restricted mode, the license is not being validated by the server. After 12 hours of trying to validate the license key, the server will enter restricted mode.
This can happen when a firewall has blocked access to the license.form.io endpoint. To resolve this issue, enable your environment access to the license server so the license key can be validated.
This error can also occur when the API Server is disabled within the License Management UI. The License Administrator can manage this by clicking the 'License Management' button underneath their profile username or from the main Portal page (see license utilization error details above). Enable the server from the License Management UI to resolve the error.
400 - a list of all 400 errors
DB is already locked for updating
A lock is put on the DB when a DB Update Hook is utilized or any other database update that is triggered by your codebase. A lock on the database for updates is expected, and the lock is removed upon successful updates.
If an update fails for any reason, the lock has the possibility of remaining and needs to be removed. Servers will attempt to restart until stopped.
Closely monitoring any upgrades to ensure the update is successful is recommended. Checking that the servers start as expected.
To remove, find the schema collection included in the database, which has only a few records in it. One of them will be a lock entry. You can remove that entry, and then restart the containers to resolve the issue.
Make sure not to remove the dbIdentifier entry as this is used for licensing.
Click here for more information on DB update failures
401 - a list of all 401 errors
Project is protected
A project in Protected mode can not be updated or deleted. Uncheck the 'Protected' flag within your Stage Settings to disable it.
Invalid Alias - Login Page
This error message usually indicates the Login URL contains a reserved name that is not permitted. Rename your Subdomain within your Stage Settings to resolve the issue.
Click here for a full list of reserved names
409 Errors
Merge Conflicts
When a Form or Resource is saved, the server checks the created/modified timestamps. If another save has occurred asynchronously before your request, the server will return a 409 'conflict with an existing resource' error.
413 Errors
Request Entity Too Large
The "RequestEntityTooLarge"
error in Form.io occurs when the payload size of a request exceeds the allowed limit. This usually happens when submitting large forms, uploading big files, or sending extensive JSON data.
To resolve this issue, modifications can be made to the Load Balancer to accommodate a larger body size. This is done by modifying the NGINX configuration file and increasing the size limit as shown in line 3. Load Balancer Configurations
Modifications can also be made to the .env file of the Enterprise Server deployment to support a larger body size. Add the following variables to increase/decrease the size.
Enterprise Server Environment Variables
Mongo / Cosmos Errors
MongoServerError: The 'expiredAfterSeconds' is supported on '_ts' field only
This error is seen when CosmosDB is not configured correctly to work seamlessly in MongoDB mode as CosmosDB requires indexes to be set. This is not required when using MondoDB/AtlasDB.
Confirm you are using CosmosDB
Click here for CosmosDB Index documentation
In CosmosDB (set to MongoDB) version 3.6: In order to do a sort on a property, there must be an index set. This is different from how MongoDB works as MongoDB allows sorting on any property regardless of an index being set. To resolve this, a wildcard index can be added to the following collections:
db.submissions.createIndex( {"$**": 1 } ); db.forms.createIndex( {"$**": 1 } ); db.projects.createIndex( {"$**": 1 } ); db.actions.createIndex( {"$**": 1 } );' db.roles.createIndex( {"$**": 1 } );
DocumentDB Errors
MongoServerError: namespace name generated from index name is too long
DocumentDB limits the length of indexes, collection names, and index namespaces. If you're receiving this error, try shortening one of (a) the submission collection name, (b) the component name you're trying to index, or (c) the database name that the Form.io environment has been installed in.
Last updated
Was this helpful?