Having issues deploying the app using now-sdk

Logappradeep
Tera Contributor

Hi Team,

We are facing an issue while deploying a scoped application using the ServiceNow SDK version 4.6.0.

Environment Details:

  • SDK Version: @Servicenow/sdk 4.6.0
  • Deployment Method: ServiceNow SDK CLI
  • SDK Command Used:
    npx --yes @Servicenow/sdk deploy --debug
  • Deployment Source Path:
    /workspace/build-copy
  • Application Package:
    vpn_access_catalog_updates_0_0_1.zip

Issue Summary:
The application package is successfully created and uploaded, but the deployment fails during the installation status verification phase with the following error:

[now-sdk] DEBUG: Debug logging enabled
[now-sdk] Starting installation...
[now-sdk] DEBUG: packing directory dist/app to /workspace/target/vpn_access_catalog_updates_0_0_1.zip
[now-sdk] DEBUG: installing package /workspace/build-copy/target/vpn_access_catalog_updates_0_0_1.zip
[now-sdk] ERROR: Could not determine app installation status. Check instance to verify installation.
Error: Could not determine app installation status. Check instance to verify installation.
    at Orchestrator.install

 

Observed Behavior:

  • ZIP package generation completes successfully.
  • Upload process appears to complete successfully.
  • Failure occurs only during installation status polling/verification.
  • SDK is unable to determine the final installation state.

Troubleshooting Already Performed:

  1. Re-ran deployment with --debug
  2. Verified package generation
  3. Checked credential cache behavior
  4. Confirmed SDK authentication is successful
  5. Attempted redeployment multiple times

Request for Support:
Could you please help investigate:

  1. Whether the application installation is actually succeeding on the instance side
  2. Why the SDK cannot retrieve or determine the installation status
  3. Whether this issue is related to:
    • SDK polling/API issue
    • instance response timeout
    • app repository installation API behavior
    • platform version compatibility
    • known issue in SDK version 4.6.0

Please also confirm:

  • Recommended SDK version for stable deployments
  • Supported Node.js versions for SDK 4.6.0
  • Any known fixes or workarounds for this issue

Kindly let us know if additional logs or instance diagnostics are required from our side.

 

Thanks in Advance!

 

Thanks,
Logappradeep
1 REPLY 1

MahendraH
Giga Contributor

Hi Logappradeep,

This specific behavior is usually caused by an under-the-hood validation check that ServiceNow performs during application deployment, specifically when evaluating application scopes against allowed vendor/company prefixes.

Why this happens on subsequent deployments:

When you deploy a scoped app using the ServiceNow SDK for the first time, the instance is often quite flexible; it accepts the application package and creates the initial metadata stub.

However, from the second deployment onwards, strict signature and company ownership validation kicks in. If your local SDK configuration uses a custom company/vendor prefix that is not explicitly whitelisted in your instance's system properties, the background worker handling the application installation stalls or fails to return a successful state. Because the instance API does not send back a clean completion response, the SDK CLI (@servicenow/sdk) hits its internal polling timeout and throws the generic "ERROR: Could not determine app installation status" block.

How to Fix It:

  1. Update the Instance Whitelist (sn_appauthor.all_company_keys)

    You need to tell the instance to explicitly trust your application's company prefix.

  • Log into your target ServiceNow instance as an administrator.

  • In the Application Navigator, type sys_properties.list and hit Enter.

  • Search for the property named sn_appauthor.all_company_keys

  • This property contains a comma-separated list of valid company codes. Append your custom company prefix to the existing list (for example: existing_key1, existing_key2, your_custom_key).

  • Save the record.

Note: Make sure there are no accidental spaces before or after the comma when appending your key.

Critical Note if you are using a Free PDI:

If you are developing this on a free Personal Developer Instance (PDI), ServiceNow security constraints often protect or lock down this specific property. If the platform blocks you from editing or updating sn_appauthor.all_company_keys on your PDI, your only workaround is to update your local SDK project's now.config.json to use the default vendor/company prefix assigned to your PDI instead of a custom one.

  1. Double-Check your Local SDK Config

    Open your local project files and verify your now.config.json or package environment variables. Ensure that the vendor prefix defined locally perfectly matches the string value you just whitelisted in sn_appauthor.all_company_keys (or matches your PDI prefix if you had to pivot)