2

I've created an Azure function and tested it locally in Visual Studio without issue. I just published the function to Azure and now when I run it I get this error:

2019-11-26T20:41:11.822 [Error] Executed 'PullAffiliationsFunction' (Failed, Id=13a5b787-db22-4b04-96ba-f5718c36aa75)
Value cannot be null.
Parameter name: value

I don't have any parameters named value in my function. I see no stack trace to give me more information about what is causing this error. Did I miss a configuration setting somewhere? I published directly from Visual Studio so I would expect it would publish everything. How would you debug this?

0

1 Answer 1

4

If you get this exception as part of the Executed message, it's most likely thrown by your function code. Do you have the full log entry for that? It may include a stack trace as well.

The local settings and environment variables (from local.settings.json) actually do not automatically get pushed to Azure on publish.

I have seen this exception commonly when one may have forgotten to set an environment variable as an App Setting or a connection string. Did you set all the environment variables you used locally in your Azure function app through Application Settings or configuration in your app?

Sign up to request clarification or add additional context in comments.

1 Comment

I have two functions that I loaded and only loaded environment variables for one of the functions. When I loaded all the environment variables this error went away. I still think the error message could actually name the variable that is missing instead of "Value cannot be null. Parameter name: value"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.