Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

SNC CLI Error when deploying ui component (401 Unauthorized)

GGriessler
Tera Guru

Hi,

 

I recently set up my development environment for the development of a UI Component.

I set up the profile and cloned an example project.

When testing locally everything works fine, but I now want to set it up in an instance for further testing, but I'm receiving a 401 Unauthorized response and I don't know why.

 

Here are the logs:

PS C:\Users\GerhardGrießler\Advvise Products\myWBS\myWBS> snc ui-component deploy -d   
Args: [deploy --username=*** --password=*** --loginHost=https://***.service-now.com]
10% building 0/1 entries 0/0 dependencies 0/0 modules 0 active(node:51844) [DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK] DeprecationWarning: Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader
(Use `node --trace-deprecation ...` to show where the warning was created)
94% sealing after sealThere are no TOML files to parse.
(node:51844) [DEP0128] DeprecationWarning: Invalid 'main' field in 'C:\Users\***\node_modules\@servicenow\now-button\package.json' of 'dist/@servicenow/now-button.js'. Please either fix that or report it to the module author
95% emitting emit EmitAssets(node:51844) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: Compilation.assets will be frozen in future, all modifications are deprecated.
BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation.
        Do changes to assets earlier, e. g. in Compilation.hooks.processAssets.
        Make sure to select an appropriate stage from Compilation.PROCESS_ASSETS_STAGE_*.
Deploying component to https://***.service-now.com...
Failed to deploy (Table Operation Failure: Table Operation READ Failure: Response code 401 (Unauthorized) : Required to provide Auth information : Unable to deploy a component into instance)
Error: Table Operation Failure: Table Operation READ Failure: Response code 401 (Unauthorized) : Required to provide Auth information : Unable to deploy a component into instance
    at c (C:\Users\***\.snc\.extensions\ui-component\node_modules\@servicenow\cli\dist\servicenow-cli.min.js:3:654003)
    at C:\Users\***\.snc\.extensions\ui-component\node_modules\@servicenow\cli\dist\servicenow-cli.min.js:3:611840
    at Generator.<anonymous> (C:\Users\***\.snc\.extensions\ui-component\node_modules\@servicenow\cli\dist\servicenow-cli.min.js:3:606726)
    at Generator.throw (C:\Users\***\.snc\.extensions\ui-component\node_modules\@servicenow\cli\dist\servicenow-cli.min.js:3:607638)
    at l (C:\Users\***\.snc\.extensions\ui-component\node_modules\@servicenow\cli\dist\servicenow-cli.min.js:3:608482)
    at a (C:\Users\***\.snc\.extensions\ui-component\node_modules\@servicenow\cli\dist\servicenow-cli.min.js:3:608720)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

 

I would be really grateful for any tips about where I could look...

Thanks!

1 ACCEPTED SOLUTION

GGriessler
Tera Guru

Found a solution:

 

seems like the character '^' in my password caused the issue.

After I changed my password and this character was no longer included it worked.

(Just a guess though, might have been something else and just a coincidence that this worked=

View solution in original post

1 REPLY 1

GGriessler
Tera Guru

Found a solution:

 

seems like the character '^' in my password caused the issue.

After I changed my password and this character was no longer included it worked.

(Just a guess though, might have been something else and just a coincidence that this worked=