west zap-gui can not use

Board: nrf7002
Project: matter_light_blub
OS: Kubuntu 22
Toolchains: v2.7.0
SDK: v2.7.0

I have successfully deployed and tested projects that run normally, but when I try to make changes using ZAP, I encountered the following error during installation. Could you please tell me what software I might be missing and need to install? Thank you very much.

jim@jim:~/nodic2.70/light_bulb$ west zap-gui
ZAP installation directory: /home/jim/nodic2.70/external/modules/lib/matter/.zap-install
Installing ZAP 2024.3.14
Downloading https://github.com/project-chip/zap/releases/download/v2024.03.14-nightly/zap-linux-x64.zip...
100% [......................................................................] 206076879 / 206076879
Unzipping ZAP package to /home/jim/nodic2.70/external/modules/lib/matter/.zap-install...
/home/jim/nodic2.70/light_bulb/src/light_bulb.zap:2
  "fileFormat": 2,
              ^

SyntaxError: Unexpected token ':'
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1185:20)
    at Module._compile (node:internal/modules/cjs/loader:1227:27)
    at Object..js (node:internal/modules/cjs/loader:1326:10)
    at Module.load (node:internal/modules/cjs/loader:1126:32)
    at node:internal/modules/cjs/loader:967:12
    at Function._load (node:electron/js2c/asar_bundle:2:13327)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:96:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.17.1
FATAL ERROR: command exited with status 1: /home/jim/nodic2.70/external/modules/lib/matter/.zap-install/zap /home/jim/nodic2.70/light_bulb/src/light_bulb.zap --zcl /home/jim/nodic2.70/external/modules/lib/matter/src/app/zap-templates/zcl/zcl.json --gen /home/jim/nodic2.70/external/modules/lib/matter/src/app/zap-templates/app-templates.json --stateDirectory /home/jim/nodic2.70/external/modules/lib/matter/.zap-install/.zap

Parents
  • Hi,

    Unzipping ZAP package to /home/jim/nodic2.70/external/modules/lib/matter/.zap-install...
    /home/jim/nodic2.70/light_bulb/src/light_bulb.zap:2
      "fileFormat": 2,
                  ^
                  
    SyntaxError: Unexpected token ':'

    It looks to me that you're trying to add it to a location that is not approved: /home/jim/nodic2.70/light_bulb/src/light_bulb.zap:2

    Could you try without ":2"? 

    Kind regards,
    Andreas

  • This is the result after my attempt to make modifications; the issue remains the same. Additionally, when I entered west zap-gui again, the error output was different.

    By the way, I haven't modified any code yet; I've only performed flashing, and the project was copied from a sample.

    jim@jim:~/nodic2.70/light_bulb$ west zap-gui
    Traceback (most recent call last):
      File "/home/jim/ncs/toolchains/e9dba88316/usr/local/bin/west", line 8, in <module>
        sys.exit(main())
      File "/home/jim/ncs/toolchains/e9dba88316/usr/local/lib/python3.9/site-packages/west/app/main.py", line 1085, in main
        app.run(argv or sys.argv[1:])
      File "/home/jim/ncs/toolchains/e9dba88316/usr/local/lib/python3.9/site-packages/west/app/main.py", line 244, in run
        self.run_command(argv, early_args)
      File "/home/jim/ncs/toolchains/e9dba88316/usr/local/lib/python3.9/site-packages/west/app/main.py", line 505, in run_command
        self.run_extension(args.command, argv)
      File "/home/jim/ncs/toolchains/e9dba88316/usr/local/lib/python3.9/site-packages/west/app/main.py", line 654, in run_extension
        self.cmd.run(args, unknown, self.topdir, manifest=self.manifest,
      File "/home/jim/ncs/toolchains/e9dba88316/usr/local/lib/python3.9/site-packages/west/commands.py", line 194, in run
        self.do_run(args, unknown)
      File "/home/jim/nodic2.70/external/modules/lib/matter/scripts/west/zap_gui.py", line 54, in do_run
        zap_installer.update_zap_if_needed()
      File "/home/jim/nodic2.70/external/modules/lib/matter/scripts/west/zap_common.py", line 202, in update_zap_if_needed
        current_version = self.get_current_version()
      File "/home/jim/nodic2.70/external/modules/lib/matter/scripts/west/zap_common.py", line 166, in get_current_version
        raise RuntimeError("Failed to find version in ZAP output")
    RuntimeError: Failed to find version in ZAP output
    jim@jim:~/nodic2.70/light_bulb$ /home/jim/nodic2.70/external/modules/lib/matter/.zap-install/zap /home/jim/nodic2.70/light_bulb/src/light_bulb.zap --zcl /home/jim/nodic2.70/external/modules/lib/matter/src/app/zap-templates/zcl/zcl.json --gen /home/jim/nodic2.70/external/modules/lib/matter/src/app/zap-templates/app-templates.json --stateDirectory /home/jim/nodic2.70/external/modules/lib/matter/.zap-install/.zap
    /home/jim/nodic2.70/light_bulb/src/light_bulb.zap:2
      "fileFormat": 0,
                  ^
    
    SyntaxError: Unexpected token ':'
        at internalCompileFunction (node:internal/vm:73:18)
        at wrapSafe (node:internal/modules/cjs/loader:1185:20)
        at Module._compile (node:internal/modules/cjs/loader:1227:27)
        at Object..js (node:internal/modules/cjs/loader:1326:10)
        at Module.load (node:internal/modules/cjs/loader:1126:32)
        at node:internal/modules/cjs/loader:967:12
        at Function._load (node:electron/js2c/asar_bundle:2:13327)
        at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:96:12)
        at node:internal/main/run_main_module:23:47
    
    Node.js v18.17.1

    I tried to run ZAP directly, but it seems it cannot open properly.

    jim@jim:~/nodic2.70$ cd external/modules/lib/matter/.zap-install/
    jim@jim:~/nodic2.70/external/modules/lib/matter/.zap-install$ ls
    apack.json               chrome-sandbox  libGLESv2.so          LICENSES.chromium.html  snapshot_blob.bin        zap-cli
    chrome_100_percent.pak   icudtl.dat      libvk_swiftshader.so  locales                 v8_context_snapshot.bin
    chrome_200_percent.pak   libEGL.so       libvulkan.so.1        resources               vk_swiftshader_icd.json
    chrome_crashpad_handler  libffmpeg.so    LICENSE.electron.txt  resources.pak           zap
    jim@jim:~/nodic2.70/external/modules/lib/matter/.zap-install$ zap
    bash: /usr/bin/zap: No such file or directory
    jim@jim:~/nodic2.70/external/modules/lib/matter/.zap-install$ ./zap
    Welcome to Node.js v18.17.1.
    Type ".help" for more information.
    > 

  • Hi,

    Andreas is out of office, so I will handle your ticket going forward.

    It looks like the ZAP tool is not being unpacked properly. Can you try removing the .zap-install directory (/home/jim/nodic2.70/external/modules/lib/matter/.zap-install) and run the west zap-gui command again?

    If this does not work, it might help to reinstall NodeJS and NPM. Which version of NPM do you have? You can check this with npm version.

    Best regards,
    Marte

Reply
  • Hi,

    Andreas is out of office, so I will handle your ticket going forward.

    It looks like the ZAP tool is not being unpacked properly. Can you try removing the .zap-install directory (/home/jim/nodic2.70/external/modules/lib/matter/.zap-install) and run the west zap-gui command again?

    If this does not work, it might help to reinstall NodeJS and NPM. Which version of NPM do you have? You can check this with npm version.

    Best regards,
    Marte

Children
No Data
Related