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

"Function not implemented" error on Mac M1, works on Ubuntu

Open wangcarlton opened this issue 2 years ago • 34 comments

Hey team,

I'm currently stuck in the "Function not implemented" error which blocks me from using my Mac. How to reproduce:

  1. Follow https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local to create a nodejs function, add "start": "func start" into package.json
  2. Create a Dockerfile to use ubuntu:bionic image and install depedencies
FROM --platform=linux/amd64 ubuntu:bionic

RUN apt update && \
  apt install -y \
  apt-transport-https \
  curl \
  lsb-release gnupg \
  virtualenv && \
  curl -sL https://packages.microsoft.com/keys/microsoft.asc | \
  gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.asc.gpg && \
  curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | \
  apt-key add && \
  echo \
  "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" \
  > /etc/apt/sources.list.d/azure-cli.list && \
  echo \
  "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-$(lsb_release -cs)-prod $(lsb_release -cs) main" \
  > /etc/apt/sources.list.d/dotnetdev.list && \
  echo "deb https://deb.nodesource.com/node_10.x disco main" \
  > /etc/apt/sources.list.d/nodesource.list && \
  apt update && \
  apt install -y \
  azure-cli \
  azure-functions-core-tools \
  libicu-dev \
  build-essential \
  nodejs \
  unzip \
  zip && \
  useradd -m azure && \
  chown -R azure:azure /home/azure/.bashrc && \
  mkdir -p /root/.azure-functions-core-tools/Functions/ExtensionBundles && \
  cd /root/.azure-functions-core-tools/Functions/ExtensionBundles && \
  curl -O https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/2.4.0/Microsoft.Azure.Functions.ExtensionBundle.2.4.0.zip && \
  mkdir -p Microsoft.Azure.Functions.ExtensionBundle/2.4.0 && \
  unzip Microsoft.Azure.Functions.ExtensionBundle.2.4.0.zip -d Microsoft.Azure.Functions.ExtensionBundle/2.4.0 && \
  cd -

USER azure
  1. Create a docker-compose.yaml file
version: "3.7"

services:
  demo:
    container_name: demo
    build:
      context: .
      dockerfile: ./Dockerfile
    user: root
    working_dir: /work
    ports:
      - "7071:7071"
    volumes:
      - ./MyFunctionProj:/work
    command: sh -c "ls -lrt && npm start -- -p 7071 --cors-credentials --cors 'http://localhost:7070'"

networks:
  default:
    driver: bridge
    driver_opts:
      com.docker.network.driver.mtu: 1400
  1. Start the docker in Ubuntu environment and Mac M1 environment

Thank you. Folder Mac-M1 Ubuntu

wangcarlton avatar Jan 13 '22 07:01 wangcarlton

@wangcarlton could you try using a more up-to-date version of Core Tools? You can do this by using azure-functions-core-tools-3 or azure-functions-core-tools-4 rather than azure-functions-core-tools. Could you also specify the reason this is being done in a docker environment? Is this to get around a specific limitation of Core Tools?

michaelpeng36 avatar Jan 13 '22 18:01 michaelpeng36

@michaelpeng36 Thank you for the reply. For your first question, I've tried to install 4(docker pull --platform=linux/amd64 ubuntu, if I don't add --platform param here, it leads to a E: Unable to locate package azure-functions-core-tools or E: Unable to locate package azure-functions-core-tools-4 error), manually run the docker file commands and download source function code, as you can see, func command works well, but it still shows "Function not implemented". Yes, we are trying to pack frontend, backend(NodeJs function app) in compose file to make this more portable. Screen Shot 2022-01-14 at 17 25 46 Screen Shot 2022-01-14 at 17 32 33

wangcarlton avatar Jan 14 '22 06:01 wangcarlton

Btw, I've tried to set terminal "Open using Rosetta", they don't work. However, if I run it locally on the Mac M1 laptop, it works Screen Shot 2022-01-14 at 23 02 15

wangcarlton avatar Jan 14 '22 12:01 wangcarlton

This is when I ran those commands, and following https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local to create a sample function on the container, still got the same result Screen Shot 2022-01-19 at 21 31 51

wangcarlton avatar Jan 19 '22 10:01 wangcarlton

I will say I don't think the "Function" mentioned in the error message is an Azure function. If I search "Function not implemented" I find many other instances of that error that seem to be unique to Docker/linux environments when trying to access a file. For example:

https://stackoverflow.com/questions/68455992/docker-compose-on-mac-m1-error-function-not-implemented

https://github.com/docker/for-win/issues/5955

ejizba avatar Jan 19 '22 17:01 ejizba

Yeah, that might be the docker simulated container issue on Mac M1. Share this piece of debug info: Screen Shot 2022-01-20 at 20 39 02

wangcarlton avatar Jan 20 '22 09:01 wangcarlton

Thanks @wangcarlton. @diberry just reported the same issue. Looks like maybe one of the OS APIs used by the filewatcher isn't implemented when running in a linux/amd64 container when running on an M1 docker host.

anthonychu avatar Jan 20 '22 21:01 anthonychu

@anthonychu Thank you for the updates and please let me know once it's fixed.

wangcarlton avatar Jan 21 '22 00:01 wangcarlton

when running in a linux/amd64 container when running on an M1 docker host.

I too am having this problem. Here is the output from func start --debug

Setting unsupported .NET environemt variables (empty string) is not implemented for this platform.
System.IO.IOException: Function not implemented
   at System.IO.FileSystemWatcher.StartRaisingEvents()
   at System.IO.FileSystemWatcher.StartRaisingEventsIfNotDisposed()
   at System.IO.FileSystemWatcher.set_EnableRaisingEvents(Boolean value)
   at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.TryEnableFileSystemWatcher()
   at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.CreateFileChangeToken(String filter)
   at Microsoft.Extensions.FileProviders.PhysicalFileProvider.Watch(String filter)
   at Microsoft.Extensions.Configuration.FileConfigurationProvider.<.ctor>b__1_0()
   at Microsoft.Extensions.Primitives.ChangeToken.OnChange(Func`1 changeTokenProducer, Action changeTokenConsumer)
   at Microsoft.Extensions.Configuration.FileConfigurationProvider..ctor(FileConfigurationSource source)
   at Microsoft.Extensions.Configuration.Json.JsonConfigurationSource.Build(IConfigurationBuilder builder)
   at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
   at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices(AggregateException& hostingStartupErrors)
   at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
   at Azure.Functions.Cli.Actions.HostActions.StartHostAction.BuildWebHost(ScriptApplicationHostOptions hostOptions, Uri listenAddress, Uri baseAddress, X509Certificate2 certificate) in D:\a\1\s\src\Azure.Functions.Cli\Actions\HostActions\StartHostAction.cs:line 202
   at Azure.Functions.Cli.Actions.HostActions.StartHostAction.RunAsync() in D:\a\1\s\src\Azure.Functions.Cli\Actions\HostActions\StartHostAction.cs:line 360
   at Azure.Functions.Cli.ConsoleApp.RunAsync[T](String[] args, IContainer container) in D:\a\1\s\src\Azure.Functions.Cli\ConsoleApp.cs:line 64

Timothy-Pulliam avatar Jan 26 '22 21:01 Timothy-Pulliam

Hey, any updates on this issue? thank you

wangcarlton avatar Feb 02 '22 04:02 wangcarlton

Any updates on this issue ? I am experiencing the same difficulties on an M1 chip.

alexis-franche avatar Feb 23 '22 17:02 alexis-franche

@anthonychu @stefanushinardi Can you please provide an update for ETA on developing Azure Functions on an M1 chip in docker? Is this a Docker issue or an Azure Functions issue?

diberry avatar Feb 24 '22 16:02 diberry

Hey everybody,

Anybody who has trouble starting the Azure Function via console should check if your Azure Functions Core Tool is compatible with your .NET Core version. For example Azure Functions Core Tool 3.1 did not work for me with .NET Core 6.x .

Azure Functions runtime versions overview: https://docs.microsoft.com/en-us/azure/azure-functions/functions-versions?tabs=in-process%2Cv4&pivots=programming-language-csharp


But I am facing a simialar same problem on a Docker image (built from MacBook Air with M1-Chip). I set up an Azure Function with Azure Functions Core Tools (4.0.3971).

func init --docker (dotnet)

func new (BlobTrigger)

The function is running inside Visual Studio and from the console (.Net Core 6.0.3 installed). But when I build my docker image with the following command:

docker build --platform linux/arm64/v8 -t someimagename

and if I try to run it:

docker run -it someimagename

I get the following error:

fail: Host.Startup[515] A host error has occurred during startup operation 'bb827579-ddf0-4bc0-9ff8-abea885e77bb'. System.IO.IOException: Function not implemented at System.IO.FileSystemWatcher.StartRaisingEvents() at System.IO.FileSystemWatcher.StartRaisingEventsIfNotDisposed() at System.IO.FileSystemWatcher.set_EnableRaisingEvents(Boolean value) at Microsoft.Azure.WebJobs.Script.IO.AutoRecoveringFileSystemWatcher.InitializeWatcher() in /src/azure-functions-host/src/WebJobs.Script/IO/AutoRecoveringFileSystemWatcher.cs:line 64 at Microsoft.Azure.WebJobs.Script.IO.AutoRecoveringFileSystemWatcher..ctor(String path, String filter, Boolean includeSubdirectories, WatcherChangeTypes changeTypes, ILoggerFactory loggerFactory) in /src/azure-functions-host/src/WebJobs.Script/IO/AutoRecoveringFileSystemWatcher.cs:line 43 at Microsoft.Azure.WebJobs.Script.Eventing.File.FileWatcherEventSource..ctor(IScriptEventManager eventManager, String source, String path, String filter, Boolean includeSubdirectories, WatcherChangeTypes changeTypes, ILoggerFactory loggerFactory) in /src/azure-functions-host/src/WebJobs.Script/Eventing/File/FileWatcherEventSource.cs:line 28 at Microsoft.Azure.WebJobs.Script.WebHost.FileMonitoringService.InitializeFileWatchers() in /src/azure-functions-host/src/WebJobs.Script.WebHost/FileMonitoringService.cs:line 157 at Microsoft.Azure.WebJobs.Script.WebHost.FileMonitoringService.StartAsync(CancellationToken cancellationToken) in /src/azure-functions-host/src/WebJobs.Script.WebHost/FileMonitoringService.cs:line 93 at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at Microsoft.Azure.WebJobs.Script.WebHost.WebJobsScriptHostService.UnsynchronizedStartHostAsync(ScriptHostStartupOperation activeOperation, Int32 attemptCount, JobHostStartupMode startupMode) in /src/azure-functions-host/src/WebJobs.Script.WebHost/WebJobsScriptHostService.cs:line 309

Same error if I do not specifiy the platform building the docker image.

Here is my Dockerfile:


FROM mcr.microsoft.com/dotnet/sdk:6.0 AS installer-env

COPY --from=mcr.microsoft.com/dotnet/core/sdk:3.1 /usr/share/dotnet /usr/share/dotnet

COPY . /src/dotnet-function-app
RUN cd /src/dotnet-function-app && \
    mkdir -p /home/site/wwwroot && \
    dotnet publish *.csproj --output /home/site/wwwroot

FROM mcr.microsoft.com/azure-functions/dotnet:4
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
    AzureFunctionsJobHost__Logging__Console__IsEnabled=true

ENV AzureWebJobsStorage="someconnectionkey"

COPY --from=installer-env ["/home/site/wwwroot", "/home/site/wwwroot"]

bonsenz avatar Mar 25 '22 13:03 bonsenz

Same issue here as @bon above

stephen776 avatar Mar 31 '22 15:03 stephen776

I am having the same issue - can't build on M1 but works fine for other machines. Commenting in hopes of being notified about a solution.

cnkeats avatar May 03 '22 18:05 cnkeats

I'm hitting this same M1 Mac specific issue when trying to set up a custom devcontainer in VSCode with functions core tools running inside the container.

$ func start --verbose --debug
> python3 --version
> python --version
> python3.6 --version
> python3.7 --version
> python3.8 --version
> python3.9 --version
Found Python version 3.9.12 (python3).
languageWorkers:python:defaultExecutablePath is set to python3

                  %%%%%%
                 %%%%%%
            @   %%%%%%    @
          @@   %%%%%%      @@
       @@@    %%%%%%%%%%%    @@@
     @@      %%%%%%%%%%        @@
       @@         %%%%       @@
         @@      %%%       @@
           @@    %%      @@
                %%
                %


Azure Functions Core Tools
Core Tools Version:       4.0.4483 Commit hash: N/A  (64-bit)
Function Runtime Version: 4.1.3.17473

Setting unsupported .NET environemt variables (empty string) is not implemented for this platform.
System.IO.IOException: Function not implemented
   at System.IO.FileSystemWatcher.StartRaisingEvents()
   at System.IO.FileSystemWatcher.StartRaisingEventsIfNotDisposed()
   at System.IO.FileSystemWatcher.set_EnableRaisingEvents(Boolean value)
   at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.TryEnableFileSystemWatcher()
   at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.CreateFileChangeToken(String filter)
   at Microsoft.Extensions.FileProviders.PhysicalFileProvider.Watch(String filter)
   at Microsoft.Extensions.Configuration.FileConfigurationProvider.<.ctor>b__1_0()
   at Microsoft.Extensions.Primitives.ChangeToken.OnChange(Func`1 changeTokenProducer, Action changeTokenConsumer)
   at Microsoft.Extensions.Configuration.FileConfigurationProvider..ctor(FileConfigurationSource source)
   at Microsoft.Extensions.Configuration.Json.JsonConfigurationSource.Build(IConfigurationBuilder builder)
   at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
   at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices(AggregateException& hostingStartupErrors)
   at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
   at Azure.Functions.Cli.Actions.HostActions.StartHostAction.BuildWebHost(ScriptApplicationHostOptions hostOptions, Uri listenAddress, Uri baseAddress, X509Certificate2 certificate) in D:\a\_work\1\s\src\Azure.Functions.Cli\Actions\HostActions\StartHostAction.cs:line 205
   at Azure.Functions.Cli.Actions.HostActions.StartHostAction.RunAsync() in D:\a\_work\1\s\src\Azure.Functions.Cli\Actions\HostActions\StartHostAction.cs:line 371
   at Azure.Functions.Cli.ConsoleApp.RunAsync[T](String[] args, IContainer container) in D:\a\_work\1\s\src\Azure.Functions.Cli\ConsoleApp.cs:line 64

Side note: someone typo'd "environment": environemt

Hoping this comment will help gravitate more searches to this issue.

Dockerfile, for reference:

# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.231.6/containers/python-3/.devcontainer/base.Dockerfile

# [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3.9, 3.8, 3.7, 3.6, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster
ARG VARIANT="3.9-buster"
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}

# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="none"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

# Install Rust for building deltalake
RUN su vscode -c "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y" 2>&1

# Install Poetry
RUN su vscode -c "curl -sSL https://install.python-poetry.org | python3 -" 2>&1

# Install Azure Functions Core tools
RUN curl -L 'https://github.com/Azure/azure-functions-core-tools/releases/download/4.0.4483/Azure.Functions.Cli.linux-x64.4.0.4483.zip' -o Azure.Functions.Cli.zip && \
    sudo mkdir -p /opt/func && \
    sudo unzip -d /opt/func Azure.Functions.Cli.zip && \
    sudo chmod +x /opt/func/func && \
    sudo chmod +x /opt/func/gozip && \
    rm Azure.Functions.Cli.zip

ENV PATH="/opt/func:${PATH}"

Codesleuth avatar May 04 '22 09:05 Codesleuth

Facing same issue here, any updates please ?

7hamza avatar May 14 '22 23:05 7hamza

Just when i thought i found a way to develop azure functions with pwsh on Mac M1, i ran into this same issue :). Has anyone been able to find a work-around ?

invisibleaxm avatar May 17 '22 12:05 invisibleaxm

Facing the same issue, any updates on this?

cretumarius avatar May 19 '22 15:05 cretumarius

Same issue here on Apple M1 with the following dockerfile

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS installer-env

# Build requires 3.1 SDK
COPY --from=mcr.microsoft.com/dotnet/core/sdk:3.1 /usr/share/dotnet /usr/share/dotnet

COPY . /src/dotnet-function-app
RUN cd /src/dotnet-function-app && \
    mkdir -p /home/site/wwwroot && \
    dotnet publish *.csproj --output /home/site/wwwroot

FROM mcr.microsoft.com/azure-functions/dotnet:4
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
    AzureFunctionsJobHost__Logging__Console__IsEnabled=true

COPY --from=installer-env ["/home/site/wwwroot", "/home/site/wwwroot"]

vudzero avatar May 27 '22 00:05 vudzero

Same issue

pokepoke81 avatar Jun 15 '22 17:06 pokepoke81

Same issue as @vudzero

zdarovka avatar Jun 15 '22 19:06 zdarovka

I too am having the same issue.. Is there any working being done to solve this?

DMegarry avatar Jul 01 '22 11:07 DMegarry

Here's my workaround to create an env that Azure will tolerate on Apple Silicon...

Workaround on Apple Silicon

1. Installing Rosetta

  1. Run the following command in terminal: softwareupdate --install-rosetta --agree-to-license
    • This will install Apple's Rosetta which emulates x64_86 architecture.
  2. Navigate to ~/Applications/ and duplicate 'Terminal'
    • You may wish to rename the duplicate "Rosetta Terminal"
  3. Secondary-click your new terminal, navigate to 'Get Info', and check the 'Open using Rosetta' box.

You have now created a second terminal application that will always run as x64_86. Test this by entering arch, it should show as i386 as opposed to arm64. You can always enter python -c "import platform;print(platform.machine())" to test that the Python interpreter is running on Rosetta.

The two terminals share the same preferences (i.e. theme), so using a new icon for the Rosetta terminal is advised. The process for replacing an application icon is well documented online. A high-fidelity image of the Apple Rosetta logo can be found here

2. Installing Dependencies

  1. Install the intel arch for brew: arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
    • Good practice to run echo 'eval "$(/usr/local/bin/brew shellenv)"' >> /Users/USERNAME/.zprofile and eval "$(/usr/local/bin/brew shellenv)" after brew install
  2. Create a new Conda env (named rosetta): CONDA_SUBDIR=osx-64 conda create -n rosetta python=3.9

⚠️ Python 3.9.X is the latest version supported by Azure CLI & Funcs

  1. Activate new Conda env: conda activate rosetta
  2. Install Azure Functions Core Tools by running arch -x86_64 brew tap azure/functions then arch -x86_64 brew install azure-functions-core-tools@4
  3. Install Azure CLI: arch -x86_64 brew update && arch -x86_64 brew install azure-cli
  4. Run az login to authenticate in browser.
    • You should see something like the following...
     [
       {
         "cloudName": "AzureCloud",
         "homeTenantId": "a000000-b000-c000-d000-e00000000000",
         "id": "a000000-b000-c000-d000-e00000000000",
         "isDefault": true,
         "managedByTenants": [],
         "name": "Pay-As-You-Go",
         "state": "Enabled",
         "tenantId": "a000000-b000-c000-d000-e00000000000",
         "user": {
           "name": "[email protected]",
           "type": "user"
         }
       }
     ]
    
  5. Navigate to the project directory & run pip install -r requirements.txt

3. Testing that all is A-OK

  1. Start the app: Azure already knows that the directory contains a function app. You do not need to initiate a new function app, simply run func start host
    • Your endpoint should be localhost:7071...
    • There is no authentication 👋 Goodbye Ocp-Apim-Subscription-Key
    • Should the above perform as expected, you're off... Happy Coding 🤖🚀

lucafrost avatar Jul 21 '22 13:07 lucafrost

Here's my workaround to create an env that Azure will tolerate on Apple Silicon...

Workaround on Apple Silicon

1. Installing Rosetta

  1. Run the following command in terminal: softwareupdate --install-rosetta --agree-to-license

    • This will install Apple's Rosetta which emulates x64_86 architecture.
  2. Navigate to ~/Applications/ and duplicate 'Terminal'

    • You may wish to rename the duplicate "Rosetta Terminal"
  3. Secondary-click your new terminal, navigate to 'Get Info', and check the 'Open using Rosetta' box.

You have now created a second terminal application that will always run as x64_86. Test this by entering arch, it should show as i386 as opposed to arm64. You can always enter python -c "import platform;print(platform.machine())" to test that the Python interpreter is running on Rosetta.

The two terminals share the same preferences (i.e. theme), so using a new icon for the Rosetta terminal is advised. The process for replacing an application icon is well documented online. A high-fidelity image of the Apple Rosetta logo can be found here

2. Installing Dependencies

  1. Install the intel arch for brew: arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

    • Good practice to run echo 'eval "$(/usr/local/bin/brew shellenv)"' >> /Users/USERNAME/.zprofile and eval "$(/usr/local/bin/brew shellenv)" after brew install
  2. Create a new Conda env (named rosetta): CONDA_SUBDIR=osx-64 conda create -n rosetta python=3.9

⚠️ Python 3.9.X is the latest version supported by Azure CLI & Funcs

  1. Activate new Conda env: conda activate rosetta

  2. Install Azure Functions Core Tools by running arch -x86_64 brew tap azure/functions then arch -x86_64 brew install azure-functions-core-tools@4

  3. Install Azure CLI: arch -x86_64 brew update && arch -x86_64 brew install azure-cli

  4. Run az login to authenticate in browser.

    • You should see something like the following...
     [
       {
         "cloudName": "AzureCloud",
         "homeTenantId": "a000000-b000-c000-d000-e00000000000",
         "id": "a000000-b000-c000-d000-e00000000000",
         "isDefault": true,
         "managedByTenants": [],
         "name": "Pay-As-You-Go",
         "state": "Enabled",
         "tenantId": "a000000-b000-c000-d000-e00000000000",
         "user": {
           "name": "[email protected]",
           "type": "user"
         }
       }
     ]
    
  5. Navigate to the project directory & run pip install -r requirements.txt

3. Testing that all is A-OK

  1. Start the app: Azure already knows that the directory contains a function app. You do not need to initiate a new function app, simply run func start host

    • Your endpoint should be localhost:7071...
    • There is no authentication 👋 Goodbye Ocp-Apim-Subscription-Key
    • Should the above perform as expected, you're off... Happy Coding 🤖🚀

Locally the functions work fine. The issue is when running in a container.

PabloZaiden avatar Jul 21 '22 17:07 PabloZaiden

I'm also facing the same issue that the func host start command terminates when running inside an amd64 architecture container on my Mac M1.

lehela avatar Aug 07 '22 08:08 lehela

I think I'm seeing this issue, too.

papakpmartin avatar Aug 08 '22 14:08 papakpmartin

Seeing same issue when trying to run in a devcontainer (Azure Functions & C# - .NET 6 (In-Process)) boilerplate and adding the boilerplate project for httpTrigger.

josteinkirkebak avatar Aug 24 '22 13:08 josteinkirkebak

Is this issue related to this?

austingayler avatar Aug 29 '22 14:08 austingayler

I'm facing the same issue running a node azure function on a docker container, debug infos below: func start --javascript --verbose --debug

ifconfig -a
container-test-1  | > ip link
container-test-1  | 
container-test-1  |                   %%%%%%
container-test-1  |                  %%%%%%
container-test-1  |             @   %%%%%%    @
container-test-1  |           @@   %%%%%%      @@
container-test-1  |        @@@    %%%%%%%%%%%    @@@
container-test-1  |      @@      %%%%%%%%%%        @@
container-test-1  |        @@         %%%%       @@
container-test-1  |          @@      %%%       @@
container-test-1  |            @@    %%      @@
container-test-1  |                 %%
container-test-1  |                 %
container-test-1  | 
container-test-1  | 
container-test-1  | Azure Functions Core Tools
container-test-1  | Core Tools Version:       3.0.4626 Commit hash: N/A  (64-bit)
container-test-1  | Function Runtime Version: 3.9.0.0
container-test-1  | 
container-test-1  | Skipping 'AzureWebJobsScriptRoot' from local settings as it's already defined in current environment variables.
container-test-1  | System.IO.IOException: Function not implemented
container-test-1  |    at System.IO.FileSystemWatcher.StartRaisingEvents()
container-test-1  |    at System.IO.FileSystemWatcher.StartRaisingEventsIfNotDisposed()
container-test-1  |    at System.IO.FileSystemWatcher.set_EnableRaisingEvents(Boolean value)
container-test-1  |    at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.TryEnableFileSystemWatcher()
container-test-1  |    at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.CreateFileChangeToken(String filter)
container-test-1  |    at Microsoft.Extensions.FileProviders.PhysicalFileProvider.Watch(String filter)
container-test-1  |    at Microsoft.Extensions.Configuration.FileConfigurationProvider.<.ctor>b__1_0()
container-test-1  |    at Microsoft.Extensions.Primitives.ChangeToken.ChangeTokenRegistration`1..ctor(Func`1 changeTokenProducer, Action`1 changeTokenConsumer, TState state)
container-test-1  |    at Microsoft.Extensions.Primitives.ChangeToken.OnChange(Func`1 changeTokenProducer, Action changeTokenConsumer)
container-test-1  |    at Microsoft.Extensions.Configuration.FileConfigurationProvider..ctor(FileConfigurationSource source)
container-test-1  |    at Microsoft.Extensions.Configuration.Json.JsonConfigurationSource.Build(IConfigurationBuilder builder)
container-test-1  |    at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
container-test-1  |    at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices(AggregateException& hostingStartupErrors)
container-test-1  |    at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
container-test-1  |    at Azure.Functions.Cli.Actions.HostActions.StartHostAction.BuildWebHost(ScriptApplicationHostOptions hostOptions, Uri listenAddress, Uri baseAddress, X509Certificate2 certificate) in D:\a\_work\1\s\src\Azure.Functions.Cli\Actions\HostActions\StartHostAction.cs:line 206
container-test-1  |    at Azure.Functions.Cli.Actions.HostActions.StartHostAction.RunAsync() in D:\a\_work\1\s\src\Azure.Functions.Cli\Actions\HostActions\StartHostAction.cs:line 361
container-test-1  |    at Azure.Functions.Cli.ConsoleApp.RunAsync[T](String[] args, IContainer container) in D:\a\_work\1\s\src\Azure.Functions.Cli\ConsoleApp.cs:line 66
container-test-1 exited with code 1

arcogabbo avatar Aug 30 '22 08:08 arcogabbo