Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running a timerTrigger function locally returns "Error calling the functions host: Unauthorized"

I have a timerTrigger function that works fine in Azure but when running it locally it returns "Error calling the functions host: Unauthorized". What is wrong ? How can I run a time trigger locally ?

function.json

{
  "bindings": [
    {
      "name": "myTimer",
      "type": "timerTrigger",
      "direction": "in",
      "schedule": "0 30 8 * * 1"
    }
  ],
  "disabled": false
}

Executing it within Visual Studio Code (or command line)

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>
like image 874
Tiago Andrade e Silva Avatar asked Apr 28 '17 17:04

Tiago Andrade e Silva


1 Answers

We investigated, and it is a bug in the Functions CLI. The issue is understood, and there is a pull request for it.

The fix will be in the next build.

like image 132
David Ebbo Avatar answered Nov 04 '22 14:11

David Ebbo