azure-functions-core-tools icon indicating copy to clipboard operation
azure-functions-core-tools copied to clipboard

Latest version reports it is old

Open HolisticDeveloper opened this issue 1 year ago • 2 comments

Version

Core Tools Version: 4.0.1 Commit hash: N/A +807e89766a92b14fd07b9f0bc2bea1d8777ab209 (32-bit) Function Runtime Version: 4.834.3.22875

Description

I have the latest v4.0.5907 release installed, but when I run func it includes the following statement at the end of the output:

You are using an old Core Tools version. Please upgrade to the latest version.

Steps to reproduce

  1. Install via chocolatey: choco install azure-functions-core-tools.
  2. In a PowerShell prompt, run func.
  3. Observe the output.

HolisticDeveloper avatar Jul 25 '24 13:07 HolisticDeveloper

By default, the Chocolatey package downloads https://functionscdn.azureedge.net/public/4.0.5907/Azure.Functions.Cli.win-x86.4.0.5907.zip. It ends up creating a shim that points at the unzipped in-proc8\func.exe. It is this exe that has the 4.0.1 version. (.\func.exe has the correct version.)

HolisticDeveloper avatar Jul 25 '24 16:07 HolisticDeveloper

@kshyju has more context on this.

fabiocav avatar Sep 18 '24 00:09 fabiocav

Hi @kshyju, looking at the Logs of the chocolatey, shim for generating twice (we have 2 executables: one in root folder and other in inproc8) and --iconpath(target path) is getting replaced with inproc8/func.exe when shim is generated 2nd time. so, it is running the func.exe present in 'root/inproc8' folder. Could you please provide overview on whether shim needs to generate twice or based on some condition ( [installation script] (https://github.com/Azure/azure-functions-core-tools/blob/v4.x/publish-scripts/chocolatey/installps_template) of chocolatey). Image

VineethReyya avatar Oct 30 '24 11:10 VineethReyya

I am experiencing the same issue. Both version 4.0.6543 and 4.0.6594 show 4.0.6518 when requesting the version number using func --version.

Manually recreating the first shim for func.exe (in \lib\azure-functions-core-tools\tools\func.exe) seems to solve the problem at our end as a workaround.

TanjaPGGM avatar Nov 13 '24 10:11 TanjaPGGM

This also happens when installing using Windows Installer (.exe). Image followed by Image

4.0.6610 Commit hash: N/A +0d55b5d7efe83d85d2b5c6e0b0a9c1b213e96256 (64-bit) is the latest at the time this comment is posted.

SeanFeldman avatar Nov 26 '24 03:11 SeanFeldman

This also happens using the npm package.

npm i -g azure-functions-core-tools@latest

Image

Image

JonSilver avatar Dec 20 '24 09:12 JonSilver

And this also happens when installing or reinstalling using brew on macOS:

brew reinstall azure-functions-core-tools@4

Further, I used install first and canceled after "a few minutes" because I thought it was stuck. Then, I used reinstall and waited patiently. It took 4 minutes and 37 seconds to build on my MacBook Pro M1 Max. I did not expect that.

ThomasBarnekow avatar Dec 25 '24 20:12 ThomasBarnekow

Can confirm what @ThomasBarnekow mentioned. I am using it on a Macbook with the M1 chip/Apple Silicon. However, I uninstalled it completely, performed a brew cleanup and installed it again. Same output:

Azure Functions Core Tools
Core Tools Version:       4.0.6610 Commit hash: N/A +0d55b5d7efe83d85d2b5c6e0b0a9c1b213e96256 (64-bit)
Function Runtime Version: 4.1036.1.23224

<...truncated...>

You are using an old Core Tools version. Please upgrade to the latest version.

Any news on this @VineethReyya ?

pitscher avatar Jan 01 '25 19:01 pitscher

Any update on this please? The official link in the docs installs version 4.0.6610.

woeterman94 avatar Jan 06 '25 09:01 woeterman94

Also having this problem, so does all of my team using Mac's. I think it's safe to say that most users (both win as mac) will have this issue? When is a fix expected?

ThijsHakkenbergLobster avatar Jan 06 '25 16:01 ThijsHakkenbergLobster

Yay - it's fixed. Thank you @VineethReyya :)

pitscher avatar Jan 15 '25 14:01 pitscher