Exception: invalid need: expected Wait, have Done
See original GitHub issueI receive exception in emulator, when doing EchoBot with Bot Builder exactly as shown in documentation. (EchoDialog is copy pasted)
Message and stack-trace are not very informative. I can’t understand what exactly is wrong in my code.
The same project works well if I do it without Bot Builder.
{
"message": "An error has occurred.",
"exceptionMessage": "invalid need: expected Wait, have Done",
"exceptionType": "Microsoft.Bot.Builder.Internals.Fibers.InvalidNeedException",
"stackTrace": " в Microsoft.Bot.Builder.Internals.Fibers.Wait`1.ValidateNeed(Need need)\r\n в Microsoft.Bot.Builder.Internals.Fibers.Wait`1.Microsoft.Bot.Builder.Internals.Fibers.IWait.Post[D](D item)\r\n в Microsoft.Bot.Builder.Internals.Fibers.Extensions.Post[T](IFiber fiber, T item)\r\n в Microsoft.Bot.Builder.Dialogs.Internals.DialogContext.<Microsoft-Bot-Builder-Dialogs-Internals-IUserToBot-SendAsync>d__20.MoveNext()\r\n--- Конец трассировка стека из предыдущего расположения, где возникло исключение ---\r\n в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n в Microsoft.Bot.Builder.Dialogs.Conversation.<SendAsync>d__2.MoveNext()\r\n--- Конец трассировка стека из предыдущего расположения, где возникло исключение ---\r\n в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n в System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n в Bot.Controllers.MessagesController.<Post>d__0.MoveNext() в C:\\work\\TsyaBot\\Bot\\Controllers\\MessagesController.cs:строка 22\r\n--- Конец трассировка стека из предыдущего расположения, где возникло исключение ---\r\n в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n в System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()\r\n--- Конец трассировка стека из предыдущего расположения, где возникло исключение ---\r\n в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n в System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- Конец трассировка стека из предыдущего расположения, где возникло исключение ---\r\n в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n в System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- Конец трассировка стека из предыдущего расположения, где возникло исключение ---\r\n в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n в System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()\r\n--- Конец трассировка стека из предыдущего расположения, где возникло исключение ---\r\n в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n в System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
I get exception when using Thread.sleep(x) or wait()
The same error message appears: unreported exception java.lang.InterruptedException; must be caught or declared to be thrown. Is there any step required before ...
Read more >Top 10 Selenium Exceptions and How To Handle These ...
Add a wait command and try to avoid an exception; Use 'Try/Catch' to handle in case if a truly exceptional case has occurred....
Read more >Understanding ExpectedConditions in Selenium - BrowserStack
Understand how to use 7 different types of ExpectedConditions in Selenium with code examples to check if all elements present are visible.
Read more >How can I troubleshoot AWS Config console error messages?
Follow these troubleshooting steps for the specific AWS Config console error message. ... This error can occur if the AWS Identity and Access ......
Read more >Common Error Messages for CDS Requests
the request you have submitted is not valid. Client has not agreed to the required terms and conditions. Invalid 'method': cds.catalogue.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Try starting a new conversation by changing the conversation ID. You would see this exception if your code finished without calling something like context.Wait(MessageReceived). We’ll work to improve the error message.
@nornes : can you let me know how you have resolved the above issue??
I am also using AuthBot package for authentication, and my bot flow is similar to yours.
When access token is not present after authentication I get the same error as you i.e. Exception: invalid need: expected Wait, have Call.
Thanks in advance!