Azure / Azure/azure-functions-core-tools
Cannot run a PowerShell app with Http trigger on M1 Mac
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 498
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 14
Description
Steps to reproduce:
1. Create a function app in Visual Studio Code and pick the Http trigger template
2. Run the app with `func host start --verbose`
You'll get the following error:
HttpTrigger: [GET,POST] http://localhost:7071/api/HttpTrigger
[2024-06-07T21:27:23.734Z] Language Worker Process exited. Pid=88228.
[2024-06-07T21:27:23.735Z] dotnet exited with code 137 (0x89). .
[2024-06-07T21:27:23.862Z] Failed to start a new language worker for runtime: powershell.
[2024-06-07T21:27:23.862Z] System.Private.CoreLib: A task was canceled.
[2024-06-07T21:27:23.889Z] System Log: { Log-Level: Information; Log-Message: Azure Functions PowerShell Worker version [4.0.3219.0]. }
[2024-06-07T21:27:24.220Z] Language Worker Process exited. Pid=88234.
[2024-06-07T21:27:24.221Z] dotnet exited with code 137 (0x89). .
[2024-06-07T21:27:34.767Z] System Log: { Log-Level: Information; Log-Message: Azure Functions PowerShell Worker version [4.0.3219.0]. }
[2024-06-07T21:27:35.191Z] Language Worker Process exited. Pid=88254.
[2024-06-07T21:27:35.191Z] dotnet exited with code 137 (0x89). .
[2024-06-07T21:27:35.197Z] Exceeded language worker restart retry count for runtime:powershell. Shutting down and proactively recycling the Functions Host to recover
[2024-06-07T21:27:35.220Z] Stopping host...
[2024-06-07T21:27:35.235Z] Stopping JobHost
[2024-06-07T21:27:35.247Z] Job host stopped
[2024-06-07T21:27:35.289Z] Host shutdown completed.
It seems that no workers are started successfully. This is true for both PowerShell 7.2 and 7.4.
Core Tools version: 4.0.5801
Mac Info: Apple M1 Pro, macOS Sonoma version 14.5
Contributor guide
Research direction
Reproduce the failure with `func host start --verbose` on an Apple M1 Mac using PowerShell 7.2 and 7.4, and compare the language-worker startup logs. Trace the PowerShell worker launch path in Core Tools; done means the HTTP-trigger template starts successfully without worker exits or host recycling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, powershell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100