Error when running @servicenow/sdk install: "Unable to install application as application was null"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi everyone,
I am encountering an issue while trying to install a new project using the ServiceNow SDK (Fluent API). The build process completes successfully, but the installation fails with a "null" error.
Environment:
SDK Version: 4.6.0 (@servicenow/sdk)
Project Status: Freshly initialized following the official documentation
Steps taken:
I followed the official guide to create an "Example App": Create an application with the ServiceNow SDK
Ran npx @Servicenow/sdk build -> Result: Build completed successfully
Ran npx @Servicenow/sdk install --auth <alias> -> Result: ERROR: Exception occurred while installing application / Unable to install application as application was null
Key Observation: Although the error says "application was null," I have verified that the dist directory is not empty. As shown in the attached screenshot, the build process correctly generated the metadata files, including sys_app and various sys_update items (Client Scripts, etc.) under the dist/app folder.
I have already verified that my authentication credentials are correct and the alias is properly stored.
Has anyone encountered this "application was null" error before? Any insights on why the installer might fail to recognize the generated application metadata?
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
1. ServiceNow IDE plugin version on your instance
This is the most probable culprit. SDK 4.5.0+ requires version 4.1.1 or later of the ServiceNow IDE installed on your instance. Since you're on SDK 4.6.0, the install command sends the packaged app to the instance, and the server-side IDE handler processes it. If the IDE plugin is missing or outdated, the server can't deserialize the application package — hence "application was null."
Go to your instance's Application Manager and verify the ServiceNow IDE version. If it's not installed, you need to entitle the ServiceNow IDE from the ServiceNow Store website first, then sync the Application Manager.
2. Consider using deploy instead of install
Starting with SDK 4.0, the recommended command shifted to deploy. The install command performs a pack + push, but deploy is the primary supported path. Try:
npx @servicenow/sdk deploy --auth <alias>
3. Check your now.config.json for extra or malformed properties
One community member found that extra properties in now.config.json caused installation failures. The file should contain only the core fields: scope, scopeId, name, and tsconfigPath. They specifically had to remove accessControls and licensing blocks that had been added. Verify yours doesn't have extraneous keys that the installer doesn't expect.
4. Instance release compatibility
Make sure your target instance is on a release that supports SDK 4.6.0. The Fluent/SDK features require at minimum a Yokohama-family instance, and the newer SDK versions align with Australia and later releases. A mismatch between SDK version and instance family can cause the server-side handler to return null when trying to parse the application metadata.
Quick diagnostic checklist:
Check your IDE version on-instance: navigate to sys_store_app.do?sysparm_query=nameLIKEServiceNow IDE and confirm the version is 4.1.1+. If you don't see it at all, that's your answer. Then try deploy instead of install, and inspect the now.config.json for anything beyond the standard fields. If you're posting this on the Community, I'd also recommend including the full stack trace from the instance's system logs (syslog) — the "application was null" message is the surface error, but the syslog entry will often reveal whether it was an IDE handler issue, a deserialization failure, or a scoping problem.
