Matter Zap tool on Apple Silicon

I have a fresh install of the nRF tools for matter development.

I am running on a MacBook Pro with M1 Max chip.

I ran the script to install the zap tool.

I set up the path to point to where it was installed.

When I type zap I get the following error:

dyld[71734]: Library not loaded: @rpath/Electron Framework.framework/Electron Framework
  Referenced from: <4C4C44DA-5555-3144-A10D-1E87A10EA9F8> /opt/nordic/zap/zap-mac/zap.app/Contents/MacOS/zap
  Reason: tried: '/opt/nordic/zap/zap-mac/zap.app/Contents/Frameworks/Electron Framework.framework/Electron Framework' (not a mach-o file), '/opt/nordic/zap/zap-mac/zap.app/Contents/Frameworks/Electron Framework.framework/Electron Framework' (not a mach-o file), '/Library/Frameworks/Electron Framework.framework/Electron Framework' (no such file), '/System/Library/Frameworks/Electron Framework.framework/Electron Framework' (no such file, not in dyld cache)
zsh: abort      zap

  • I will give that a try, but have to mention something.

    I am using VSCode and the Nordic plugin for development and not directly using the SDK.

    I thought the plugin was supposed to handle these kinds of installation things.

    Does using VSCode affect any of the things I should be doing here?

  • Hi,

    Tony said:

    I am using VSCode and the Nordic plugin for development and not directly using the SDK.

    I thought the plugin was supposed to handle these kinds of installation things.

    Correct, it should work fine with the VS Code extension as well.

    Can you try downloading the zap package manually and unzipping it? Here is the direct link to download the zip: https://github.com/project-chip/zap/releases/download/v2023.04.27-nightly/zap-mac.zip.

    Best regards,
    Marte

  • Downloading that version directly does work.

    So the question is, what is wrong with the script that downloads a bad version?

    I compared some things about the 2 zap.app files by right clicking and choosing the Get Info on MacOS.

    The one that works has a created date of April 27, 2023. The one that does not work has a created date of October 25, 2023.

    I now seem to have a working version, though I am a little concerned it is so old and maybe is missing newer functionality.

    I will proceed with this for now and wonder what the difference is.

  • Hi,

    Tony said:
    So the question is, what is wrong with the script that downloads a bad version?

    It seems like the issue is with the tools on M1 Mac.

    Tony said:

    The one that works has a created date of April 27, 2023. The one that does not work has a created date of October 25, 2023.

    The ZAP tool from April 27 is the version used in nRF Connect SDK v2.4.0, v2.4.1 and v2.5.0. The ZAP tool file you built with the Python script will have the date you built it as 'created date' if you look at the file info in macOS, which is not the actual date of the ZAP tool itself.

    To get the actual version of ZAP tool you can use the command zap --version.

    > zap --version
    Version: 2023.4.27
    Feature level: 96
    Hash: 4f2a3d6cc1bf5164013b72b36e625b92cf1619b1
    Date: 2023-04-27T21:32:30.000Z
    Mode: source 

    You can also see which version is being downloaded when you run the Python script to install it, for example:

    > python scripts/setup/nrfconnect/get_zap.py -l ~/ncs/ -o
    ZAP file not found [Errno 2] No such file or directory: 'zap'
    No ZAP tool version was found installed on this device.
    Trying to download ZAP tool package matching your system and recommended version.
    Downloading https://github.com/project-chip/zap/releases/download/v2023.04.27-nightly/zap-linux.zip into /home/mamy/ncs/zap-linux.zip
    

    In the GitHub URL you can see that it is downloading v2023.04.27. This is when running the script in v2.5.0.

    If you are worried about having the incorrect version of ZAP tool, you can find the recommended version by checking MIN_ZAP_VERSION in the zap_execution.py file in your installed SDK (under modules/lib/matter/scripts/tools/zap/zap_execution.py):

    MIN_ZAP_VERSION = '2023.4.27'

    The prebuilt ZAP tool packages can be downloaded here: https://github.com/project-chip/zap/releases.

    Best regards,
    Marte

Related