Azure Function App works locally but not in the Azure Portal

Stijn Vos 0 Reputation points
2024-11-10T20:43:57.7033333+00:00

Hi there,

I have an issue with my Azure function or to be more specific, with deploying and having it function in the Azure Portal.

The Function is a BlobTrigger and works fine locally, I used the following guide / link: Develop Azure Functions locally using Core Tools.

When running the following command: func azure functionapp publishIt deploys to my function app in the portal fine, I have also published it with --local-settings.

However, when I am 'running' the function in the portal, it does not run anything. There is no Invocations (not an error) and no Application Insights.

I am wondering whether I included all the correct environment variables in the Portal, but I figured when publishing it with --local-settings this should take care of it? Therefore I have the following questions:

  1. Which environment variables should I declare in the portal, currently the only environment variables in the portal are: APPLICATIONINSIGHTS_CONNECTION_STRING, AzureWebJobsStorage and FUNCTIONS_WORKER_RUNTIME. Are these the correct variables? Should there be more?
  2. In the local script, I also declare (and call) a variable for AzureWebJobsStorage, could this interfere with the environment variable in the function in the portal? Because it shouldn't; the variables have the same string/value.

Let me know if anything is unclear.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,143 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Shanmugam s 10 Reputation points
    2024-11-11T12:32:56.8533333+00:00

    Please follow the below steps

    1. Go to your function from the overview page and click it then go to invocation tab and check what error it shows. If you have logger in code, it would show which method failed in exception.
    2. If invocation tad did not give you enough information, Go to application Insights for your function app then go to failures section you can find left side blade. If you are not sure about datetime you ran, run it again and check for the latest failure.
    3. Let us discuss based on that error because trigger failed because of various reason. Let's find the error message and we can go from there. Cheers!

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.