cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
780
Views
0
Helpful
5
Replies

Error while creating a chatbot

o1
Cisco Employee
Cisco Employee

Hi Team,

I am following this link to create a simple chatbot : https://developer.webex.com/blog/from-zero-to-webex-teams-chatbot-in-15-minutes

While executing, seeing this error:

omkarparanjape@OPARANJA-M-2P6X webex-bot-starter % npm start

 

> Webex-Bot-Starter@1.0.0 start

> npm install && node --use_strict index.js

 

 

up to date, audited 1294 packages in 2s

 

63 packages are looking for funding

  run `npm fund` for details

 

60 vulnerabilities (47 moderate, 12 high, 1 critical)

 

To address issues that do not require attention, run:

  npm audit fix

 

To address all issues (including breaking changes), run:

  npm audit fix --force

 

Run `npm audit` for details.

Starting framework, please wait...

/Users/omkarparanjape/Desktop/webex-bot-starter/webex-bot-starter/node_modules/@webex/webex-core/dist/lib/credentials/credentials.js:381

        return _promise.default.reject(new Error('Current state cannot produce an access token'));

                                       ^

 

Error: Current state cannot produce an access token

    at /Users/omkarparanjape/Desktop/webex-bot-starter/webex-bot-starter/node_modules/@webex/webex-core/dist/lib/credentials/credentials.js:381:40

    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

 

Node.js v20.5.1

 

Can you please help me with this?

5 Replies 5

Augustus Li
Cisco Employee
Cisco Employee

I saw the same problem. Please don't follow the JSON format of .env in the tutorial. Instead, copy .env.local and use that format to replace the information. That's only in my case, not sure if it helps.

Janos Benyovszki
Cisco Employee
Cisco Employee

@o1 I just tested the tutorial from the blog and it worked fine for me. Here is what I did:

- start ngrok with "ngrok http 7001 --region=eu"

- duplicate the .env.local file and rename it to .env

- change the variables in the .env file

- npm start

Communication with the bot worked afterwards. I am assuming you missed something from the step by step guide, probably you did not create a new .env file.

Hello Janos & Omkar,

We tried following the steps mentioned however we have the same error what Omkar is encountering.  

We tried on both Windows & Linux machines and doesnt work on either. 

Hello Omkar,  Did you manage to fix the issue in your environment ? 

Thank You.

Hi Lalit,

I didn't try this approach later. I will update you in case Janos' suggestion help me to resolve the issue I was facing.

sandiban
Cisco Employee
Cisco Employee

Sure @o1, bases on your Test - you can let us know your findings and we can assist you further based on your outcome.
And @LalitKameshwar, in that case - could you kindly share the details to devsupport@webex.com please so we can track this requirement better and investigate what exactly the error you're getting.
You can send us mail on the provided id and it'd raise a Support case in our queue. Please share the exact error details there and we can initiate investigating the error from there.

Regards!
Sandip