在本地运行timerTrigger函数返回"错误调用函数host:Unauthorized"

Tia*_*lva 9 azure azure-functions

我有一个在Azure中工作正常的timerTrigger函数,但在本地运行它时会返回"错误调用函数host:Unauthorized".怎么了 ?如何在本地运行时间触发器?

function.json

{
  "bindings": [
    {
      "name": "myTimer",
      "type": "timerTrigger",
      "direction": "in",
      "schedule": "0 30 8 * * 1"
    }
  ],
  "disabled": false
}
Run Code Online (Sandbox Code Playgroud)

在Visual Studio代码(或命令行)中执行它

Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS C:\Projects\reporting-function> func run .\MyFunction\
Error calling the functions host: Unauthorized
PS C:\Projects\reporting-function>
Run Code Online (Sandbox Code Playgroud)

Dav*_*bbo 6

我们调查过,这是函数CLI中的一个错误.这个问题已被理解,并且有一个拉取请求.

修复将在下一个版本中.