Azure / Azure/azure-functions-core-tools

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

Open
#2,901 51 comments 14 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.5k
Forks
498
Avg merge
4d 20h
Merged PRs (30d)
14

Description

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
```

3. 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
```

4. Start the docker in Ubuntu environment and Mac M1 environment

Thank you.
![Folder](https://user-images.githubusercontent.com/35724343/149281742-f6b27f38-7349-4f0d-98ee-1670d75de25f.png)
Mac-M1
![Ubuntu](https://user-images.githubusercontent.com/35724343/149281758-efca18f1-7c36-4842-b049-04a2df53ac44.png)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Dockerfile and docker-compose.yaml setup on Mac M1 and Ubuntu, then compare the resulting logs and screenshots. The issue names no repository files or tests; done would mean identifying the source of the Mac M1 "Function not implemented" error and confirming that the documented setup starts the function successfully on both environments.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, docker, nodejs
Domain
cli, cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.