Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation of esp-matter failure (CON-1574) #1302

Open
emesamwong opened this issue Feb 28, 2025 · 8 comments
Open

Installation of esp-matter failure (CON-1574) #1302

emesamwong opened this issue Feb 28, 2025 · 8 comments

Comments

@emesamwong
Copy link

Describe the bug
A clear and concise description of what the bug is.
When I try to install the esp-matter, there is some abnormal message during Python setup stage. please refer to the esp-matter error log.txt

I checked the esp-matter & connectedhomeip status are clean
Image

How could I do to solve this problem?

Environment

  • ESP-Matter Commit Id: release/v1.1 (#548ef58)
  • Submodule connectedhomeip commit Id: #83f4163
  • ESP-IDF Commit Id:N/a
  • SoC (eg: ESP32 or ESP32-C3):N/a
  • Device Logs (Please attach the log file):

esp-matter error log.txt

  • Host Machine OS: linux

  • Host Machine Python version: 3.10

  • Commissioner app and versions if present: N/a

  • Home hub app and versions if present:N/a

  • Commissioner's logs if present:N/a

Any additional details
...

@github-actions github-actions bot changed the title Installation of esp-matter failure Installation of esp-matter failure (CON-1574) Feb 28, 2025
@emesamwong
Copy link
Author

For more information, I upload the clone log, and cmd that I executed, please help to review any steps is abnormal.

check hash log.txt
clone esp-matter log.txt
install log.txt

the linux environment is below:

Image

@shubhamdp
Copy link
Contributor

@emesamwong can you please follow the steps mentioned in the programming guide

Since you mentioned that esp-idf: n/a, this is required. We use the esp-idf's Python environment to install the esp-matter's environment.

Can you please setup esp-idf or use the existing one and then run esp-matter/install.sh.

You will have to remove the already present environment before starting again. rm -rf esp-matter/connectedhomeip/connectedhomeip/.environment.

NOTE: source esp-idf/export.sh is important step before running esp-matter/install.sh. This is mentioned in the guide if you follow it.

@emesamwong
Copy link
Author

@shubhamdp Thank you for your reminder, but the problems have not been fixed.
Here is the Log:

esp-matter install fail log (installed esp-idf).txt

Image

I checked that the /.environment folder has been removed before running ./install.sh

Image
The prerequisites on Linux cmd were also executed, but nothing was upgraded.

For more information, I tried to run ./install.sh in esp-matter release/v1.2, which was successful to install the environment, and switch back to release/v1.1 ((#548ef58 for esp-matter & #83f4163 for Submodule connectedhomeip) but failed to build the project with the below error:

Image

@emesamwong
Copy link
Author

Sorry for the missing info of esp-idf for the "esp-matter install fail log (installed esp-idf).txt"
The esp-idf commit : v5.1 (# cbce221e88d52665523093b2b6dd0ebe3f1243f1)

@andy31415
Copy link

From my checks on the connectedhomeip sdk side:

  • this is using a very old release of the SDK (we recommend at least 1.3 due to many critical bug fixes, this is on 1.1)
  • historically there have been issues with gdbgui requiring gevent which would not compile, so the workaround can be to remove the gdbgui requirements from both espressif and the sdk (gdbgui is not required to compile applications)

@shubhamdp
Copy link
Contributor

@emesamwong when running the bootstrap on the fresh clone of connectedhomeip's v1.1-branch I had to do following tweaks and it went through, see if this patch can help you get through this, copy this patch into a file and do a git apply.

diff --git a/scripts/setup/constraints.txt b/scripts/setup/constraints.txt
index c722ba1b..531dd3d9 100644
--- a/scripts/setup/constraints.txt
+++ b/scripts/setup/constraints.txt
@@ -44,7 +44,8 @@ cbor2==5.4.6
     #   imgtool
 certifi==2022.12.7
     # via requests
-cffi==1.15.1
+cffi==1.15.1; python_version < "3.13"
+cffi==1.17.1; python_version >= "3.13"
     # via cryptography
 charset-normalizer==3.0.1
     # via requests
@@ -65,7 +66,7 @@ colorama==0.4.6
     #   west
 coloredlogs==15.0.1
     # via -r requirements.txt
-construct==2.10.54
+construct==2.10.70
     # via -r requirements.esp32.txt
 contextlib2==21.6.0
     # via
@@ -195,7 +196,7 @@ mypy==0.971
     # via -r requirements.txt
 mypy-extensions==1.0.0
     # via mypy
-mypy-protobuf==3.2.0
+mypy-protobuf==3.5.0
     # via -r requirements.txt
 numpy==1.24.2
     # via pandas
@@ -236,7 +237,7 @@ portpicker==1.5.2
 prettytable==2.5.0
 prompt-toolkit==3.0.43
     # via ipython
-protobuf==3.20.1
+protobuf==4.24.4
     # via
     #   -r requirements.txt
     #   mypy-protobuf
@@ -315,7 +316,7 @@ pyudev==0.24.0 ; platform_machine != "aarch64" and sys_platform == "linux"
     # via
     #   -r requirements.mbed.txt
     #   mbed-tools
-pyyaml==6.0
+pyyaml==6.0.1
     # via
     #   idf-component-manager
     #   mobly
@@ -383,7 +384,7 @@ traitlets==5.9.0
     # via
     #   ipython
     #   matplotlib-inline
-types-protobuf==3.19.22
+types-protobuf==4.24.0.2
     # via
     #   -r requirements.txt
     #   mypy-protobuf
diff --git a/scripts/setup/requirements.esp32.txt b/scripts/setup/requirements.esp32.txt
index 7c4eac1c..08542016 100644
--- a/scripts/setup/requirements.esp32.txt
+++ b/scripts/setup/requirements.esp32.txt
@@ -7,7 +7,7 @@ reedsolo>=1.5.3,<=1.5.4
 bitstring>=3.1.6
 ecdsa>=0.16.0
 kconfiglib==13.7.1
-construct==2.10.54
+construct==2.10.70
 python-socketio<5
 itsdangerous<2.1 ; python_version < "3.11"
 #
diff --git a/scripts/setup/requirements.txt b/scripts/setup/requirements.txt
index 53d0037d..e5ab3d31 100644
--- a/scripts/setup/requirements.txt
+++ b/scripts/setup/requirements.txt
@@ -56,9 +56,9 @@ coloredlogs
 watchdog
 build==0.8.0
 mypy==0.971
-mypy-protobuf==3.2.0
-protobuf==3.20.1
-types-protobuf==3.19.22
+mypy-protobuf==3.5.0
+protobuf==4.24.4
+types-protobuf==4.24.0.2
 
 # scripts/tools/memory
 anytree
cd esp-matter/connectedhomeip/connectedhomeip
rm -rf .environment
git apply /tmp/setup.patch
cd -


# since we moved to higher protobuf we need this so that pure python parsing is used, but this is slower (toll for using older version)
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python

./install.sh

Let me know if it works for you or not. But as suggested my @andy31415 you should use the newer release.

@emesamwong
Copy link
Author

@shubhamdp Thank you for your support. I tried to apply the patch however it contains error when execute "git apply setup.patch"

I would like to show my steps:

  1. create a new text file, copy the patch content into the text file and save it as setup.patch
  2. execute the "git apply [path]/setup.patch" after removed .environment inside the connectedhomeip

Here is the log of error:
Image

And the setup.patch location:
Image

@shubhamdp
Copy link
Contributor

Can you please check the connectedhomeip revision that you used? I used the latest v1.1-branch(9bceea9fc468ae92b3fe64e665f82a78799390de) to generate the patch.

If I click on copy to clipboard button on that text box, paste it inside the file and run git apply, it just works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants