project-chip / connectedhomeip

Matter (formerly Project CHIP) creates more connections between more objects, simplifying development for manufacturers and increasing compatibility for consumers, guided by the Connectivity Standards Alliance.
https://buildwithmatter.com
Apache License 2.0
7.5k stars 2.01k forks source link

[BUG] Failure in cert bins docker image creation #24158

Closed raju-apple closed 1 year ago

raju-apple commented 1 year ago

Reproduction steps

Running this command :

docker buildx build --build-arg COMMITHASH=fb185956b987859633acc008bcba17db64d0e3df --platform linux/arm64 --tag connectedhomeip/chip-cert-bins:fb185956b987859633acc008bcba17db64d0e3df --push .

Seeing this fail here :


#0 20.03 WARNING: you are using different node version than recommended.
#0 20.03 ๐Ÿ”ง Using temporary state directory: /tmp/zap3qx01sx3/zap.h1xleM
#0 20.04 ๐Ÿค– ZAP generation started: 
#0 20.04     ๐Ÿ” input files: /root/connectedhomeip/scripts/examples/../../examples/placeholder/linux/apps/app1/config.zap
#0 20.04     ๐Ÿ” output pattern: /root/connectedhomeip/scripts/examples/../../zzz_generated/placeholder/app1/zap-generated
#0 20.04     ๐Ÿ” using templates: /root/connectedhomeip/src/app/zap-templates/app-templates.json
#0 20.04     ๐Ÿ” using zcl data: /root/connectedhomeip/src/app/zap-templates/zcl/zcl.json
#0 20.04     ๐Ÿ” zap version: ver. 2022.11.29, featureLevel 87, commit: 352ea84a27a6e0699c000b9a8cff72029b4b8b75 from 2022-11-29T14:37:33.000Z, mode: source, exe: node
#0 20.86 ๐Ÿ• Setup time: 829ms 
#0 20.86 ๐Ÿ‘‰ using input file: /root/connectedhomeip/scripts/examples/../../examples/placeholder/linux/apps/app1/config.zap
#0 20.87 [Error: SQLITE_ERROR: cannot commit - no transaction is active] {
#0 20.87   errno: 1,
#0 20.87   code: 'SQLITE_ERROR'
#0 20.87 }
#0 20.87 โ‡ Zap generation error: Error: SQLITE_ERROR: cannot commit - no transaction is active
#0 22.46 ๐Ÿ‘Ž Program npx exited with error code: 1
#0 22.46 1
#0 22.47 Searching for zcl file from /root/connectedhomeip/scripts/examples/../../examples/placeholder/linux/apps/app1/config.zap
#0 22.47 Traceback (most recent call last):
#0 22.47   File "/root/connectedhomeip/scripts/examples/../../scripts/tools/zap/generate.py", line 295, in <module>
#0 22.47     main()
#0 22.47   File "/root/connectedhomeip/scripts/examples/../../scripts/tools/zap/generate.py", line 278, in main
#0 22.47     runGeneration(cmdLineArgs.zapFile, cmdLineArgs.zclFile, cmdLineArgs.templateFile, cmdLineArgs.outputDir)
#0 22.47   File "/root/connectedhomeip/scripts/examples/../../scripts/tools/zap/generate.py", line 175, in runGeneration
#0 22.47     subprocess.check_call(generate_cmd + ['-z', zcl_file, '-g', templates_file,
#0 22.47   File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
#0 22.47     raise CalledProcessError(retcode, cmd)
#0 22.47 subprocess.CalledProcessError: Command '['node', 'src-script/zap-start.js', 'generate', '-z', '/root/connectedhomeip/src/app/zap-templates/zcl/zcl.json', '-g', '/root/connectedhomeip/src/app/zap-templates/app-templates.json', '-i', '/root/connectedhomeip/scripts/examples/../../examples/placeholder/linux/apps/app1/config.zap', '-o', '/root/connectedhomeip/scripts/examples/../../zzz_generated/placeholder/app1/zap-generated']' returned non-zero exit status 1.
------
Dockerfile:269
--------------------
 267 |         && npm ci
 268 |     ENV ZAP_DEVELOPMENT_PATH=/opt/zap-${ZAP_VERSION}
 269 | >>> RUN scripts/examples/gn_build_test_example.sh app1
 270 |     
 271 |     RUN source scripts/activate.sh && scripts/build_python.sh -m platform -d true -i no
--------------------
ERROR: failed to solve: process "/bin/bash -c scripts/examples/gn_build_test_example.sh app1" did not complete successfully: exit code: 1

Bug prevalence

Everytime

GitHub hash of the SDK that was being used

fb185956b987859633acc008bcba17db64d0e3df

Platform

raspi

Platform Version(s)

linux/arm64

Anything else?

Full logs attached : Docker_error_THv2.6beta2.txt

raju-apple commented 1 year ago

@andy31415 can you take a look when you get a chance please ?

raju-apple commented 1 year ago

Seeing the same error on TOT ( a2a3ac154a09ab7ea49488544ff817c2f86b440c )

 => ERROR [chip-build-cert-bins 4/5] RUN scripts/examples/gn_build_test_example.sh app1                                                                                                                                                  23.7s 
------                                                                                                                                                                                                                                         
 > [chip-build-cert-bins 4/5] RUN scripts/examples/gn_build_test_example.sh app1:                                                                                                                                                              
#0 1.238                                                                                                                                                                                                                                       
#0 1.238   WELCOME TO...                                                                                                                                                                                                                       
#0 1.238                                                                                                                                                                                                                                       
#0 1.240          โ–ˆ                                                                                                                                                                                                                            
#0 1.240          โ–ˆ
#0 1.240      โ–„   โ–ˆ   โ–„                                โ–ˆ     โ–ˆ
#0 1.240      โ–€โ–€โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–€โ–€      โ–„โ–€โ–€โ–€โ–„ โ–„โ–€โ–€โ–€โ–„    โ–„โ–€โ–€โ–€โ–€โ–„โ–ˆ  โ–€โ–€โ–ˆโ–€โ–€โ–€โ–€โ–€โ–ˆโ–€โ–€   โ–„โ–€โ–€โ–€โ–€โ–„    โ–„โ–€โ–€
#0 1.240    โ–€โ–ˆโ–„       โ–„โ–ˆโ–€   โ–ˆ     โ–ˆ     โ–ˆ  โ–ˆ      โ–ˆ    โ–ˆ     โ–ˆ    โ–ˆโ–„โ–„โ–„โ–„โ–„โ–„โ–ˆ  โ–ˆ   
#0 1.240      โ–€โ–ˆโ–„   โ–„โ–ˆโ–€     โ–ˆ     โ–ˆ     โ–ˆ  โ–ˆ      โ–ˆ    โ–ˆ     โ–ˆ    โ–ˆ         โ–ˆ   
#0 1.240   โ–„โ–ˆโ–ˆโ–€โ–€โ–ˆ   โ–ˆโ–€โ–€โ–ˆโ–ˆโ–„  โ–ˆ     โ–ˆ     โ–ˆ   โ–€โ–„โ–„โ–„โ–„โ–€โ–ˆ    โ–€โ–„โ–„   โ–€โ–„โ–„   โ–€โ–„โ–„โ–„โ–„โ–€   โ–ˆ   
#0 1.240  โ–€โ–€    โ–ˆ   โ–ˆ    โ–€โ–€
#0 1.240 
#0 1.240   ACTIVATOR! This sets your shell environment variables.
#0 1.240 
#0 1.242 Activating environment (setting environment variables):
#0 1.242 
#0 1.242   Setting environment variables for CIPD package manager...done
#0 1.257   Setting environment variables for Python environment.....done
#0 1.261   Setting environment variables for pw packages............skipped
#0 1.261   Setting environment variables for Host tools.............done
#0 1.264 
#0 1.264 Checking the environment:
#0 1.264 
#0 1.766 20230103 21:27:08 INF Environment passes all checks!
#0 1.822 
#0 1.822 Environment looks good, you are ready to go!
#0 1.822 
#0 1.929 ๐Ÿš€ Executing: git log -1 --format={"hash": "%H","timestamp": %ct}
#0 1.937 ๐Ÿ” Git commit: 352ea84a27a6e0699c000b9a8cff72029b4b8b75 from Tue Nov 29 2022 14:37:33 GMT+0000 (Coordinated Universal Time)
#0 1.957 ๐Ÿ” Current src hash: BIDD5bIBBoOMtKS2mxFtAt6dYoQ=
#0 1.960 ๐Ÿ” Current src-shared hash: TekYsEMUhqRD66IAkrwVUv1961g=
#0 1.961 ๐Ÿ‘Ž Error reading old hash file: /opt/zap-v2022.11.29-nightly/spa/hash.json
#0 1.961 ๐Ÿ Front-end code changed, so we need to rebuild SPA.
#0 1.961 ๐Ÿš€ Executing: npx quasar build
#0 2.133 
#0 2.133  Build mode........ spa
#0 2.133  Pkg quasar........ v1.19.1
#0 2.133  Pkg @quasar/app... v2.4.1
#0 2.133  Debugging......... no
#0 2.133  Publishing........ no
#0 2.133 
#0 2.134 โ‡ Browserslist: caniuse-lite is outdated. Please run:
#0 2.134   npx browserslist@latest --update-db
#0 2.134   Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
#0 2.136  Configured browser support (at least 47.62% of global marketshare):
#0 2.136  ยท Chrome for Android >= 102
#0 2.136  ยท Firefox for Android >= 101
#0 2.136  ยท QQ for Android >= 10.4
#0 2.136  ยท UC for Android >= 12.12
#0 2.136  ยท Android >= 101
#0 2.136  ยท Chrome >= 102
#0 2.136  ยท Edge >= 102
#0 2.136  ยท Firefox >= 101
#0 2.136  ยท IE >= 11
#0 2.136  ยท iOS >= 15.5
#0 2.136  ยท Kaios >= 2.5
#0 2.136  ยท Opera Mini >= all
#0 2.136  ยท Opera Mobile >= 64
#0 2.136  ยท Opera >= 86
#0 2.136  ยท Safari >= 15.5
#0 2.136  ยท Samsung >= 16.0
#0 2.136 
#0 2.371  App ยท Running "@quasar/testing" Quasar App Extension...
#0 2.373  App ยท Running "@quasar/testing-unit-jest" Quasar App Extension...
#0 2.374  App ยท Running "@quasar/testing-e2e-cypress" Quasar App Extension...
#0 2.374  App ยท Reading quasar.conf.js
#0 2.376  App ยท Extension(@quasar/testing-e2e-cypress): Extending quasar.conf...
#0 2.376  App ยท Transpiling JS (Babel active) - includes IE11 support
#0 2.987  App ยท Extending SPA Webpack config
#0 3.062  App ยท Cleaned build artifact: "/opt/zap-v2022.11.29-nightly/spa"
#0 3.062  App ยท Generating Webpack entry point
#0 3.063  App ยท Compiling with Webpack...
#0 3.394  App ยท Compiling SPA...
#0 16.15  App ยท Compiled SPA done in 12760 ms
#0 16.15  App ยท Added build artifact "/opt/zap-v2022.11.29-nightly/spa"
#0 16.17 
#0 16.22  Build summary for css/js/json (the rest are omitted):
#0 16.22  โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•คโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•คโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
#0 16.22  โ•‘               Asset โ”‚      Size โ”‚   Gzipped โ•‘
#0 16.22  โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
#0 16.22  โ•‘      1.e802bc39.css โ”‚   0.80 KB โ”‚   0.38 KB โ•‘
#0 16.22  โ•‘      3.f033971d.css โ”‚   0.11 KB โ”‚   0.11 KB โ•‘
#0 16.22  โ•‘    app.674ffe40.css โ”‚   0.77 KB โ”‚   0.28 KB โ•‘
#0 16.22  โ•‘ vendor.f831c66d.css โ”‚ 418.01 KB โ”‚  71.86 KB โ•‘
#0 16.22  โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
#0 16.22  โ•‘       1.fc00b6f5.js โ”‚  68.42 KB โ”‚  16.68 KB โ•‘
#0 16.22  โ•‘       3.f10bd4f3.js โ”‚  34.70 KB โ”‚   6.53 KB โ•‘
#0 16.22  โ•‘       4.5d77b7e0.js โ”‚   1.46 KB โ”‚   0.80 KB โ•‘
#0 16.22  โ•‘       5.a49b2008.js โ”‚  12.04 KB โ”‚   3.84 KB โ•‘
#0 16.22  โ•‘       6.b0bc5abb.js โ”‚   3.48 KB โ”‚   1.60 KB โ•‘
#0 16.22  โ•‘       7.0a7a2ab4.js โ”‚   1.77 KB โ”‚   0.82 KB โ•‘
#0 16.22  โ•‘       8.97415c3d.js โ”‚   6.07 KB โ”‚   2.04 KB โ•‘
#0 16.22  โ•‘       9.b79d7fd5.js โ”‚   8.06 KB โ”‚   2.25 KB โ•‘
#0 16.22  โ•‘     app.0092534b.js โ”‚  77.16 KB โ”‚  19.51 KB โ•‘
#0 16.22  โ•‘  vendor.1600f7c5.js โ”‚ 750.38 KB โ”‚ 238.94 KB โ•‘
#0 16.22  โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
#0 16.22  
#0 16.22  Build succeeded
#0 16.22 
#0 16.22  Build mode........ spa
#0 16.22  Pkg quasar........ v1.19.1
#0 16.22  Pkg @quasar/app... v2.4.1
#0 16.22  Debugging......... no
#0 16.22  Publishing........ no
#0 16.22  Transpiled JS..... yes (Babel) - includes IE11 support
#0 16.22  ==================
#0 16.22  Output folder..... /opt/zap-v2022.11.29-nightly/spa
#0 16.22 
#0 16.22  Tip: Built files are meant to be served over an HTTP server
#0 16.22       Opening index.html over file:// won't work
#0 16.22 
#0 16.22  Tip: You can use "$ quasar serve" command to create a web server,
#0 16.22       both for testing or production. Type "$ quasar serve -h" for
#0 16.22       parameters. Also, an npm script (usually named "start") can
#0 16.22       be added for deployment environments.
#0 16.22       If you're using Vue Router "history" mode, don't forget to
#0 16.22       specify the "--history" parameter: "$ quasar serve --history"
#0 16.22 
#0 16.42 โœ Writing out new hash file.
#0 16.42 ๐Ÿš€ Executing: npx tsc --build ./tsconfig.json
#0 20.59 ๐Ÿš€ Executing: npx copyfiles ./src-electron/**/*.sql ./src-electron/icons/* ./dist/
#0 20.69 ๐Ÿš€ Executing: npx node --unhandled-rejections=strict /opt/zap-v2022.11.29-nightly/dist/src-electron/main-process/main.js generate -z /root/connectedhomeip/src/app/zap-templates/zcl/zcl.json -g /root/connectedhomeip/src/app/zap-templates/app-templates.json -i /root/connectedhomeip/scripts/examples/../../examples/placeholder/linux/apps/app1/config.zap -o /root/connectedhomeip/scripts/examples/../../zzz_generated/placeholder/app1/zap-generated
#0 21.05 Expected node versions: v14.x.x,v16.x.x
#0 21.05 Provided node version: v12.19.0
#0 21.05 WARNING: you are using different node version than recommended.
#0 21.05 ๐Ÿ”ง Using temporary state directory: /tmp/zapxzby4gw_/zap.F2PtoD
#0 21.05 ๐Ÿค– ZAP generation started: 
#0 21.05     ๐Ÿ” input files: /root/connectedhomeip/scripts/examples/../../examples/placeholder/linux/apps/app1/config.zap
#0 21.05     ๐Ÿ” output pattern: /root/connectedhomeip/scripts/examples/../../zzz_generated/placeholder/app1/zap-generated
#0 21.05     ๐Ÿ” using templates: /root/connectedhomeip/src/app/zap-templates/app-templates.json
#0 21.05     ๐Ÿ” using zcl data: /root/connectedhomeip/src/app/zap-templates/zcl/zcl.json
#0 21.05     ๐Ÿ” zap version: ver. 2022.11.29, featureLevel 87, commit: 352ea84a27a6e0699c000b9a8cff72029b4b8b75 from 2022-11-29T14:37:33.000Z, mode: source, exe: node
#0 21.89 ๐Ÿ• Setup time: 833ms 
#0 21.89 ๐Ÿ‘‰ using input file: /root/connectedhomeip/scripts/examples/../../examples/placeholder/linux/apps/app1/config.zap
#0 21.89 [Error: SQLITE_ERROR: cannot commit - no transaction is active] {
#0 21.89   errno: 1,
#0 21.89   code: 'SQLITE_ERROR'
#0 21.89 }
#0 21.89 โ‡ Zap generation error: Error: SQLITE_ERROR: cannot commit - no transaction is active
#0 23.50 ๐Ÿ‘Ž Program npx exited with error code: 1
#0 23.50 1
#0 23.51 Traceback (most recent call last):
#0 23.51   File "/root/connectedhomeip/scripts/examples/../../scripts/tools/zap/generate.py", line 297, in <module>
#0 23.51 Searching for zcl file from /root/connectedhomeip/scripts/examples/../../examples/placeholder/linux/apps/app1/config.zap
#0 23.51     main()
#0 23.51   File "/root/connectedhomeip/scripts/examples/../../scripts/tools/zap/generate.py", line 280, in main
#0 23.51     runGeneration(cmdLineArgs.zapFile, cmdLineArgs.zclFile, cmdLineArgs.templateFile, cmdLineArgs.outputDir)
#0 23.51   File "/root/connectedhomeip/scripts/examples/../../scripts/tools/zap/generate.py", line 177, in runGeneration
#0 23.51     subprocess.check_call(generate_cmd + ['-z', zcl_file, '-g', templates_file,
#0 23.51   File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
#0 23.51     raise CalledProcessError(retcode, cmd)
#0 23.51 subprocess.CalledProcessError: Command '['node', 'src-script/zap-start.js', 'generate', '-z', '/root/connectedhomeip/src/app/zap-templates/zcl/zcl.json', '-g', '/root/connectedhomeip/src/app/zap-templates/app-templates.json', '-i', '/root/connectedhomeip/scripts/examples/../../examples/placeholder/linux/apps/app1/config.zap', '-o', '/root/connectedhomeip/scripts/examples/../../zzz_generated/placeholder/app1/zap-generated']' returned non-zero exit status 1.
------
Dockerfile:269
--------------------
 267 |         && npm ci
 268 |     ENV ZAP_DEVELOPMENT_PATH=/opt/zap-${ZAP_VERSION}
 269 | >>> RUN scripts/examples/gn_build_test_example.sh app1
 270 |     
 271 |     RUN source scripts/activate.sh && scripts/build_python.sh -m platform -d true -i no
--------------------
ERROR: failed to solve: process "/bin/bash -c scripts/examples/gn_build_test_example.sh app1" did not complete successfully: exit code: 1
ReneJosefsen commented 1 year ago

It might be a stupid question, but have you tried deleting the .zap folder?