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

Fix Thread border agent IDs encoded as hex #3828

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

jpelgrom
Copy link
Member

Summary

Core border agent IDs use a hex-encoded string (length 32), whereas the app assumed 'normal' strings (length 16). Check to make sure we use the correct conversion.

Fixes:

08-28 22:33:07.782 19429 19429 E ThreadManagerImpl: Thread update device failed
08-28 22:33:07.782 19429 19429 E ThreadManagerImpl: java.lang.IllegalArgumentException: Invalid length of the ID (length = 32, expectedLength = 16)
08-28 22:33:07.782 19429 19429 E ThreadManagerImpl: 	at com.google.android.gms.common.internal.Preconditions.checkArgument(com.google.android.gms:play-services-basement@@18.1.0:3)
08-28 22:33:07.782 19429 19429 E ThreadManagerImpl: 	at com.google.android.gms.threadnetwork.ThreadBorderAgent$Builder.<init>(com.google.android.gms:play-services-threadnetwork@@16.0.0:1)
08-28 22:33:07.782 19429 19429 E ThreadManagerImpl: 	at com.google.android.gms.threadnetwork.ThreadBorderAgent.newBuilder(com.google.android.gms:play-services-threadnetwork@@16.0.0:1)
08-28 22:33:07.782 19429 19429 E ThreadManagerImpl: 	at io.homeassistant.companion.android.thread.ThreadManagerImpl.importDatasetFromServer(ThreadManagerImpl.kt:175)
08-28 22:33:07.782 19429 19429 E ThreadManagerImpl: 	at io.homeassistant.companion.android.thread.ThreadManagerImpl$importDatasetFromServer$1.invokeSuspend(Unknown Source:18)
08-28 22:33:07.782 19429 19429 E ThreadManagerImpl: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
08-28 22:33:07.782 19429 19429 E ThreadManagerImpl: 	at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:32)
08-28 22:33:07.782 19429 19429 E ThreadManagerImpl: 	at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
08-28 22:33:07.782 19429 19429 E ThreadManagerImpl: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
08-28 22:33:07.782 19429 19429 E ThreadManagerImpl: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
08-28 22:33:07.782 19429 19429 E ThreadManagerImpl: 	at android.os.Handler.handleCallback(Handler.java:942)
08-28 22:33:07.782 19429 19429 E ThreadManagerImpl: 	at android.os.Handler.dispatchMessage(Handler.java:99)
08-28 22:33:07.782 19429 19429 E ThreadManagerImpl: 	at android.os.Looper.loopOnce(Looper.java:201)
08-28 22:33:07.782 19429 19429 E ThreadManagerImpl: 	at android.os.Looper.loop(Looper.java:288)
08-28 22:33:07.782 19429 19429 E ThreadManagerImpl: 	at android.app.ActivityThread.main(ActivityThread.java:7918)
08-28 22:33:07.782 19429 19429 E ThreadManagerImpl: 	at java.lang.reflect.Method.invoke(Native Method)
08-28 22:33:07.782 19429 19429 E ThreadManagerImpl: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
08-28 22:33:07.782 19429 19429 E ThreadManagerImpl: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

Screenshots

n/a

Link to pull request in Documentation repository

n/a

Any other notes

@JBassett JBassett merged commit 02160c4 into home-assistant:master Aug 28, 2023
@jpelgrom jpelgrom deleted the thread-ba-id-hex branch August 28, 2023 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants