Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

now-sdk install fails "with invalid scope" on already-installed Record() data

robertzagey
ServiceNow Employee

Scoped app, now.config.json has "type": "configuration", SDK @Servicenow/sdk 4.13.6, Personal Developer Instance.

I seeded 158 Record() data rows into a custom scoped table. The first now-sdk install worked — all 158 landed correctly. Every install since then fails at upload:

Failed to upload XML files: Found
x_2223964_iris_source_018a3dbe1da242aa819c06bc0a04e9e3.xml
with invalid scope.

What I've checked:

  • The named record is healthy on the instance.
  • Its generated XML in dist/app/ has the correct <sys_scope> (the app's own sys_id).
  • keys.ts maps its key to the right sys_id and table.
  • That sys_id just sorts first of the 158 — neighbouring records are structurally identical, so I think all 158 are being rejected and only the first is named.
  • Adding $meta: { installMethod: 'first install' } changes nothing.
  • Deleting dist/ entirely and removing the Record() source files from src/ does not stop the 158 XML files being regenerated. They appear to come from the working-set cache (the first install reported "Added 335 records to working set"), not from source.

Questions:

  1. How do I clear or reset the SDK working set?
  2. Is there a supported way to stop already-installed Record() data from being re-uploaded on every install?
  3. Is "invalid scope" on a data record a known issue when the record exists on the instance (i.e. the upload is an update rather than an insert)?
0 REPLIES 0