question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Func start" does not work for powershell function on darwin arm64 (apple silicone m1)

See original GitHub issue

I’m following tutorial with azure powershell function creation:

https://docs.microsoft.com/en-us/azure/azure-functions/create-first-function-cli-powershell?tabs=azure-cli%2Cbrowser

but unfortunately, when I execute ‘func start’ I end up with such message:

Azure Functions Core Tools
Core Tools Version:       4.0.3971 Commit hash: d0775d487c93ebd49e9c1166d5c3c01f3c76eaaf  (64-bit)
Function Runtime Version: 4.0.1.16815

[2022-01-19T17:55:25.416Z] It was not possible to find any compatible framework version
[2022-01-19T17:55:25.423Z] The framework 'Microsoft.NETCore.App', version '3.1.0' (arm64) was not found.
[2022-01-19T17:55:25.423Z]   - The following frameworks were found:
[2022-01-19T17:55:25.424Z]       6.0.1 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
[2022-01-19T17:55:25.424Z] You can resolve the problem by installing the specified framework and/or SDK.
[2022-01-19T17:55:25.424Z] The specified framework can be found at:
[2022-01-19T17:55:25.424Z]   - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=3.1.0&arch=arm64&rid=osx.12-arm64
[2022-01-19T17:55:25.482Z] It was not possible to find any compatible framework version
[2022-01-19T17:55:25.483Z] The framework 'Microsoft.NETCore.App', version '3.1.0' (arm64) was not found.
[2022-01-19T17:55:25.483Z]   - The following frameworks were found:
[2022-01-19T17:55:25.483Z]       6.0.1 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
[2022-01-19T17:55:25.483Z] You can resolve the problem by installing the specified framework and/or SDK.
[2022-01-19T17:55:25.483Z] The specified framework can be found at:
[2022-01-19T17:55:25.483Z]   - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=3.1.0&arch=arm64&rid=osx.12-arm64
[2022-01-19T17:55:30.205Z] Host lock lease acquired by instance ID '000000000000000000000000DB836EC4'.

The function does not work too, and exits with message:

[2022-01-19T17:55:47.238Z] Executing 'Functions.HttpExample' (Reason='This function was programmatically called via the host APIs.', Id=4b5cdffd-dc7c-4661-b072-a2df97cd29aa)
[2022-01-19T17:56:33.336Z] Final functionDispatcher state: WorkerProcessRestarting. Initialization timed out and host is shutting down
[2022-01-19T17:56:33.432Z] Executed 'Functions.HttpExample' (Failed, Id=4b5cdffd-dc7c-4661-b072-a2df97cd29aa, Duration=46231ms)
[2022-01-19T17:56:33.432Z] System.Private.CoreLib: Exception while executing function: Functions.HttpExample. Microsoft.Azure.WebJobs.Script: Did not find any initialized language workers.

.Net 6 is an LTS version of .Net, and it’s natively supported on apple silicon as arm64 build.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ejizbacommented, Jun 7, 2022

Closing as duplicate of https://github.com/Azure/azure-functions-powershell-worker/issues/752.

M1 Mac support has been finished for PowerShell 7.2. It will be included in the next release core tools that is currently in progress

0reactions
ejizbacommented, Jan 21, 2022

@pszypowicz the line between teams is pretty blurry. In any case, PowerShell 7.2 support isn’t official yet regardless of the progress you see on GitHub. There’s more details in this thread, including instructions for trying it out: https://github.com/Azure/azure-functions-powershell-worker/issues/733#issuecomment-1016827892.

@Francisco-Gamino do you have an issue tracking PowerShell 7.2 support? That linked comment thread is all I could find.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support running on M1 Macs · Issue #2834 · Azure ...
Debugging on Apple Silicon M1 with Visual Studio for Mac or JetBrains ... "Func start" does not work for powershell function on darwin...
Read more >
How to get Azure Function PowerShell on Apple M1 ...
In the local.settings.json file, set FUNCTIONS_WORKER_RUNTIME_VERSION to "7.2" . PowerShell 7.0 is not (and probably will not be) supported on ...
Read more >
Cannot run azure functions on M1
I own an M1 chip and unable to run azure functions locally. ENV Info: OS: macOS Big Sur (11.4) , Node: v14.17.0, v12.18.4...
Read more >
AzureAD module installed on Mac but connect ...
Hello, I'm using Mac OS Catalina 10.15.7 I've installed Powershell using brew. $PSVersionTable returns: Name Value PSVersion 7.1.3 PSEdition ...
Read more >
February 2021 (version 1.54)
We are happy to announce our first release of stable Apple Silicon builds this iteration. Users on Macs with M1 chips can now...
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