System.Private.CoreLib: Result: Failure Value cannot be null. (Parameter 'value')

See original GitHub issue

System.Private.CoreLib: Result: Failure Exception: Value cannot be null. (Parameter 'value')

above error is thrown in local-dev runtime environment when calling the HttpTrigger with POST and JSON-format payload on a PowerShell AzFunctionApp-v3 NB: error is thrown before any code is executed for validation i left in my run.ps1 just the following lines (commenting all the rest) and error was still thrown:

using namespace System.Net
param($Request, $TriggerMetadata)

azure-functions-core-tools installation: npm i -g azure-functions-core-tools@3 --unsafe-perm true which translated to version 3.0.2534

fix = downgrade to 3.0.2245: npm i -g azure-functions-core-tools@3.0.2245 --unsafe-perm true

configuration files + other environment tools & versions

function.json

{
  "bindings": [
    {
      "authLevel": "anonymous",
      "type": "httpTrigger",
      "direction": "in",
      "name": "Request",
      "methods": [
        "get",
        "post"
      ]
    },
    {
      "type": "http",
      "direction": "out",
      "name": "Response"
    }
  ]
}

.vscode/settings.json

{
    "azureFunctions.deploySubpath": ".",
    "azureFunctions.projectLanguage": "PowerShell",
    "azureFunctions.projectRuntime": "~3",
    "azureFunctions.showExplorer": true,
    "azureFunctions.stopFuncTaskPostDebug": false,
    "azureFunctions.validateFuncCoreTools": true,
    "debug.internalConsoleOptions": "openOnSessionStart",
    "debug.allowBreakpointsEverywhere": true,
    "debug.extensionHost.useV3": true,
    "powershell.powerShellDefaultVersion": "~7",
    "terminal.integrated.shell.windows": "C:\\Program Files\\PowerShell\\7\\pwsh.exe"
}

host.json

{
  "version": "2.0",
  "extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle",
    "version": "[1.*, 2.0.0)"
  },
  "managedDependency": {
    "enabled": true
  },
  "extensions": {
      "http": {
          "routePrefix": ""
      }
  }
}

VSCode 1.46.0 MS PowerShell VSCode Extension v2020.6.0 =====> PowerShell Integrated Console v2020.6.0 <=====

PSVersion                      7.0.2
PSEdition                      Core

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
AnatoliBcommented, Jun 18, 2020

@carct Do you have any code in the profile.ps1 file in the root of your app? Does the issue repro if you remove or comment out all the code there?

0reactions
AnatoliBcommented, Jun 22, 2020

@carct I was unable to repro this on a simple app. If possible, could you please share:

  • the entire app content;
  • the POST request;
  • the entire func start log.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Functions, "System.Private.CoreLib: Value cannot be ...
I was missing the configurations values in 'local.setting.json' which i was using in the constructor of my DI services.
Read more >
Error connecting Azure Function with CosmosDB
CoreLib : Exception while executing function: Functions.HttpTrigger1. Microsoft.Azure.DocumentDB.Core: Value cannot be null. (Parameter ' ...
Read more >
So You Want to Run Azure Functions Using .NET 5
Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Value cannot be null. (Parameter 'provider') Press any to continue.
Read more >
Runtime error - Rider 2021.30.1 azure functions V4 .net 6
[2022-01-10T13:08:23.117Z] System.Private.CoreLib: Value cannot be null. (Parameter 'type'). Value cannot be null. (Parameter 'provider').
Read more >
Azure Functions, "System.Private.CoreLib: Value cannot be ...
Coding example for the question Azure Functions, "System.Private.CoreLib: Value cannot be null. (Parameter 'path1'). Value cannot be null.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found