Problem description
Refer to the official documents and create a JavaScript function through CS code, which appears when traveling locally:
Value cannot be null. (Parameter ‘provider’)
problem analysis
Step 1: open the detailed log of function, enter the directory of function in vs code, and then start local debugging in terminal
Input: func start --verbose
Step 2: analyze logs
In the detailed log, it is found that the error occurred in the step of downloading extension bundle:
[2022-01-06T07:47:24.404Z] Loading functions metadata
[2022-01-06T07:47:24.509Z] Reading functions metadata
[2022-01-06T07:47:24.518Z] 0 functions found
[2022-01-06T07:47:24.535Z] 0 functions loaded
[2022-01-06T07:47:24.540Z] Looking for extension bundle Microsoft.Azure.Functions.ExtensionBundle at C:\Users\Administrator\.azure-functions-core-tools\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle
[2022-01-06T07:47:24.544Z] Fetching information on versions of extension bundle Microsoft.Azure.Functions.ExtensionBundle available on https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/index.json
[2022-01-06T07:47:25.432Z] Looking for extension bundle Microsoft.Azure.Functions.ExtensionBundle at C:\Users\Administrator\.azure-functions-core-tools\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle
[2022-01-06T07:47:25.435Z] Fetching information on versions of extension bundle Microsoft.Azure.Functions.ExtensionBundle available on https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/index.json
[2022-01-06T07:47:27.250Z] Downloading extension bundle from https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/3.3.0/Microsoft.Azure.Functions.ExtensionBundle.3.3.0_any-any.zip to C:\Users\Administrator\AppData\Local\Temp\fc4f430a-f517-4cd9-9192-c6ce9368f679\Microsoft.Azure.Functions.ExtensionBundle.3.3.0.zip
Value cannot be null. (Parameter 'provider')
[2021-12-22T01:34:45.182Z] Stopping host...
[2021-12-22T01:34:45.187Z] Host shutdown completed.
Solution:
After problem analysis, the root cause of the problem is the failure to download the extension bundle. Therefore, you may need to manually try to download the extension bundle file several times.
After downloading, unzip the file into the azure Function Core Tools Directory, and then run function to solve the problem of value cannot be null (parameter ‘provider’) problem
Extension bundle file directory
C:\Users\Administrator\.azure-functions-core-tools\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle\3.3.0
**Outcome:**
Similar Posts:
- [Solved] Service Fabric VMExtensionProvisioningError Error: Multiple VM extensions failed to be provisioned on the VM
- Solve the problem of error reporting in. Net native compilation containing sqlcihper package
- Installation tutorial of visual studio 2017 and visual Assist X
- Windows Azure Developer Guidance Map
- Microsoft. Ace. OLEDB. 12.0 error reporting solution
- Git SSH public key authentication failed with git on Azure DevOps
- [Solved] Azure Function Enable Managed Identity and Powershell Funciton Report Error: ERROR: ManagedIdentityCredential authentication failed
- [azure environment] notification hub failed to create policy: 500 internal server error occurred
- Win7 & win10 install ad management tool
- [Solved] VS error C4996: ‘scanf’: This function or variable may be unsafe.