I am trying to make a rest query against a database that stores knowledge articles for users and returns an array of results based on what the user has searched for. Wheneve
This issue happened because I was using a request module that did not support promises. Changing my request module for one that did support promises (which I found out about by using this article) resolved the issue.
I'm going to put this here only because it's the first result that pops up when searching, although it doesn't directly relate to this issue.
There's a very easy way to use setTimeout()
and avoid this error:
await new Promise(resolve => setTimeout(() => resolve(
turnContext.sendActivity('I was sent 5 seconds later')
), 5000));
The answer for me was to double check I didn't miss any await
usage that might be necessary. Turns out I called this.dialog.run(context, this.dialogState);
without the await
and that threw the same error. I found the answer on this Github issue