2
votes

I'm using the apiHubFileTrigger with the OneDrive for business connector(onedriveforbusiness_ONEDRIVEFORBUSINESS).

{
  "bindings": [
    {
      "type": "apiHubFileTrigger",
      "name": "myFile",
      "direction": "in",
      "path": "/InputFile/{file}",
      "connection": "onedriveforbusiness_ONEDRIVEFORBUSINESS"
    }
  ],
  "disabled": false
}

It's working well when I am monitoring the script inside the azure portal. But soon as I close the editor and wait for some time, the function is not be triggered on new files copied to onedrive for business. There is no error or anything in invocation logs. (No invocation at all)

The function is written in C#. The function will use the input file and perform some operations based on file. Since its working when I am inside the portal and monitoring it, the issue is not related to code.

I'm running the consumption plan so the problem has nothing to do with "always on"

1
Hey Ashwin, I'm from the Azure Functions team. Can you share your function app name so that we can investigate internal logs? If you don't feel comfortable sharing it publicly, you can also follow these steps: github.com/Azure/azure-functions-host/wiki/…Marie Hoeger
@MarieHoeger, the function app details - Id : 56b3e2df-89b8-484a-aeab-ef9ceccd5701, 2018-04-17T18:05:19.469 , Region : South IndiaAshwin Kumar
@MarieHoeger I have seen this same behavior also on active directory queue trigger. I need to start the function all over again after some minutes passedHosar
@AshwinKumar thanks for the details! It looks like your function had trigger errors at one point (on 4/10) and gotten out of sync with our infrastructure. Could you hit the refresh button next to the function app? This should sync your function app up again.Marie Hoeger
@Hosar - could you elaborate on "I need to start the function all over again after some minutes have passed"? Are you also running into an issue with triggers not firing while the portal is not open, or are you running into timeout errors? A function app name/app details would also be helpful :)Marie Hoeger

1 Answers

1
votes

To summarize the discussion in the comments, there is an outstanding bug with Consumption Plan functions where triggers sometimes get out of sync and don't fire unless the portal is open if they are published in certain ways (details here: https://github.com/Azure/Azure-Functions/issues/210)

In those cases, hitting the "refresh" button next to the function app in the portal will sync the trigger.

In this case, there was an issue with storage account connection string parsing. The workaround is to switch to an App Service Plan function (making sure that "Always On" is "On").