异步自定义功能在Office 365 PC中不起作用

问题描述

我使用Office附加文档中的此示例代码来运行异步功能

async function getStarCount(userName,repoName) {
  try {
    //You can change this URL to any web request you want to work with.
    const url = "https://api.github.com/repos/" + userName + "/" + repoName;
    const response = await fetch(url);
    //Expect that status code is in 200-299 range
    if (!response.ok) {
      throw new Error(response.statusText)
    }
      const jsonResponse = await response.json();
      return jsonResponse.watchers_count;
  }
  catch (error) {
    return error;
  }
}

它可以在Chrome和Edge上的Office 365在线版中使用,但是在Office 365桌面版中,它返回“ #BUSY!”。错误。

这也是OfficeAddins.log.txt运行时日志文件中的日志

8/19/2020 15:05:08详细的运行时[控制台] [日志]详细的CustomFunctions [执行] [开始] Function = STARCOUNT 8/19/2020 15:05:08详细运行时[控制台] [日志]主机可能未设置任何承诺继续回调。可能不会执行承诺。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...