azure-functions-core-tools: func new not working for JavaScript app

did func init on a container and set JavaScript. When I say func new I get this error. I tried passing in flags for language, template, etc. and nothings eems to work

Mac

➜ jehollan-perf-javascript func new Value cannot be null. (Parameter ‘value’)

➜ jehollan-perf-java func --version 3.0.1975

/cc @ahmedelnably

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Comments: 21 (12 by maintainers)

Most upvoted comments

@daxay, Core tools is only supposed to download a bundle if a newer version of extension bundle is available. Otherwise it is supposed to use the bundle that is already downloaded to the temp folder. Checking for a newer version of bundle should only need to download a few bytes.

I suspect the combination of the following 2 issues are causing this.

  1. When the core tools tries to download the extension bundle for the first time, the download is only partially successful. Putting the core tools in bad state where it thinks the bundle is downloaded but it isn’t.
  2. The core tools could be downloading the bundle every time, even though one is present in the temp folder. So even a single instance of slow connection could put you in a bad state.

I am going to try and optimize bundle download process to do the following:

  1. Perform sha verification to the downloaded bits so we can have a reliable download process.
  2. Use older version of bundle from tmp dirctory in case download fails.

I see the same error on a function with worker runtime dotnet. The error disappears after removing these lines from host.json "extensionBundle": { "id": "Microsoft.Azure.Functions.ExtensionBundle", "version": "[1.*, 2.0.0)" }

Using azure-cli-core-tools version 3.0.2106

@richardweaver Took a look at the logs on our side. Seeing errors about durableClient is invalid. Can you try it with orchestrationClient instead? durableClient is specific to Durable Functions v2, which will be available in extension bundles v2. It’ll be available soon and we’ll update our documentation on how to upgrade your app to take advantage of it.

/cc @davidmrdavid