Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

CCL1043: SNC CLI cannot find an active connection to an instance

Ryan Magsam1
Mega Guru

When I run the command to scaffold a new project I get this error:


$ snc ui-component project --name now-experience-dashboard --description "My first NXF component built at CreatorCon"
Could not find an active connection to a ServiceNow instance.

I made sure my instance was unpaused and re-ran the profile configuration command. I get the following output.


$ snc configure profile set
✔ Connection to https://nowlearning-lpt0397125-001.lab.service-now.com successful.
✗ This instance does not support dynamic commands. Functionality will be limited.
Profile default has been saved

When I re-run the command to scaffold the project, I get the same error saying that it cant find an active connection.

Environment:

  • macOs Catalina
  • node version 12.22.1
  • snc version 1.1.0
  • ui-component extension version: 19.0.0
1 ACCEPTED SOLUTION

ThierryD1
Mega Expert

Hi Ryan,

I don't know why, but now it's OK for me !

Here are the following steps I tried :

- firstly, I create a named profile related to another instance (release = Paris).

- I tried the "snc ui-component project" command (after adding --profle the_name_of_my_named_profile)

- it was succesful

- then I relaunched the command with my default profile (related to my quebec instance)

- It was successful too !!!

 

I can't explain why... But maybe, you could try.

 

View solution in original post

8 REPLIES 8

ThierryD1
Mega Expert

Hi Ryan,

apparenly, I get the same errors as you ... just a few hours later !

In fact, after solving my "keytar" error (by reinstalling node v12), I also fall in the same error as you.

And, like you, my instance is awake. I tried to delete, then re-create my profile but the error persists.

c:\Applications\CCL1043>snc configure profile set
> Host: https://dev70738.service-now.com
> Login method: Basic
> Username: admin
> Password: ********
> Default output format: JSON
Connection to https://dev70738.service-now.com successful.
This instance does not support dynamic commands. Functionality will be limited.
Profile default has been saved

c:\Applications\CCL1043>snc ui-component project --name now-experience-dashboard --description "My first NXF component built at CreatorCon"
Could not find an active connection to a ServiceNow instance.

project [options]

Creates and scaffolds a new project with all necessary files to start
development.


Options:
--help Show help [boolean]
--version Show version number [boolean]
--name The project name - this should be a valid and unique npm
package name. [string] [required]
--description Project description visible in the npm registry and the
ServiceNow Plugins list. [string] [default: ""]
--scope A scope name to be assigned to this project and its components
(limited to 18 characters). If not set, a unique scope name
will be generated. Scope name is required in offline mode.
[string] [default: ""]
--offline If set, will not connect to the current host during the
scaffolding process, skipping validation. [boolean]

c:\Applications\CCL1043>

  • OS : Windows 10
  • node version 12.22.1
  • snc version 1.1.0
  • ui-component extension version: 19.0.0
 Many thanks in advance for your help

 

ThierryD1
Mega Expert

Hi Ryan,

I don't know why, but now it's OK for me !

Here are the following steps I tried :

- firstly, I create a named profile related to another instance (release = Paris).

- I tried the "snc ui-component project" command (after adding --profle the_name_of_my_named_profile)

- it was succesful

- then I relaunched the command with my default profile (related to my quebec instance)

- It was successful too !!!

 

I can't explain why... But maybe, you could try.

 

Thank you!

A similar solution worked for me. The only thing different for me is I had to create a new named profile for my lab instance, using the "default" profile would never work.  ¯\_(ツ)_/¯

Robert Ninness
ServiceNow Employee

Hi All,

If you are having login issues because the instance name changes or you want to switch the proxy/deployment instance after setting up, you may need to log into the instance using the ui-component command extension

snc ui-component login {instance_url} basic {user_name} {password}

Run this command after setting a new profile using snc configure profile set

Don't ask my why sometimes you need to do this, I have no idea haha.

I had this issue when testing the lab on the knowledge labs instance (after using an internal instance for testing)

I should update the lab guide.