4
votes

Hi I am working in Bot framework in that I am facing the issue when I am testing the bot in local bot emulator after publishing the bot in to azure, and in the bot emulator I am providing the published url and Microsoft appid and Microsoft secret in bot emulator. When I am connect to azure, it’s show the issue like below.

Command failed: 4294967295 System.AggregateException: One or more errors occurred. ---> System.Exception: Couldn't acquire lock, is another instance running at Squirrel.SingleGlobalInstance..ctor(String key, TimeSpan timeOut) at Squirrel.UpdateManager.<acquireUpdateLock>b__32_0() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.UpdateManager.<CheckForUpdate>d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Update.Program.<CheckForUpdate>d__8.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task`1.get_Result() at Squirrel.Update.Program.executeCommandLine(String[] args) at Squirrel.Update.Program.main(String[] args) at Squirrel.Update.Program.Main(String[] args) ---> (Inner Exception #0) System.Exception: Couldn't acquire lock, is another instance running at Squirrel.SingleGlobalInstance..ctor(String key, TimeSpan timeOut) at Squirrel.UpdateManager.<acquireUpdateLock>b__32_0() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.UpdateManager.<CheckForUpdate>d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Update.Program.<CheckForUpdate>d__8.MoveNext()<--- {} 

POST 401 [conversationUpdate]

POST 401 [conversationUpdate]

Error: The bot's MSA appId or password is incorrect.

Edit your bot's MSA info

POST 401 [conversationUpdate]

Error: The bot's MSA appId or password is incorrect.

Edit your bot's MSA info

enter image description here

I removed the App Id and password and tried to run it locally then it’s working properly.

I researched around the internet and could not find any solutions that solves my problem. Please help.

Thanks in Advance

2
Because you are trying to access a Bot Service which is deployed on Azure on the emulator locally. Try removing the MsAPPID and Password. It will work. The emulator is meant to test the bots locally without deploying.Kunal Mukherjee
Give the endpoint as http://localhost:3979/api/Messages while testing locally and not the Azure endpoint.Kunal Mukherjee
How can I test my bot using published url in bot framework emulatorsateesh
You can only test bots locally in the emulator, make changes and publish it again. When you make changes and publish it again, the changes will reflect in Azure.Kunal Mukherjee
You are just getting a HTTP 401 which is Unauthorized request. For debugging published bots, try using ngrok.Kunal Mukherjee

2 Answers

0
votes

you can try using http://localhost:3979/api/Messages in your bot emulator but do not enter any kind of id and password and also remove it from your web.config

like this shown in below picture:

enter image description here enter image description here

And hit ctrl+f5 and then try. It will start working on your local environment.

For remote debugging you need to use the ngork.

do let me know in case you need more clarification.

0
votes

Apparently, the emulator allows to test local bots only and won't work with published/hosted bots. For published, i am testing on Azure on directly through the "Test in Web Chat" feature