Bot Framework V4 - TypeError: Cannot perform 'get' on a proxy that has been revoked

前端 未结 3 771
轮回少年
轮回少年 2021-01-19 02:08

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

相关标签:
3条回答
  • 2021-01-19 02:14

    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.

    0 讨论(0)
  • 2021-01-19 02:16

    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));
    
    0 讨论(0)
  • 2021-01-19 02:17

    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

    0 讨论(0)
提交回复
热议问题