-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[BUG] (Android) Return/throw an error when an insufficient IPK is provided #29163
Comments
@tnguyen-alarm how do you fix the problem? I'm using version 1.2.0.1 but the last log message is still setNOCChain() |
@pgatti86 Are you using the same IPK between the commissioner + controller + accessory device? They need to all be the same for CASE to work. |
@tnguyen-alarm Thanks for your reply. |
@tnguyen-alarm do you know which exact line is failing with insufficient IPK? here?
|
@tnguyen-alarm any reply on this? thanks |
@yunhanw-google Sorry for the extremely late reply. I haven't been working in this area of the code for a bit so it hasn't been as high of a priority.
Just to confirm, you're suggesting adding a new parameter to
I think this is the line that is failing:
In my original example, my guess is that the Java byte array is padded with 0x00's and so it sneaks by the |
@tnguyen-alarm thanks for the reply.
And onNOCChainGeneration do return the jint error code to java, https://github.com/project-chip/connectedhomeip/blob/master/src/controller/java/CHIPDeviceController-JNI.cpp#L179C18-L179C38 is it possible that somehow your application pad 0x00 in your ipk? CHIP_ERROR_INTERNAL.AsInteger() is not that easy to know what happens. Maybe we should return CHIP_ERROR_INVALID_IPK? Thanks |
Feature description
I was building out commissioning on Android and noticed that when I provided an insufficient IPK (less than 16 bytes, 4 bytes specifically) via
onNOCChainGeneration()
, commissioning would hang, but no errors would show up in Logcat. The last Logcat message that shows up issetNOCChain() called
. It took a while to figure out that the IPK was the cause of the hanging because I was receiving it from the cloud and not generating one myself.Just a guess, but I would have expected this method to return/throw an error:
connectedhomeip/src/controller/java/CHIPDeviceController-JNI.cpp
Line 165 in b274b9e
Platform
android
Platform Version(s)
1.1.0.1
Anything else?
No response
The text was updated successfully, but these errors were encountered: