Execution Errors

The following table describes the errors that may occur when executing your single page application (SPA).

Error Message

Description

Error Code

The requested SPA does not exist.

The SPA that you are trying to execute does not exist in the NetSuite account. The SPA may have been deleted, or the URL entered for the SPA is incorrect.

The client script file cannot be loaded: the file is not active.

The client script file, the server script file, or the SPA folder is marked as inactive.

The client script file cannot be loaded: you do not have permission to access this file.

You do not have permission to access this file, or you do not have access to the SuiteApps folder (for example, the folder access is restricted).

An error occurred while executing the server script. You do not have privileges to view this page.

You accessed the SPA using a user or a role that does not have permission to view the SPA.

The client script file cannot be loaded: the script dependencies cannot be loaded.

The script tried to load a module that does not exist. For example:

                    define(['N/module'], function(module) {
    return { 
        run: function (context) { 
        } 
    }; 
}); 

                  

SCRIPT_FILE_DEPENDENCY_ERROR

The entry point function cannot be called: the script does not have the specified function.

The script does not have the run() function. For example:

                    define([], function() {
    return {
        test: function (context) {
      
        }
    };
}); 

                  

SCRIPT_DOES_NOT_HAVE_RUN_MEMBER

The entry point function cannot be called: the function exists but cannot be called.

The run() function exists but is not well defined. For example, it is not defined as a function but as a variable:

                    define([], function() {
    return {
        run: 1
    };
}); 

                  

SCRIPT_MEMBER_NOT_CALLABLE

The entry point function cannot be called: no define function found.

The script does not expose any module. The script must include one define function. You will also see this error if the return statement is missing or if other structure errors are present. For example:

                    console.log('TEST'); 

                  

SCRIPT_DOES_NOT_EXPOSE_ANY_MODULE

The entry point function throws an exception.

The script throws an error. For example:

                    define([], function() {
    return {
        run: function (context) {
            throw 'spaclient.js Error';
        }
    };
}); 

                  

SCRIPT_ENTRY_POINT_THROWS_ERROR

An error occurred while rendering the SPA.

An unexpected error occurred during the execution of the SPA.

This error also appears if the SPA folder is marked private and the user running the SPA is not the owner.

Invalid call to addStyleSheet. No style sheet path or URL were provided.

The parameter object of the addStyleSheet method is missing both the relativePath and url members, or both members are set to null. At lease one of these parameters must be specified and not null.

An error occurred while executing the server script. {string thrown}

An error is thrown by the server script. For example: An error occurred while executing the server script. Unauthorized user.

404 error

The assets folder is included in the URL for the SPA, but it does not exist.

For example, this error occurs if you try to access the following URL and the assets folder is null: https://<AccountID>.app.netsuite.com/spa/<spaUrl>/assets/image.png.

Related Topics

Troubleshooting Single Page Applications
Validation and Deployment Errors

General Notices