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

[BUG] Android Sample app throws UnsatisfiedLinkError on QrCode read #28716

Closed
pgatti86 opened this issue Aug 16, 2023 · 4 comments · Fixed by #29001
Closed

[BUG] Android Sample app throws UnsatisfiedLinkError on QrCode read #28716

pgatti86 opened this issue Aug 16, 2023 · 4 comments · Fixed by #29001
Assignees
Labels
android bug Something isn't working needs triage

Comments

@pgatti86
Copy link

Reproduction steps

While reading QrCode for device commissioning method parseQrCode(qrCode: String) of OnboardingPayloadParser throws java.lang.UnsatisfiedLinkError.

Details:

Cannot load library.
java.lang.UnsatisfiedLinkError: dlopen failed: library "libOnboardingPayload.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:1077)
at java.lang.Runtime.loadLibrary0(Runtime.java:998)
at java.lang.System.loadLibrary(System.java:1661)
at chip.onboardingpayload.OnboardingPayloadParser.<clinit>(OnboardingPayloadParser.kt:125)
at com.google.chip.chiptool.setuppayloadscanner.BarcodeFragment.handleScannedQrCode$lambda$9(BarcodeFragment.kt:206)
at com.google.chip.chiptool.setuppayloadscanner.BarcodeFragment.lambda$NRVVa2Glsayk9lgWADmqvsfpNRo(Unknown Source:0)
at com.google.chip.chiptool.setuppayloadscanner.-$$Lambda$BarcodeFragment$NRVVa2Glsayk9lgWADmqvsfpNRo.run(Unknown Source:4)

Bug prevalence

Every time A QrCode is scanned

GitHub hash of the SDK that was being used

7431a51

Platform

android

Platform Version(s)

1.0.0.2

Anything else?

No response

@yunhanw-google
Copy link
Contributor

@yufengwangca please take a look, OnboardingPayload kotlin module is impacting android chip-tool.
@pgatti86 could you described a little bit more details on reproducing step. thanks

@yunhanw-google yunhanw-google moved this to In Progress in [Platform] Android Aug 17, 2023
@pgatti86
Copy link
Author

pgatti86 commented Aug 17, 2023

@yunhanw-google once launched the sample app (ChipTool) press "SCAN QR CODE" or "PROVISION CHIP DEVICE WITH WI-FI" button.
MlKit successfully returns a barcode object but any attempt to process the displayValue via OnboardingPayloadParser throws an UnsatisfiedLinkError exception.
To mitigate the problem I'm using the dependency found in the GHSA repository:
https://github.com/google-home/sample-apps-for-matter-android/blob/main/3p-ecosystem/third_party/connectedhomeip/libs/jniLibs/arm64-v8a/libSetupPayloadParser.so

I have successfully built the ChipTool project via scripts but the libOnboardingPayload.so seems to not be generated.

@pgatti86 pgatti86 reopened this Aug 17, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in [Platform] Android Aug 17, 2023
@yufengwangca
Copy link
Contributor

OnboardingPayload is completely implemented in kotlin, there is no libOnboardingPayload.so needed.

@yufengwangca
Copy link
Contributor

It seems the Android ChipTool is still looking for libSetupPayloadParser.so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android bug Something isn't working needs triage
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants