Ui-component deploy not working

Dilpreet Kaur
Kilo Explorer

I am creating a custom UI component for UI Builder. I have successfully setup the project.

But while trying to deploy the component using "snc ui-component deploy" I am getting error that "Could not find an active connection to a ServiceNow instance."

Service now account is open and running in my default browser. I even tried to create a named profile and deploy as below

snc ui-component deploy --profile profile-name

But it still gives me same error i.e. "Could not find an active connection to a ServiceNow instance."

What possible issue this could be?

4 REPLIES 4

Community Alums
Not applicable

Check it using "snc configure profile list"
If you get an empty object, then try connecting to your instance again via, 
snc configure profile set

No, Profile list is not empty. It has both default as well as named profile in list

Brad Tilton
ServiceNow Employee
ServiceNow Employee

You may need to reconnect to the instance. Try running the following:

snc ui-component login https://yourinstance.service-now.com/ --username=yourusername --password=yourpassword

This is also a good resource when running into CLI issues: CLI FAQ

Wybren1
Tera Guru

If anybody ever comes across this, it could be your password contains a wierd character I'm guessing like a $ or # and this will cause the Could not find active connection I noticed.

So I changed my password without a $ and #, it worked.